From a5eae1e3238eb60880e3cb646d3d3b4cec39f849 Mon Sep 17 00:00:00 2001 From: Michael Harbarth Date: Tue, 16 Jan 2024 09:14:52 +0100 Subject: [PATCH] feat: upgrade generator and regenerate auto generated client for new polarion version --- .../custom_templates/client.py.jinja | 173 - .../custom_templates/client.py.jinja.license | 2 - .../custom_templates/endpoint_macros.py.jinja | 194 - .../endpoint_macros.py.jinja.license | 2 - .../custom_templates/model.py.jinja | 45 +- .../model_property.py.jinja | 18 +- polarion_rest_api_client/client.py | 28 +- .../get_document_attachment.py | 200 +- .../get_document_attachment_content.py | 83 +- .../get_document_attachments.py | 228 +- .../patch_document_attachment.py | 94 +- .../post_document_item_attachments.py | 164 +- .../document_comments/get_document_comment.py | 200 +- .../get_document_comments.py | 228 +- .../patch_document_comment.py | 95 +- .../post_document_comments.py | 165 +- .../api/document_parts/get_document_part.py | 200 +- .../api/document_parts/get_document_parts.py | 228 +- .../api/document_parts/post_document_parts.py | 165 +- .../api/documents/branch_document.py | 184 +- .../api/documents/branch_documents.py | 118 + .../api/documents/copy_document.py | 184 +- ...get_available_enum_options_for_document.py | 179 +- ...vailable_enum_options_for_document_type.py | 181 +- ...urrent_enumeration_options_for_document.py | 197 +- .../api/documents/get_document.py | 192 +- .../api/documents/patch_document.py | 102 +- .../api/documents/post_documents.py | 157 +- .../enumerations/delete_global_enumeration.py | 68 +- .../delete_project_enumeration.py | 72 +- .../enumerations/get_global_enumeration.py | 174 +- .../enumerations/get_project_enumeration.py | 182 +- .../enumerations/patch_global_enumeration.py | 165 +- .../enumerations/patch_project_enumeration.py | 173 +- .../enumerations/post_global_enumeration.py | 141 +- .../enumerations/post_project_enumeration.py | 149 +- .../externally_linked_work_items/__init__.py | 2 + .../delete_externally_linked_work_item.py | 156 + .../delete_externally_linked_work_items.py | 145 + .../get_externally_linked_work_item.py | 316 ++ .../get_externally_linked_work_items.py | 290 ++ .../post_externally_linked_work_items.py | 228 + .../api/feature_selections/__init__.py | 2 + .../get_feature_selection.py | 294 ++ .../get_feature_selections.py | 282 ++ .../api/icons/get_default_icon.py | 140 +- .../api/icons/get_default_icons.py | 168 +- .../api/icons/get_global_icon.py | 140 +- .../api/icons/get_global_icons.py | 168 +- .../api/icons/get_project_icon.py | 148 +- .../api/icons/get_project_icons.py | 176 +- .../api/icons/post_global_icons.py | 200 + .../api/icons/post_project_icons.py | 215 + .../open_api_client/api/jobs/__init__.py | 2 + .../open_api_client/api/jobs/get_job.py | 145 + .../api/jobs/get_job_result_file_content.py | 124 + .../api/linked_oslc_resources/__init__.py | 2 + .../delete_oslc_resources.py | 145 + .../get_oslc_resources.py | 297 ++ .../post_oslc_resources.py | 228 + .../delete_linked_work_item.py | 76 +- .../delete_linked_work_items.py | 87 +- .../linked_work_items/get_linked_work_item.py | 208 +- .../get_linked_work_items.py | 220 +- .../patch_linked_work_item.py | 99 +- .../post_linked_work_items.py | 157 +- .../page_attachments/get_page_attachment.py | 200 +- .../get_page_attachment_content.py | 83 +- .../page_attachments/post_page_attachments.py | 164 +- .../open_api_client/api/pages/get_page.py | 192 +- .../api/pages/patch_rich_page.py | 91 +- .../open_api_client/api/plans/__init__.py | 2 + .../open_api_client/api/plans/delete_plan.py | 120 + .../api/plans/delete_plan_relationship.py | 155 + .../open_api_client/api/plans/delete_plans.py | 135 + .../open_api_client/api/plans/get_plan.py | 248 + .../api/plans/get_plan_relationship.py | 363 ++ .../open_api_client/api/plans/get_plans.py | 294 ++ .../open_api_client/api/plans/patch_plan.py | 145 + .../api/plans/patch_plan_relationships.py | 168 + .../api/plans/post_plan_relationships.py | 256 + .../open_api_client/api/plans/post_plans.py | 208 + .../api/project_templates/__init__.py | 2 + .../get_project_templates.py | 238 + .../api/projects/create_project.py | 118 + .../api/projects/delete_project.py | 106 + ...elete_project_test_parameter_definition.py | 122 + .../api/projects/get_project.py | 176 +- .../get_project_test_parameter_definition.py | 241 + .../get_project_test_parameter_definitions.py | 253 + .../api/projects/get_projects.py | 222 +- .../api/projects/mark_project.py | 118 + .../api/projects/move_project_action.py | 125 + .../api/projects/patch_project.py | 137 + ...post_project_test_parameter_definitions.py | 214 + .../api/projects/unmark_project.py | 106 + .../open_api_client/api/revisions/__init__.py | 2 + .../api/revisions/get_revision.py | 233 + .../api/revisions/get_revisions.py | 264 + .../open_api_client/api/roles/get_role.py | 158 +- .../api/test_record_attachments/__init__.py | 2 + .../get_test_record_attachment.py | 308 ++ .../get_test_record_attachment_content.py | 173 + .../get_test_record_attachments.py | 324 ++ .../post_test_record_attachments.py | 285 ++ .../api/test_records/__init__.py | 2 + .../delete_test_record_test_parameter.py | 152 + .../api/test_records/get_test_record.py | 292 ++ .../get_test_record_test_parameter.py | 308 ++ .../get_test_record_test_parameters.py | 322 ++ .../api/test_records/get_test_records.py | 323 ++ .../api/test_records/patch_test_record.py | 171 + .../post_test_record_test_parameters.py | 270 + .../api/test_records/post_test_records.py | 224 + .../api/test_run_attachments/__init__.py | 2 + .../delete_test_run_attachment.py | 132 + .../get_test_run_attachment.py | 266 + .../get_test_run_attachment_content.py | 149 + .../get_test_run_attachments.py | 282 ++ .../patch_test_run_attachment.py | 160 + .../post_test_run_attachments.py | 243 + .../api/test_run_comments/__init__.py | 2 + .../test_run_comments/get_test_run_comment.py | 266 + .../get_test_run_comments.py | 282 ++ .../patch_test_run_comment.py | 155 + .../post_test_run_comments.py | 228 + .../open_api_client/api/test_runs/__init__.py | 2 + .../api/test_runs/delete_test_run.py | 120 + .../delete_test_run_test_parameter.py | 128 + ...lete_test_run_test_parameter_definition.py | 130 + .../api/test_runs/export_excel_tests.py | 137 + .../api/test_runs/get_test_run.py | 248 + .../test_runs/get_test_run_test_parameter.py | 266 + .../get_test_run_test_parameter_definition.py | 270 + ...get_test_run_test_parameter_definitions.py | 282 ++ .../test_runs/get_test_run_test_parameters.py | 280 ++ .../api/test_runs/get_test_runs.py | 294 ++ .../test_runs/import_excel_test_results.py | 138 + .../test_runs/import_x_unit_test_results.py | 138 + .../api/test_runs/patch_test_run.py | 145 + .../post_test_run_parameter_definitions.py | 228 + .../post_test_run_test_parameters.py | 228 + .../api/test_runs/post_test_runs.py | 208 + .../test_step_result_attachments/__init__.py | 2 + .../get_test_step_result_attachment.py | 326 ++ ...get_test_step_result_attachment_content.py | 183 + .../get_test_step_result_attachments.py | 338 ++ .../post_test_step_result_attachments.py | 299 ++ .../api/test_step_results/__init__.py | 2 + .../test_step_results/get_test_step_result.py | 308 ++ .../get_test_step_results.py | 324 ++ .../post_test_step_results.py | 270 + .../api/test_steps/__init__.py | 2 + .../api/test_steps/delete_test_step.py | 136 + .../api/test_steps/delete_test_steps.py | 143 + .../api/test_steps/get_test_step.py | 262 + .../api/test_steps/get_test_steps.py | 278 ++ .../api/test_steps/patch_test_step.py | 155 + .../api/test_steps/patch_test_steps.py | 145 + .../api/test_steps/post_test_steps.py | 222 + .../api/user_groups/get_user_group.py | 176 +- .../open_api_client/api/users/get_avatar.py | 114 + .../open_api_client/api/users/get_user.py | 176 +- .../open_api_client/api/users/get_users.py | 222 +- .../open_api_client/api/users/patch_user.py | 83 +- .../open_api_client/api/users/post_users.py | 141 +- .../open_api_client/api/users/set_license.py | 83 +- .../api/users/update_avatar.py | 136 + .../api/work_item_approvals/__init__.py | 2 + .../work_item_approvals/delete_approval.py | 128 + .../work_item_approvals/delete_approvals.py | 145 + .../get_work_item_approval.py | 266 + .../get_work_item_approvals.py | 282 ++ .../patch_work_item_approval.py | 155 + .../patch_work_item_approvals.py | 147 + .../post_work_item_approvals.py | 228 + .../delete_work_item_attachment.py | 68 +- .../get_work_item_attachment.py | 192 +- .../get_work_item_attachment_content.py | 79 +- .../get_work_item_attachments.py | 220 +- .../patch_work_item_attachment.py | 90 +- .../post_work_item_attachments.py | 156 +- .../api/work_item_comments/get_comment.py | 192 +- .../api/work_item_comments/get_comments.py | 220 +- .../api/work_item_comments/patch_comment.py | 91 +- .../api/work_item_comments/post_comments.py | 157 +- .../api/work_item_work_records/__init__.py | 2 + .../delete_work_record.py | 128 + .../delete_work_records.py | 145 + .../work_item_work_records/get_work_record.py | 264 + .../get_work_records.py | 278 ++ .../post_work_records.py | 224 + .../api/work_items/delete_all_work_items.py | 124 + .../api/work_items/delete_work_items.py | 83 +- .../delete_work_items_relationship.py | 155 + .../api/work_items/get_all_work_items.py | 222 +- ...et_available_enum_options_for_work_item.py | 171 +- ...ailable_enum_options_for_work_item_type.py | 181 +- .../get_current_enum_options_for_work_item.py | 189 +- .../api/work_items/get_work_item.py | 184 +- ...get_work_item_test_parameter_definition.py | 270 + ...et_work_item_test_parameter_definitions.py | 286 ++ .../api/work_items/get_work_items.py | 230 +- .../get_work_items_relationships.py | 363 ++ .../get_workflow_actions_for_work_item.py | 247 + .../api/work_items/move_from_document.py | 64 +- .../api/work_items/move_to_document.py | 87 +- .../api/work_items/patch_all_work_items.py | 142 + .../api/work_items/patch_work_item.py | 107 +- .../patch_work_item_relationships.py | 168 + .../api/work_items/patch_work_items.py | 162 + .../post_work_item_relationships.py | 170 + .../api/work_items/post_work_items.py | 149 +- .../open_api_client/client.py | 29 +- .../open_api_client/models/__init__.py | 4378 ++++++++++++++++- .../models/branch_document_request_body.py | 23 +- .../models/branch_documents_request_body.py | 89 + ...quest_body_document_configurations_item.py | 169 + .../models/copy_document_request_body.py | 23 +- .../models/create_project_request_body.py | 152 + ...eate_project_request_body_params_type_0.py | 49 + .../document_attachments_list_get_response.py | 17 +- ...attachments_list_get_response_data_item.py | 19 +- ..._list_get_response_data_item_attributes.py | 17 +- ...ments_list_get_response_data_item_links.py | 10 +- ...hments_list_get_response_data_item_meta.py | 6 +- ...get_response_data_item_meta_errors_item.py | 18 +- ...ponse_data_item_meta_errors_item_source.py | 47 +- ...a_item_meta_errors_item_source_resource.py | 78 + ...st_get_response_data_item_relationships.py | 7 +- ...response_data_item_relationships_author.py | 5 +- ...nse_data_item_relationships_author_data.py | 10 +- ...esponse_data_item_relationships_project.py | 5 +- ...se_data_item_relationships_project_data.py | 10 +- ...ent_attachments_list_get_response_links.py | 22 +- ...ment_attachments_list_get_response_meta.py | 5 +- .../document_attachments_list_post_request.py | 6 +- ...attachments_list_post_request_data_item.py | 10 +- ..._list_post_request_data_item_attributes.py | 8 +- ...document_attachments_list_post_response.py | 6 +- ...ttachments_list_post_response_data_item.py | 10 +- ...ents_list_post_response_data_item_links.py | 10 +- ...ocument_attachments_single_get_response.py | 14 +- ...nt_attachments_single_get_response_data.py | 19 +- ...nts_single_get_response_data_attributes.py | 17 +- ...achments_single_get_response_data_links.py | 10 +- ...tachments_single_get_response_data_meta.py | 6 +- ...ngle_get_response_data_meta_errors_item.py | 18 +- ...t_response_data_meta_errors_item_source.py | 47 +- ...e_data_meta_errors_item_source_resource.py | 78 + ..._single_get_response_data_relationships.py | 7 +- ..._get_response_data_relationships_author.py | 5 +- ...response_data_relationships_author_data.py | 10 +- ...get_response_data_relationships_project.py | 5 +- ...esponse_data_relationships_project_data.py | 10 +- ...t_attachments_single_get_response_links.py | 6 +- ...cument_attachments_single_patch_request.py | 5 +- ...t_attachments_single_patch_request_data.py | 10 +- ...ts_single_patch_request_data_attributes.py | 5 +- .../document_comments_list_get_response.py | 17 +- ...nt_comments_list_get_response_data_item.py | 19 +- ..._list_get_response_data_item_attributes.py | 13 +- ..._get_response_data_item_attributes_text.py | 7 +- ...ments_list_get_response_data_item_links.py | 6 +- ...mments_list_get_response_data_item_meta.py | 6 +- ...get_response_data_item_meta_errors_item.py | 18 +- ...ponse_data_item_meta_errors_item_source.py | 47 +- ...a_item_meta_errors_item_source_resource.py | 78 + ...st_get_response_data_item_relationships.py | 11 +- ...response_data_item_relationships_author.py | 5 +- ...nse_data_item_relationships_author_data.py | 10 +- ..._data_item_relationships_child_comments.py | 8 +- ..._relationships_child_comments_data_item.py | 10 +- ..._item_relationships_child_comments_meta.py | 5 +- ..._data_item_relationships_parent_comment.py | 5 +- ..._item_relationships_parent_comment_data.py | 10 +- ...esponse_data_item_relationships_project.py | 5 +- ...se_data_item_relationships_project_data.py | 10 +- ...cument_comments_list_get_response_links.py | 22 +- ...ocument_comments_list_get_response_meta.py | 5 +- .../document_comments_list_post_request.py | 6 +- ...nt_comments_list_post_request_data_item.py | 9 +- ..._list_post_request_data_item_attributes.py | 8 +- ..._post_request_data_item_attributes_text.py | 7 +- ...st_post_request_data_item_relationships.py | 7 +- ..._request_data_item_relationships_author.py | 5 +- ...est_data_item_relationships_author_data.py | 7 +- ..._data_item_relationships_parent_comment.py | 5 +- ..._item_relationships_parent_comment_data.py | 7 +- .../document_comments_list_post_response.py | 6 +- ...t_comments_list_post_response_data_item.py | 10 +- ...ents_list_post_response_data_item_links.py | 6 +- .../document_comments_single_get_response.py | 14 +- ...ument_comments_single_get_response_data.py | 19 +- ...nts_single_get_response_data_attributes.py | 13 +- ...ingle_get_response_data_attributes_text.py | 7 +- ...comments_single_get_response_data_links.py | 6 +- ..._comments_single_get_response_data_meta.py | 6 +- ...ngle_get_response_data_meta_errors_item.py | 18 +- ...t_response_data_meta_errors_item_source.py | 47 +- ...e_data_meta_errors_item_source_resource.py | 78 + ..._single_get_response_data_relationships.py | 11 +- ..._get_response_data_relationships_author.py | 5 +- ...response_data_relationships_author_data.py | 10 +- ...ponse_data_relationships_child_comments.py | 8 +- ..._relationships_child_comments_data_item.py | 10 +- ..._data_relationships_child_comments_meta.py | 5 +- ...ponse_data_relationships_parent_comment.py | 5 +- ..._data_relationships_parent_comment_data.py | 10 +- ...get_response_data_relationships_project.py | 5 +- ...esponse_data_relationships_project_data.py | 10 +- ...ment_comments_single_get_response_links.py | 6 +- .../document_comments_single_patch_request.py | 5 +- ...ment_comments_single_patch_request_data.py | 10 +- ...ts_single_patch_request_data_attributes.py | 5 +- .../document_parts_list_get_response.py | 17 +- ...ument_parts_list_get_response_data_item.py | 19 +- ..._list_get_response_data_item_attributes.py | 18 +- ...parts_list_get_response_data_item_links.py | 6 +- ..._parts_list_get_response_data_item_meta.py | 6 +- ...get_response_data_item_meta_errors_item.py | 18 +- ...ponse_data_item_meta_errors_item_source.py | 47 +- ...a_item_meta_errors_item_source_resource.py | 78 + ...st_get_response_data_item_relationships.py | 9 +- ...ponse_data_item_relationships_next_part.py | 5 +- ..._data_item_relationships_next_part_data.py | 10 +- ...e_data_item_relationships_previous_part.py | 5 +- ...a_item_relationships_previous_part_data.py | 10 +- ...ponse_data_item_relationships_work_item.py | 5 +- ..._data_item_relationships_work_item_data.py | 10 +- .../document_parts_list_get_response_links.py | 22 +- .../document_parts_list_get_response_meta.py | 5 +- .../document_parts_list_post_request.py | 6 +- ...ument_parts_list_post_request_data_item.py | 9 +- ..._list_post_request_data_item_attributes.py | 8 +- ...st_post_request_data_item_relationships.py | 9 +- ...quest_data_item_relationships_next_part.py | 5 +- ..._data_item_relationships_next_part_data.py | 7 +- ...t_data_item_relationships_previous_part.py | 5 +- ...a_item_relationships_previous_part_data.py | 7 +- ...quest_data_item_relationships_work_item.py | 5 +- ..._data_item_relationships_work_item_data.py | 7 +- .../document_parts_list_post_response.py | 6 +- ...ment_parts_list_post_response_data_item.py | 10 +- ...arts_list_post_response_data_item_links.py | 6 +- .../document_parts_single_get_response.py | 14 +- ...document_parts_single_get_response_data.py | 19 +- ...rts_single_get_response_data_attributes.py | 18 +- ...nt_parts_single_get_response_data_links.py | 6 +- ...ent_parts_single_get_response_data_meta.py | 6 +- ...ngle_get_response_data_meta_errors_item.py | 18 +- ...t_response_data_meta_errors_item_source.py | 46 +- ...e_data_meta_errors_item_source_resource.py | 77 + ..._single_get_response_data_relationships.py | 9 +- ...t_response_data_relationships_next_part.py | 5 +- ...ponse_data_relationships_next_part_data.py | 10 +- ...sponse_data_relationships_previous_part.py | 5 +- ...e_data_relationships_previous_part_data.py | 10 +- ...t_response_data_relationships_work_item.py | 5 +- ...ponse_data_relationships_work_item_data.py | 10 +- ...ocument_parts_single_get_response_links.py | 6 +- .../models/documents_list_post_request.py | 6 +- .../documents_list_post_request_data_item.py | 7 +- ..._list_post_request_data_item_attributes.py | 30 +- ..._data_item_attributes_home_page_content.py | 7 +- ..._data_item_attributes_outline_numbering.py | 5 +- ..._item_attributes_rendering_layouts_item.py | 15 +- ..._rendering_layouts_item_properties_item.py | 8 +- .../models/documents_list_post_response.py | 6 +- .../documents_list_post_response_data_item.py | 10 +- ...ents_list_post_response_data_item_links.py | 6 +- .../models/documents_single_get_response.py | 14 +- .../documents_single_get_response_data.py | 19 +- ...nts_single_get_response_data_attributes.py | 73 +- ...ponse_data_attributes_home_page_content.py | 7 +- ...ponse_data_attributes_outline_numbering.py | 5 +- ..._data_attributes_rendering_layouts_item.py | 15 +- ..._rendering_layouts_item_properties_item.py | 8 +- ...ocuments_single_get_response_data_links.py | 6 +- ...documents_single_get_response_data_meta.py | 6 +- ...ngle_get_response_data_meta_errors_item.py | 18 +- ...t_response_data_meta_errors_item_source.py | 44 +- ...e_data_meta_errors_item_source_resource.py | 77 + ..._single_get_response_data_relationships.py | 19 +- ...response_data_relationships_attachments.py | 10 +- ...ata_relationships_attachments_data_item.py | 10 +- ...se_data_relationships_attachments_links.py | 6 +- ...nse_data_relationships_attachments_meta.py | 5 +- ..._get_response_data_relationships_author.py | 5 +- ...response_data_relationships_author_data.py | 10 +- ...sponse_data_relationships_branched_from.py | 5 +- ...e_data_relationships_branched_from_data.py | 10 +- ...et_response_data_relationships_comments.py | 10 +- ...e_data_relationships_comments_data_item.py | 10 +- ...ponse_data_relationships_comments_links.py | 6 +- ...sponse_data_relationships_comments_meta.py | 5 +- ...esponse_data_relationships_derived_from.py | 5 +- ...se_data_relationships_derived_from_data.py | 10 +- ...get_response_data_relationships_project.py | 5 +- ...esponse_data_relationships_project_data.py | 10 +- ..._response_data_relationships_updated_by.py | 5 +- ...onse_data_relationships_updated_by_data.py | 10 +- ...get_response_data_relationships_variant.py | 5 +- ...esponse_data_relationships_variant_data.py | 10 +- .../documents_single_get_response_links.py | 6 +- .../models/documents_single_patch_request.py | 5 +- .../documents_single_patch_request_data.py | 10 +- ...ts_single_patch_request_data_attributes.py | 24 +- ...quest_data_attributes_home_page_content.py | 7 +- ...quest_data_attributes_outline_numbering.py | 5 +- ..._data_attributes_rendering_layouts_item.py | 15 +- ..._rendering_layouts_item_properties_item.py | 8 +- .../models/documents_single_post_response.py | 5 +- .../documents_single_post_response_data.py | 62 +- ...ts_single_post_response_data_attributes.py | 115 +- ...ponse_data_attributes_home_page_content.py | 7 +- ...ponse_data_attributes_outline_numbering.py | 5 +- ..._data_attributes_rendering_layouts_item.py | 15 +- ..._rendering_layouts_item_properties_item.py | 8 +- ...cuments_single_post_response_data_links.py | 64 + ...single_post_response_data_relationships.py | 292 ++ ...response_data_relationships_attachments.py | 126 + ...ata_relationships_attachments_data_item.py | 95 + ...elationships_attachments_data_item_type.py | 13 + ...se_data_relationships_attachments_links.py | 68 + ...post_response_data_relationships_author.py | 88 + ...response_data_relationships_author_data.py | 96 + ...nse_data_relationships_author_data_type.py | 11 + ...sponse_data_relationships_branched_from.py | 94 + ...e_data_relationships_branched_from_data.py | 93 + ...a_relationships_branched_from_data_type.py | 13 + ...st_response_data_relationships_comments.py | 118 + ...e_data_relationships_comments_data_item.py | 93 + ...a_relationships_comments_data_item_type.py | 13 + ...ponse_data_relationships_comments_links.py | 68 + ...esponse_data_relationships_derived_from.py | 94 + ...se_data_relationships_derived_from_data.py | 93 + ...ta_relationships_derived_from_data_type.py | 13 + ...ost_response_data_relationships_project.py | 88 + ...esponse_data_relationships_project_data.py | 96 + ...se_data_relationships_project_data_type.py | 11 + ..._response_data_relationships_updated_by.py | 88 + ...onse_data_relationships_updated_by_data.py | 95 + ...data_relationships_updated_by_data_type.py | 11 + ...ost_response_data_relationships_variant.py | 88 + ...esponse_data_relationships_variant_data.py | 96 + ...se_data_relationships_variant_data_type.py | 11 + .../enum_options_action_response_body.py | 10 +- ..._options_action_response_body_data_item.py | 47 +- ...enum_options_action_response_body_links.py | 22 +- .../enum_options_action_response_body_meta.py | 5 +- .../models/enumerations_list_post_request.py | 6 +- ...numerations_list_post_request_data_item.py | 7 +- ..._list_post_request_data_item_attributes.py | 14 +- ...quest_data_item_attributes_options_item.py | 47 +- .../models/enumerations_list_post_response.py | 6 +- ...umerations_list_post_response_data_item.py | 10 +- ...ions_list_post_response_data_item_links.py | 5 +- .../enumerations_single_get_response.py | 14 +- .../enumerations_single_get_response_data.py | 17 +- ...ons_single_get_response_data_attributes.py | 14 +- ...t_response_data_attributes_options_item.py | 47 +- ...erations_single_get_response_data_links.py | 5 +- ...merations_single_get_response_data_meta.py | 6 +- ...ngle_get_response_data_meta_errors_item.py | 18 +- ...t_response_data_meta_errors_item_source.py | 46 +- ...e_data_meta_errors_item_source_resource.py | 77 + .../enumerations_single_get_response_links.py | 5 +- .../enumerations_single_patch_request.py | 5 +- .../enumerations_single_patch_request_data.py | 10 +- ...ns_single_patch_request_data_attributes.py | 6 +- ...ch_request_data_attributes_options_item.py | 47 +- .../open_api_client/models/errors.py | 6 +- .../models/errors_errors_item.py | 18 +- .../models/errors_errors_item_source.py | 38 +- .../errors_errors_item_source_resource.py | 73 + .../models/export_test_cases_request_body.py | 81 + ...allylinkedworkitems_list_delete_request.py | 91 + ...workitems_list_delete_request_data_item.py | 90 + ...tems_list_delete_request_data_item_type.py | 11 + ...rnallylinkedworkitems_list_get_response.py | 174 + ...edworkitems_list_get_response_data_item.py | 187 + ..._list_get_response_data_item_attributes.py | 76 + ...items_list_get_response_data_item_links.py | 66 + ...kitems_list_get_response_data_item_meta.py | 90 + ...get_response_data_item_meta_errors_item.py | 120 + ...ponse_data_item_meta_errors_item_source.py | 112 + ...a_item_meta_errors_item_source_resource.py | 78 + ...kitems_list_get_response_data_item_type.py | 11 + ...rkitems_list_get_response_included_item.py | 51 + ...linkedworkitems_list_get_response_links.py | 106 + ...ylinkedworkitems_list_get_response_meta.py | 65 + ...rnallylinkedworkitems_list_post_request.py | 91 + ...edworkitems_list_post_request_data_item.py | 111 + ..._list_post_request_data_item_attributes.py | 76 + ...kitems_list_post_request_data_item_type.py | 11 + ...nallylinkedworkitems_list_post_response.py | 91 + ...dworkitems_list_post_response_data_item.py | 120 + ...tems_list_post_response_data_item_links.py | 68 + ...items_list_post_response_data_item_type.py | 11 + ...allylinkedworkitems_single_get_response.py | 143 + ...inkedworkitems_single_get_response_data.py | 185 + ...ems_single_get_response_data_attributes.py | 80 + ...orkitems_single_get_response_data_links.py | 66 + ...workitems_single_get_response_data_meta.py | 90 + ...ngle_get_response_data_meta_errors_item.py | 120 + ...t_response_data_meta_errors_item_source.py | 112 + ...e_data_meta_errors_item_source_resource.py | 78 + ...workitems_single_get_response_data_type.py | 11 + ...items_single_get_response_included_item.py | 53 + ...nkedworkitems_single_get_response_links.py | 66 + .../featureselections_list_get_response.py | 164 + ...eselections_list_get_response_data_item.py | 205 + ..._list_get_response_data_item_attributes.py | 83 + ...nse_data_item_attributes_selection_type.py | 15 + ...tions_list_get_response_data_item_links.py | 66 + ...ctions_list_get_response_data_item_meta.py | 89 + ...get_response_data_item_meta_errors_item.py | 122 + ...ponse_data_item_meta_errors_item_source.py | 111 + ...a_item_meta_errors_item_source_resource.py | 78 + ...st_get_response_data_item_relationships.py | 89 + ...ponse_data_item_relationships_work_item.py | 92 + ..._data_item_relationships_work_item_data.py | 104 + ..._item_relationships_work_item_data_type.py | 13 + ...ctions_list_get_response_data_item_type.py | 11 + ...ections_list_get_response_included_item.py | 51 + ...atureselections_list_get_response_links.py | 104 + ...eatureselections_list_get_response_meta.py | 63 + .../featureselections_single_get_response.py | 135 + ...tureselections_single_get_response_data.py | 203 + ...ons_single_get_response_data_attributes.py | 85 + ...response_data_attributes_selection_type.py | 13 + ...lections_single_get_response_data_links.py | 66 + ...elections_single_get_response_data_meta.py | 91 + ...ngle_get_response_data_meta_errors_item.py | 116 + ...t_response_data_meta_errors_item_source.py | 111 + ...e_data_meta_errors_item_source_resource.py | 78 + ..._single_get_response_data_relationships.py | 88 + ...t_response_data_relationships_work_item.py | 92 + ...ponse_data_relationships_work_item_data.py | 104 + ..._data_relationships_work_item_data_type.py | 13 + ...elections_single_get_response_data_type.py | 11 + ...tions_single_get_response_included_item.py | 51 + ...ureselections_single_get_response_links.py | 66 + .../models/globalroles_single_get_response.py | 14 +- .../globalroles_single_get_response_data.py | 14 +- ...balroles_single_get_response_data_links.py | 5 +- ...obalroles_single_get_response_data_meta.py | 6 +- ...ngle_get_response_data_meta_errors_item.py | 18 +- ...t_response_data_meta_errors_item_source.py | 45 +- ...e_data_meta_errors_item_source_resource.py | 77 + ..._single_get_response_data_relationships.py | 5 +- ...e_get_response_data_relationships_users.py | 8 +- ...onse_data_relationships_users_data_item.py | 7 +- ..._response_data_relationships_users_meta.py | 5 +- .../globalroles_single_get_response_links.py | 5 +- .../models/icons_list_get_response.py | 17 +- .../icons_list_get_response_data_item.py | 17 +- ..._list_get_response_data_item_attributes.py | 17 +- ...icons_list_get_response_data_item_links.py | 5 +- .../icons_list_get_response_data_item_meta.py | 6 +- ...get_response_data_item_meta_errors_item.py | 18 +- ...ponse_data_item_meta_errors_item_source.py | 44 +- ...a_item_meta_errors_item_source_resource.py | 77 + .../models/icons_list_get_response_links.py | 22 +- .../models/icons_list_get_response_meta.py | 5 +- .../models/icons_list_post_request.py | 83 + .../icons_list_post_request_data_item.py | 73 + .../icons_list_post_request_data_item_type.py | 11 + .../models/icons_list_post_response.py | 83 + .../icons_list_post_response_data_item.py | 108 + ...cons_list_post_response_data_item_links.py | 63 + ...icons_list_post_response_data_item_type.py | 11 + .../models/icons_single_get_response.py | 14 +- .../models/icons_single_get_response_data.py | 17 +- ...ons_single_get_response_data_attributes.py | 17 +- .../icons_single_get_response_data_links.py | 5 +- .../icons_single_get_response_data_meta.py | 6 +- ...ngle_get_response_data_meta_errors_item.py | 18 +- ...t_response_data_meta_errors_item_source.py | 44 +- ...e_data_meta_errors_item_source_resource.py | 81 + .../models/icons_single_get_response_links.py | 5 +- .../import_test_results_request_body.py | 72 + ...linkedoslcresources_list_delete_request.py | 87 + ...resources_list_delete_request_data_item.py | 88 + ...rces_list_delete_request_data_item_type.py | 11 + .../linkedoslcresources_list_get_response.py | 142 + ...lcresources_list_get_response_data_item.py | 181 + ..._list_get_response_data_item_attributes.py | 83 + ...urces_list_get_response_data_item_links.py | 51 + ...ources_list_get_response_data_item_meta.py | 89 + ...get_response_data_item_meta_errors_item.py | 119 + ...ponse_data_item_meta_errors_item_source.py | 111 + ...a_item_meta_errors_item_source_resource.py | 78 + ...ources_list_get_response_data_item_type.py | 11 + ...sources_list_get_response_included_item.py | 51 + ...kedoslcresources_list_get_response_meta.py | 65 + .../linkedoslcresources_list_post_request.py | 87 + ...lcresources_list_post_request_data_item.py | 109 + ..._list_post_request_data_item_attributes.py | 83 + ...ources_list_post_request_data_item_type.py | 11 + .../linkedoslcresources_list_post_response.py | 87 + ...cresources_list_post_response_data_item.py | 116 + ...rces_list_post_response_data_item_links.py | 51 + ...urces_list_post_response_data_item_type.py | 11 + .../linkedworkitems_list_delete_request.py | 6 +- ...workitems_list_delete_request_data_item.py | 7 +- .../linkedworkitems_list_get_response.py | 17 +- ...edworkitems_list_get_response_data_item.py | 19 +- ..._list_get_response_data_item_attributes.py | 11 +- ...items_list_get_response_data_item_links.py | 6 +- ...kitems_list_get_response_data_item_meta.py | 6 +- ...get_response_data_item_meta_errors_item.py | 18 +- ...ponse_data_item_meta_errors_item_source.py | 47 +- ...a_item_meta_errors_item_source_resource.py | 78 + ...st_get_response_data_item_relationships.py | 5 +- ...ponse_data_item_relationships_work_item.py | 5 +- ..._data_item_relationships_work_item_data.py | 10 +- ...linkedworkitems_list_get_response_links.py | 22 +- .../linkedworkitems_list_get_response_meta.py | 5 +- .../linkedworkitems_list_post_request.py | 6 +- ...edworkitems_list_post_request_data_item.py | 9 +- ..._list_post_request_data_item_attributes.py | 11 +- ...st_post_request_data_item_relationships.py | 5 +- ...quest_data_item_relationships_work_item.py | 5 +- ..._data_item_relationships_work_item_data.py | 7 +- .../linkedworkitems_list_post_response.py | 6 +- ...dworkitems_list_post_response_data_item.py | 10 +- ...tems_list_post_response_data_item_links.py | 6 +- .../linkedworkitems_single_get_response.py | 14 +- ...inkedworkitems_single_get_response_data.py | 19 +- ...ems_single_get_response_data_attributes.py | 11 +- ...orkitems_single_get_response_data_links.py | 6 +- ...workitems_single_get_response_data_meta.py | 6 +- ...ngle_get_response_data_meta_errors_item.py | 18 +- ...t_response_data_meta_errors_item_source.py | 47 +- ...e_data_meta_errors_item_source_resource.py | 78 + ..._single_get_response_data_relationships.py | 5 +- ...t_response_data_relationships_work_item.py | 5 +- ...ponse_data_relationships_work_item_data.py | 10 +- ...nkedworkitems_single_get_response_links.py | 6 +- .../linkedworkitems_single_patch_request.py | 5 +- ...nkedworkitems_single_patch_request_data.py | 10 +- ...ms_single_patch_request_data_attributes.py | 8 +- .../models/move_project_request_body.py | 63 + ...move_work_item_to_document_request_body.py | 11 +- .../page_attachments_list_post_request.py | 6 +- ...attachments_list_post_request_data_item.py | 10 +- ..._list_post_request_data_item_attributes.py | 8 +- .../page_attachments_list_post_response.py | 6 +- ...ttachments_list_post_response_data_item.py | 10 +- ...ents_list_post_response_data_item_links.py | 10 +- .../page_attachments_single_get_response.py | 14 +- ...ge_attachments_single_get_response_data.py | 19 +- ...nts_single_get_response_data_attributes.py | 17 +- ...achments_single_get_response_data_links.py | 10 +- ...tachments_single_get_response_data_meta.py | 6 +- ...ngle_get_response_data_meta_errors_item.py | 18 +- ...t_response_data_meta_errors_item_source.py | 47 +- ...e_data_meta_errors_item_source_resource.py | 78 + ..._single_get_response_data_relationships.py | 7 +- ..._get_response_data_relationships_author.py | 5 +- ...response_data_relationships_author_data.py | 10 +- ...get_response_data_relationships_project.py | 5 +- ...esponse_data_relationships_project_data.py | 10 +- ...e_attachments_single_get_response_links.py | 6 +- .../models/pages_single_get_response.py | 14 +- .../models/pages_single_get_response_data.py | 19 +- ...ges_single_get_response_data_attributes.py | 16 +- .../pages_single_get_response_data_links.py | 6 +- .../pages_single_get_response_data_meta.py | 6 +- ...ngle_get_response_data_meta_errors_item.py | 18 +- ...t_response_data_meta_errors_item_source.py | 44 +- ...e_data_meta_errors_item_source_resource.py | 81 + ..._single_get_response_data_relationships.py | 11 +- ...response_data_relationships_attachments.py | 8 +- ...ata_relationships_attachments_data_item.py | 10 +- ...nse_data_relationships_attachments_meta.py | 5 +- ..._get_response_data_relationships_author.py | 5 +- ...response_data_relationships_author_data.py | 10 +- ...get_response_data_relationships_project.py | 5 +- ...esponse_data_relationships_project_data.py | 10 +- ..._response_data_relationships_updated_by.py | 5 +- ...onse_data_relationships_updated_by_data.py | 10 +- .../models/pages_single_get_response_links.py | 6 +- .../models/pages_single_patch_request.py | 5 +- .../models/pages_single_patch_request_data.py | 10 +- ...es_single_patch_request_data_attributes.py | 5 +- .../open_api_client/models/pagination.py | 11 +- ...patch_document_attachments_request_body.py | 8 +- ...patch_test_run_attachments_request_body.py | 123 + ...atch_work_item_attachments_request_body.py | 8 +- .../models/plans_list_delete_request.py | 85 + .../plans_list_delete_request_data_item.py | 82 + ...lans_list_delete_request_data_item_type.py | 11 + .../models/plans_list_get_response.py | 154 + .../plans_list_get_response_data_item.py | 191 + ..._list_get_response_data_item_attributes.py | 362 ++ ...e_data_item_attributes_calculation_type.py | 12 + ...sponse_data_item_attributes_description.py | 88 + ...e_data_item_attributes_description_type.py | 11 + ..._data_item_attributes_home_page_content.py | 94 + ..._item_attributes_home_page_content_type.py | 12 + ...plans_list_get_response_data_item_links.py | 74 + .../plans_list_get_response_data_item_meta.py | 87 + ...get_response_data_item_meta_errors_item.py | 116 + ...ponse_data_item_meta_errors_item_source.py | 106 + ...a_item_meta_errors_item_source_resource.py | 77 + ...st_get_response_data_item_relationships.py | 230 + ...response_data_item_relationships_author.py | 88 + ...nse_data_item_relationships_author_data.py | 99 + ...ata_item_relationships_author_data_type.py | 11 + ...response_data_item_relationships_parent.py | 88 + ...nse_data_item_relationships_parent_data.py | 99 + ...ata_item_relationships_parent_data_type.py | 11 + ...esponse_data_item_relationships_project.py | 90 + ...se_data_item_relationships_project_data.py | 99 + ...ta_item_relationships_project_data_type.py | 11 + ...se_data_item_relationships_project_span.py | 118 + ...em_relationships_project_span_data_item.py | 102 + ...lationships_project_span_data_item_type.py | 13 + ...ta_item_relationships_project_span_meta.py | 67 + ...sponse_data_item_relationships_template.py | 88 + ...e_data_item_relationships_template_data.py | 103 + ...a_item_relationships_template_data_type.py | 11 + ...onse_data_item_relationships_work_items.py | 118 + ...item_relationships_work_items_data_item.py | 104 + ...relationships_work_items_data_item_type.py | 13 + ...data_item_relationships_work_items_meta.py | 71 + .../plans_list_get_response_data_item_type.py | 11 + .../plans_list_get_response_included_item.py | 49 + .../models/plans_list_get_response_links.py | 114 + .../models/plans_list_get_response_meta.py | 63 + .../models/plans_list_post_request.py | 83 + .../plans_list_post_request_data_item.py | 129 + ..._list_post_request_data_item_attributes.py | 330 ++ ...t_data_item_attributes_calculation_type.py | 12 + ...equest_data_item_attributes_description.py | 88 + ...t_data_item_attributes_description_type.py | 11 + ..._data_item_attributes_home_page_content.py | 94 + ..._item_attributes_home_page_content_type.py | 12 + ...st_post_request_data_item_relationships.py | 176 + ..._request_data_item_relationships_parent.py | 88 + ...est_data_item_relationships_parent_data.py | 90 + ...ata_item_relationships_parent_data_type.py | 11 + ...st_data_item_relationships_project_span.py | 90 + ...em_relationships_project_span_data_item.py | 93 + ...lationships_project_span_data_item_type.py | 13 + ...equest_data_item_relationships_template.py | 88 + ...t_data_item_relationships_template_data.py | 94 + ...a_item_relationships_template_data_type.py | 11 + ...uest_data_item_relationships_work_items.py | 90 + ...item_relationships_work_items_data_item.py | 95 + ...relationships_work_items_data_item_type.py | 13 + .../plans_list_post_request_data_item_type.py | 11 + .../models/plans_list_post_response.py | 83 + .../plans_list_post_response_data_item.py | 108 + ...lans_list_post_response_data_item_links.py | 74 + ...plans_list_post_response_data_item_type.py | 11 + .../models/plans_single_get_response.py | 131 + .../models/plans_single_get_response_data.py | 189 + ...ans_single_get_response_data_attributes.py | 362 ++ ...sponse_data_attributes_calculation_type.py | 12 + ...et_response_data_attributes_description.py | 86 + ...sponse_data_attributes_description_type.py | 11 + ...ponse_data_attributes_home_page_content.py | 90 + ..._data_attributes_home_page_content_type.py | 12 + .../plans_single_get_response_data_links.py | 74 + .../plans_single_get_response_data_meta.py | 87 + ...ngle_get_response_data_meta_errors_item.py | 114 + ...t_response_data_meta_errors_item_source.py | 106 + ...e_data_meta_errors_item_source_resource.py | 81 + ..._single_get_response_data_relationships.py | 226 + ..._get_response_data_relationships_author.py | 86 + ...response_data_relationships_author_data.py | 97 + ...nse_data_relationships_author_data_type.py | 11 + ..._get_response_data_relationships_parent.py | 86 + ...response_data_relationships_parent_data.py | 97 + ...nse_data_relationships_parent_data_type.py | 11 + ...get_response_data_relationships_project.py | 88 + ...esponse_data_relationships_project_data.py | 99 + ...se_data_relationships_project_data_type.py | 11 + ...esponse_data_relationships_project_span.py | 118 + ...ta_relationships_project_span_data_item.py | 104 + ...lationships_project_span_data_item_type.py | 13 + ...se_data_relationships_project_span_meta.py | 71 + ...et_response_data_relationships_template.py | 88 + ...sponse_data_relationships_template_data.py | 99 + ...e_data_relationships_template_data_type.py | 11 + ..._response_data_relationships_work_items.py | 119 + ...data_relationships_work_items_data_item.py | 103 + ...relationships_work_items_data_item_type.py | 11 + ...onse_data_relationships_work_items_meta.py | 65 + .../plans_single_get_response_data_type.py | 11 + ...plans_single_get_response_included_item.py | 49 + .../models/plans_single_get_response_links.py | 64 + .../models/plans_single_patch_request.py | 80 + .../models/plans_single_patch_request_data.py | 136 + ...ns_single_patch_request_data_attributes.py | 323 ++ ...equest_data_attributes_calculation_type.py | 12 + ...tch_request_data_attributes_description.py | 88 + ...equest_data_attributes_description_type.py | 11 + ...quest_data_attributes_home_page_content.py | 90 + ..._data_attributes_home_page_content_type.py | 12 + ...single_patch_request_data_relationships.py | 146 + ...patch_request_data_relationships_parent.py | 88 + ..._request_data_relationships_parent_data.py | 90 + ...est_data_relationships_parent_data_type.py | 11 + ...request_data_relationships_project_span.py | 90 + ...ta_relationships_project_span_data_item.py | 93 + ...lationships_project_span_data_item_type.py | 13 + ...h_request_data_relationships_work_items.py | 90 + ...data_relationships_work_items_data_item.py | 95 + ...relationships_work_items_data_item_type.py | 11 + .../plans_single_patch_request_data_type.py | 11 + .../post_document_attachments_request_body.py | 7 +- .../models/post_icons_request_body.py | 127 + .../models/post_import_action_request_body.py | 121 + .../post_page_attachments_request_body.py | 7 +- ...st_test_record_attachments_request_body.py | 133 + .../post_test_run_attachments_request_body.py | 131 + ...st_step_result_attachments_request_body.py | 135 + ...post_work_item_attachments_request_body.py | 7 +- .../models/projects_list_get_response.py | 17 +- .../projects_list_get_response_data_item.py | 19 +- ..._list_get_response_data_item_attributes.py | 28 +- ...sponse_data_item_attributes_description.py | 7 +- ...jects_list_get_response_data_item_links.py | 5 +- ...ojects_list_get_response_data_item_meta.py | 6 +- ...get_response_data_item_meta_errors_item.py | 18 +- ...ponse_data_item_meta_errors_item_source.py | 45 +- ...a_item_meta_errors_item_source_resource.py | 77 + ...st_get_response_data_item_relationships.py | 5 +- ...t_response_data_item_relationships_lead.py | 5 +- ...ponse_data_item_relationships_lead_data.py | 10 +- .../projects_list_get_response_links.py | 22 +- .../models/projects_list_get_response_meta.py | 5 +- .../models/projects_single_get_response.py | 14 +- .../projects_single_get_response_data.py | 19 +- ...cts_single_get_response_data_attributes.py | 28 +- ...et_response_data_attributes_description.py | 7 +- ...projects_single_get_response_data_links.py | 5 +- .../projects_single_get_response_data_meta.py | 6 +- ...ngle_get_response_data_meta_errors_item.py | 18 +- ...t_response_data_meta_errors_item_source.py | 44 +- ...e_data_meta_errors_item_source_resource.py | 77 + ..._single_get_response_data_relationships.py | 5 +- ...le_get_response_data_relationships_lead.py | 5 +- ...t_response_data_relationships_lead_data.py | 10 +- .../projects_single_get_response_links.py | 5 +- .../models/projects_single_patch_request.py | 80 + .../projects_single_patch_request_data.py | 142 + ...ts_single_patch_request_data_attributes.py | 185 + ...tch_request_data_attributes_description.py | 90 + ...equest_data_attributes_description_type.py | 11 + ...single_patch_request_data_relationships.py | 86 + ...e_patch_request_data_relationships_lead.py | 88 + ...ch_request_data_relationships_lead_data.py | 90 + ...quest_data_relationships_lead_data_type.py | 11 + ...projects_single_patch_request_data_type.py | 11 + .../projecttemplates_list_get_response.py | 162 + ...cttemplates_list_get_response_data_item.py | 173 + ..._list_get_response_data_item_attributes.py | 144 + ...esponse_data_item_attributes_parameters.py | 55 + ...lates_list_get_response_data_item_links.py | 66 + ...plates_list_get_response_data_item_meta.py | 89 + ...get_response_data_item_meta_errors_item.py | 120 + ...ponse_data_item_meta_errors_item_source.py | 111 + ...a_item_meta_errors_item_source_resource.py | 78 + ...plates_list_get_response_data_item_type.py | 11 + ...mplates_list_get_response_included_item.py | 51 + ...rojecttemplates_list_get_response_links.py | 104 + ...projecttemplates_list_get_response_meta.py | 63 + .../models/relationship_data_body.py | 80 + .../models/relationship_data_body_type.py | 49 + .../models/relationship_data_list_request.py | 79 + .../models/relationship_data_list_response.py | 79 + .../relationship_data_single_request.py | 76 + .../relationship_data_single_response.py | 76 + .../relationships_list_delete_request.py | 85 + ...tionships_list_delete_request_data_item.py | 84 + ...hips_list_delete_request_data_item_type.py | 49 + .../models/resource_reference.py | 20 +- .../models/revisions_list_get_response.py | 160 + .../revisions_list_get_response_data_item.py | 195 + ..._list_get_response_data_item_attributes.py | 110 + ...sions_list_get_response_data_item_links.py | 65 + ...isions_list_get_response_data_item_meta.py | 91 + ...get_response_data_item_meta_errors_item.py | 118 + ...ponse_data_item_meta_errors_item_source.py | 111 + ...a_item_meta_errors_item_source_resource.py | 77 + ...st_get_response_data_item_relationships.py | 90 + ...response_data_item_relationships_author.py | 88 + ...nse_data_item_relationships_author_data.py | 105 + ...ata_item_relationships_author_data_type.py | 11 + ...isions_list_get_response_data_item_type.py | 11 + ...visions_list_get_response_included_item.py | 49 + .../revisions_list_get_response_links.py | 104 + .../revisions_list_get_response_meta.py | 63 + .../models/revisions_single_get_response.py | 133 + .../revisions_single_get_response_data.py | 195 + ...ons_single_get_response_data_attributes.py | 110 + ...evisions_single_get_response_data_links.py | 63 + ...revisions_single_get_response_data_meta.py | 89 + ...ngle_get_response_data_meta_errors_item.py | 118 + ...t_response_data_meta_errors_item_source.py | 106 + ...e_data_meta_errors_item_source_resource.py | 77 + ..._single_get_response_data_relationships.py | 88 + ..._get_response_data_relationships_author.py | 88 + ...response_data_relationships_author_data.py | 99 + ...nse_data_relationships_author_data_type.py | 11 + ...revisions_single_get_response_data_type.py | 11 + ...sions_single_get_response_included_item.py | 51 + .../revisions_single_get_response_links.py | 63 + .../models/set_license_request_body.py | 13 +- .../open_api_client/models/sparse_fields.py | 242 +- ...parameter_definitions_list_get_response.py | 170 + ...definitions_list_get_response_data_item.py | 185 + ..._list_get_response_data_item_attributes.py | 67 + ...tions_list_get_response_data_item_links.py | 66 + ...itions_list_get_response_data_item_meta.py | 90 + ...get_response_data_item_meta_errors_item.py | 120 + ...ponse_data_item_meta_errors_item_source.py | 112 + ...a_item_meta_errors_item_source_resource.py | 78 + ...itions_list_get_response_data_item_type.py | 11 + ...nitions_list_get_response_included_item.py | 51 + ...ter_definitions_list_get_response_links.py | 106 + ...eter_definitions_list_get_response_meta.py | 65 + ...parameter_definitions_list_post_request.py | 91 + ...definitions_list_post_request_data_item.py | 109 + ..._list_post_request_data_item_attributes.py | 67 + ...itions_list_post_request_data_item_type.py | 11 + ...arameter_definitions_list_post_response.py | 91 + ...efinitions_list_post_response_data_item.py | 120 + ...ions_list_post_response_data_item_links.py | 66 + ...tions_list_post_response_data_item_type.py | 11 + ...rameter_definitions_single_get_response.py | 141 + ...er_definitions_single_get_response_data.py | 181 + ...ons_single_get_response_data_attributes.py | 71 + ...initions_single_get_response_data_links.py | 66 + ...finitions_single_get_response_data_meta.py | 90 + ...ngle_get_response_data_meta_errors_item.py | 120 + ...t_response_data_meta_errors_item_source.py | 112 + ...e_data_meta_errors_item_source_resource.py | 78 + ...finitions_single_get_response_data_type.py | 11 + ...tions_single_get_response_included_item.py | 51 + ...r_definitions_single_get_response_links.py | 66 + .../testparameters_list_get_response.py | 162 + ...tparameters_list_get_response_data_item.py | 203 + ..._list_get_response_data_item_attributes.py | 74 + ...eters_list_get_response_data_item_links.py | 66 + ...meters_list_get_response_data_item_meta.py | 91 + ...get_response_data_item_meta_errors_item.py | 116 + ...ponse_data_item_meta_errors_item_source.py | 111 + ...a_item_meta_errors_item_source_resource.py | 78 + ...st_get_response_data_item_relationships.py | 88 + ...onse_data_item_relationships_definition.py | 92 + ...data_item_relationships_definition_data.py | 104 + ...item_relationships_definition_data_type.py | 13 + ...meters_list_get_response_data_item_type.py | 11 + ...ameters_list_get_response_included_item.py | 51 + .../testparameters_list_get_response_links.py | 104 + .../testparameters_list_get_response_meta.py | 63 + .../testparameters_list_post_request.py | 85 + ...tparameters_list_post_request_data_item.py | 109 + ..._list_post_request_data_item_attributes.py | 74 + ...meters_list_post_request_data_item_type.py | 11 + .../testparameters_list_post_response.py | 85 + ...parameters_list_post_response_data_item.py | 112 + ...ters_list_post_response_data_item_links.py | 66 + ...eters_list_post_response_data_item_type.py | 11 + .../testparameters_single_get_response.py | 135 + ...testparameters_single_get_response_data.py | 197 + ...ers_single_get_response_data_attributes.py | 74 + ...rameters_single_get_response_data_links.py | 66 + ...arameters_single_get_response_data_meta.py | 91 + ...ngle_get_response_data_meta_errors_item.py | 116 + ...t_response_data_meta_errors_item_source.py | 115 + ...e_data_meta_errors_item_source_resource.py | 78 + ..._single_get_response_data_relationships.py | 88 + ..._response_data_relationships_definition.py | 91 + ...onse_data_relationships_definition_data.py | 103 + ...data_relationships_definition_data_type.py | 13 + ...arameters_single_get_response_data_type.py | 11 + ...eters_single_get_response_included_item.py | 51 + ...estparameters_single_get_response_links.py | 64 + ...estrecord_attachments_list_get_response.py | 164 + ...attachments_list_get_response_data_item.py | 209 + ..._list_get_response_data_item_attributes.py | 116 + ...ments_list_get_response_data_item_links.py | 76 + ...hments_list_get_response_data_item_meta.py | 90 + ...get_response_data_item_meta_errors_item.py | 120 + ...ponse_data_item_meta_errors_item_source.py | 112 + ...a_item_meta_errors_item_source_resource.py | 78 + ...st_get_response_data_item_relationships.py | 122 + ...response_data_item_relationships_author.py | 93 + ...nse_data_item_relationships_author_data.py | 104 + ...ata_item_relationships_author_data_type.py | 13 + ...esponse_data_item_relationships_project.py | 93 + ...se_data_item_relationships_project_data.py | 104 + ...ta_item_relationships_project_data_type.py | 13 + ...hments_list_get_response_data_item_type.py | 11 + ...chments_list_get_response_included_item.py | 51 + ...ord_attachments_list_get_response_links.py | 106 + ...cord_attachments_list_get_response_meta.py | 65 + ...estrecord_attachments_list_post_request.py | 87 + ...attachments_list_post_request_data_item.py | 118 + ..._list_post_request_data_item_attributes.py | 80 + ...hments_list_post_request_data_item_type.py | 11 + ...strecord_attachments_list_post_response.py | 89 + ...ttachments_list_post_response_data_item.py | 118 + ...ents_list_post_response_data_item_links.py | 76 + ...ments_list_post_response_data_item_type.py | 11 + ...trecord_attachments_single_get_response.py | 139 + ...rd_attachments_single_get_response_data.py | 207 + ...nts_single_get_response_data_attributes.py | 110 + ...achments_single_get_response_data_links.py | 76 + ...tachments_single_get_response_data_meta.py | 89 + ...ngle_get_response_data_meta_errors_item.py | 119 + ...t_response_data_meta_errors_item_source.py | 111 + ...e_data_meta_errors_item_source_resource.py | 78 + ..._single_get_response_data_relationships.py | 124 + ..._get_response_data_relationships_author.py | 92 + ...response_data_relationships_author_data.py | 104 + ...nse_data_relationships_author_data_type.py | 13 + ...get_response_data_relationships_project.py | 92 + ...esponse_data_relationships_project_data.py | 104 + ...se_data_relationships_project_data_type.py | 13 + ...tachments_single_get_response_data_type.py | 11 + ...ments_single_get_response_included_item.py | 51 + ...d_attachments_single_get_response_links.py | 66 + .../models/testrecords_list_get_response.py | 160 + ...testrecords_list_get_response_data_item.py | 197 + ..._list_get_response_data_item_attributes.py | 144 + ...t_response_data_item_attributes_comment.py | 90 + ...ponse_data_item_attributes_comment_type.py | 12 + ...cords_list_get_response_data_item_links.py | 66 + ...ecords_list_get_response_data_item_meta.py | 91 + ...get_response_data_item_meta_errors_item.py | 116 + ...ponse_data_item_meta_errors_item_source.py | 114 + ...a_item_meta_errors_item_source_resource.py | 77 + ...st_get_response_data_item_relationships.py | 144 + ...response_data_item_relationships_defect.py | 88 + ...nse_data_item_relationships_defect_data.py | 104 + ...ata_item_relationships_defect_data_type.py | 11 + ...nse_data_item_relationships_executed_by.py | 91 + ...ata_item_relationships_executed_by_data.py | 103 + ...tem_relationships_executed_by_data_type.py | 13 + ...ponse_data_item_relationships_test_case.py | 94 + ..._data_item_relationships_test_case_data.py | 102 + ..._item_relationships_test_case_data_type.py | 13 + ...ecords_list_get_response_data_item_type.py | 11 + ...records_list_get_response_included_item.py | 51 + .../testrecords_list_get_response_links.py | 104 + .../testrecords_list_get_response_meta.py | 63 + .../models/testrecords_list_post_request.py | 85 + ...testrecords_list_post_request_data_item.py | 135 + ..._list_post_request_data_item_attributes.py | 135 + ...st_request_data_item_attributes_comment.py | 90 + ...quest_data_item_attributes_comment_type.py | 12 + ...st_post_request_data_item_relationships.py | 144 + ..._request_data_item_relationships_defect.py | 88 + ...est_data_item_relationships_defect_data.py | 95 + ...ata_item_relationships_defect_data_type.py | 11 + ...est_data_item_relationships_executed_by.py | 91 + ...ata_item_relationships_executed_by_data.py | 94 + ...tem_relationships_executed_by_data_type.py | 13 + ...quest_data_item_relationships_test_case.py | 94 + ..._data_item_relationships_test_case_data.py | 93 + ..._item_relationships_test_case_data_type.py | 13 + ...ecords_list_post_request_data_item_type.py | 11 + .../models/testrecords_list_post_response.py | 85 + ...estrecords_list_post_response_data_item.py | 108 + ...ords_list_post_response_data_item_links.py | 66 + ...cords_list_post_response_data_item_type.py | 11 + .../models/testrecords_single_get_response.py | 133 + .../testrecords_single_get_response_data.py | 195 + ...rds_single_get_response_data_attributes.py | 144 + ...le_get_response_data_attributes_comment.py | 88 + ...t_response_data_attributes_comment_type.py | 12 + ...trecords_single_get_response_data_links.py | 66 + ...strecords_single_get_response_data_meta.py | 89 + ...ngle_get_response_data_meta_errors_item.py | 118 + ...t_response_data_meta_errors_item_source.py | 107 + ...e_data_meta_errors_item_source_resource.py | 77 + ..._single_get_response_data_relationships.py | 146 + ..._get_response_data_relationships_defect.py | 88 + ...response_data_relationships_defect_data.py | 105 + ...nse_data_relationships_defect_data_type.py | 11 + ...response_data_relationships_executed_by.py | 94 + ...nse_data_relationships_executed_by_data.py | 102 + ...ata_relationships_executed_by_data_type.py | 13 + ...t_response_data_relationships_test_case.py | 88 + ...ponse_data_relationships_test_case_data.py | 104 + ..._data_relationships_test_case_data_type.py | 11 + ...strecords_single_get_response_data_type.py | 11 + ...cords_single_get_response_included_item.py | 51 + .../testrecords_single_get_response_links.py | 64 + .../testrecords_single_patch_request.py | 80 + .../testrecords_single_patch_request_data.py | 142 + ...ds_single_patch_request_data_attributes.py | 135 + ...e_patch_request_data_attributes_comment.py | 90 + ...ch_request_data_attributes_comment_type.py | 12 + ...single_patch_request_data_relationships.py | 118 + ...patch_request_data_relationships_defect.py | 88 + ..._request_data_relationships_defect_data.py | 98 + ...est_data_relationships_defect_data_type.py | 11 + ..._request_data_relationships_executed_by.py | 94 + ...est_data_relationships_executed_by_data.py | 93 + ...ata_relationships_executed_by_data_type.py | 13 + ...trecords_single_patch_request_data_type.py | 11 + .../testrun_attachments_list_get_response.py | 164 + ...attachments_list_get_response_data_item.py | 205 + ..._list_get_response_data_item_attributes.py | 110 + ...ments_list_get_response_data_item_links.py | 76 + ...hments_list_get_response_data_item_meta.py | 89 + ...get_response_data_item_meta_errors_item.py | 119 + ...ponse_data_item_meta_errors_item_source.py | 111 + ...a_item_meta_errors_item_source_resource.py | 78 + ...st_get_response_data_item_relationships.py | 123 + ...response_data_item_relationships_author.py | 92 + ...nse_data_item_relationships_author_data.py | 104 + ...ata_item_relationships_author_data_type.py | 13 + ...esponse_data_item_relationships_project.py | 92 + ...se_data_item_relationships_project_data.py | 104 + ...ta_item_relationships_project_data_type.py | 13 + ...hments_list_get_response_data_item_type.py | 11 + ...chments_list_get_response_included_item.py | 51 + ...run_attachments_list_get_response_links.py | 106 + ...trun_attachments_list_get_response_meta.py | 65 + .../testrun_attachments_list_post_request.py | 87 + ...attachments_list_post_request_data_item.py | 118 + ..._list_post_request_data_item_attributes.py | 74 + ...hments_list_post_request_data_item_type.py | 11 + .../testrun_attachments_list_post_response.py | 87 + ...ttachments_list_post_response_data_item.py | 114 + ...ents_list_post_response_data_item_links.py | 76 + ...ments_list_post_response_data_item_type.py | 11 + ...testrun_attachments_single_get_response.py | 135 + ...un_attachments_single_get_response_data.py | 203 + ...nts_single_get_response_data_attributes.py | 110 + ...achments_single_get_response_data_links.py | 76 + ...tachments_single_get_response_data_meta.py | 89 + ...ngle_get_response_data_meta_errors_item.py | 120 + ...t_response_data_meta_errors_item_source.py | 111 + ...e_data_meta_errors_item_source_resource.py | 78 + ..._single_get_response_data_relationships.py | 116 + ..._get_response_data_relationships_author.py | 91 + ...response_data_relationships_author_data.py | 103 + ...nse_data_relationships_author_data_type.py | 13 + ...get_response_data_relationships_project.py | 92 + ...esponse_data_relationships_project_data.py | 104 + ...se_data_relationships_project_data_type.py | 13 + ...tachments_single_get_response_data_type.py | 11 + ...ments_single_get_response_included_item.py | 51 + ...n_attachments_single_get_response_links.py | 66 + ...estrun_attachments_single_patch_request.py | 80 + ...n_attachments_single_patch_request_data.py | 118 + ...ts_single_patch_request_data_attributes.py | 65 + ...achments_single_patch_request_data_type.py | 11 + .../testrun_comments_list_get_response.py | 162 + ...un_comments_list_get_response_data_item.py | 203 + ..._list_get_response_data_item_attributes.py | 135 + ..._get_response_data_item_attributes_text.py | 90 + ...response_data_item_attributes_text_type.py | 12 + ...ments_list_get_response_data_item_links.py | 66 + ...mments_list_get_response_data_item_meta.py | 91 + ...get_response_data_item_meta_errors_item.py | 120 + ...ponse_data_item_meta_errors_item_source.py | 111 + ...a_item_meta_errors_item_source_resource.py | 78 + ...st_get_response_data_item_relationships.py | 176 + ...response_data_item_relationships_author.py | 91 + ...nse_data_item_relationships_author_data.py | 103 + ...ata_item_relationships_author_data_type.py | 13 + ..._data_item_relationships_child_comments.py | 125 + ..._relationships_child_comments_data_item.py | 104 + ...tionships_child_comments_data_item_type.py | 13 + ..._item_relationships_child_comments_meta.py | 68 + ..._data_item_relationships_parent_comment.py | 93 + ..._item_relationships_parent_comment_data.py | 104 + ..._relationships_parent_comment_data_type.py | 13 + ...esponse_data_item_relationships_project.py | 91 + ...se_data_item_relationships_project_data.py | 103 + ...ta_item_relationships_project_data_type.py | 13 + ...mments_list_get_response_data_item_type.py | 11 + ...omments_list_get_response_included_item.py | 51 + ...estrun_comments_list_get_response_links.py | 104 + ...testrun_comments_list_get_response_meta.py | 63 + .../testrun_comments_list_post_request.py | 85 + ...un_comments_list_post_request_data_item.py | 139 + ..._list_post_request_data_item_attributes.py | 108 + ..._post_request_data_item_attributes_text.py | 90 + ..._request_data_item_attributes_text_type.py | 12 + ...st_post_request_data_item_relationships.py | 118 + ..._request_data_item_relationships_author.py | 91 + ...est_data_item_relationships_author_data.py | 94 + ...ata_item_relationships_author_data_type.py | 13 + ..._data_item_relationships_parent_comment.py | 93 + ..._item_relationships_parent_comment_data.py | 95 + ..._relationships_parent_comment_data_type.py | 13 + ...mments_list_post_request_data_item_type.py | 11 + .../testrun_comments_list_post_response.py | 85 + ...n_comments_list_post_response_data_item.py | 112 + ...ents_list_post_response_data_item_links.py | 66 + ...ments_list_post_response_data_item_type.py | 11 + .../testrun_comments_single_get_response.py | 135 + ...strun_comments_single_get_response_data.py | 199 + ...nts_single_get_response_data_attributes.py | 133 + ...ingle_get_response_data_attributes_text.py | 90 + ..._get_response_data_attributes_text_type.py | 12 + ...comments_single_get_response_data_links.py | 66 + ..._comments_single_get_response_data_meta.py | 91 + ...ngle_get_response_data_meta_errors_item.py | 116 + ...t_response_data_meta_errors_item_source.py | 111 + ...e_data_meta_errors_item_source_resource.py | 78 + ..._single_get_response_data_relationships.py | 174 + ..._get_response_data_relationships_author.py | 94 + ...response_data_relationships_author_data.py | 102 + ...nse_data_relationships_author_data_type.py | 13 + ...ponse_data_relationships_child_comments.py | 124 + ..._relationships_child_comments_data_item.py | 104 + ...tionships_child_comments_data_item_type.py | 13 + ..._data_relationships_child_comments_meta.py | 68 + ...ponse_data_relationships_parent_comment.py | 92 + ..._data_relationships_parent_comment_data.py | 104 + ..._relationships_parent_comment_data_type.py | 13 + ...get_response_data_relationships_project.py | 94 + ...esponse_data_relationships_project_data.py | 102 + ...se_data_relationships_project_data_type.py | 13 + ..._comments_single_get_response_data_type.py | 11 + ...ments_single_get_response_included_item.py | 51 + ...trun_comments_single_get_response_links.py | 66 + .../testrun_comments_single_patch_request.py | 80 + ...trun_comments_single_patch_request_data.py | 118 + ...ts_single_patch_request_data_attributes.py | 65 + ...comments_single_patch_request_data_type.py | 11 + .../models/testruns_list_get_response.py | 158 + .../testruns_list_get_response_data_item.py | 195 + ..._list_get_response_data_item_attributes.py | 256 + ..._data_item_attributes_home_page_content.py | 94 + ..._item_attributes_home_page_content_type.py | 12 + ...ta_item_attributes_select_test_cases_by.py | 16 + ...truns_list_get_response_data_item_links.py | 76 + ...struns_list_get_response_data_item_meta.py | 89 + ...get_response_data_item_meta_errors_item.py | 118 + ...ponse_data_item_meta_errors_item_source.py | 107 + ...a_item_meta_errors_item_source_resource.py | 77 + ...st_get_response_data_item_relationships.py | 236 + ...response_data_item_relationships_author.py | 88 + ...nse_data_item_relationships_author_data.py | 105 + ...ata_item_relationships_author_data_type.py | 11 + ...sponse_data_item_relationships_document.py | 88 + ...e_data_item_relationships_document_data.py | 103 + ...a_item_relationships_document_data_type.py | 11 + ...esponse_data_item_relationships_project.py | 88 + ...se_data_item_relationships_project_data.py | 105 + ...ta_item_relationships_project_data_type.py | 11 + ...se_data_item_relationships_project_span.py | 126 + ...em_relationships_project_span_data_item.py | 104 + ...lationships_project_span_data_item_type.py | 13 + ...ta_item_relationships_project_span_meta.py | 67 + ..._data_item_relationships_summary_defect.py | 91 + ..._item_relationships_summary_defect_data.py | 103 + ..._relationships_summary_defect_data_type.py | 13 + ...sponse_data_item_relationships_template.py | 88 + ...e_data_item_relationships_template_data.py | 103 + ...a_item_relationships_template_data_type.py | 11 + ...struns_list_get_response_data_item_type.py | 11 + ...estruns_list_get_response_included_item.py | 49 + .../testruns_list_get_response_links.py | 114 + .../models/testruns_list_get_response_meta.py | 63 + .../models/testruns_list_post_request.py | 85 + .../testruns_list_post_request_data_item.py | 133 + ..._list_post_request_data_item_attributes.py | 224 + ..._data_item_attributes_home_page_content.py | 94 + ..._item_attributes_home_page_content_type.py | 12 + ...ta_item_attributes_select_test_cases_by.py | 16 + ...st_post_request_data_item_relationships.py | 176 + ...equest_data_item_relationships_document.py | 88 + ...t_data_item_relationships_document_data.py | 94 + ...a_item_relationships_document_data_type.py | 11 + ...st_data_item_relationships_project_span.py | 98 + ...em_relationships_project_span_data_item.py | 95 + ...lationships_project_span_data_item_type.py | 13 + ..._data_item_relationships_summary_defect.py | 91 + ..._item_relationships_summary_defect_data.py | 94 + ..._relationships_summary_defect_data_type.py | 13 + ...equest_data_item_relationships_template.py | 88 + ...t_data_item_relationships_template_data.py | 94 + ...a_item_relationships_template_data_type.py | 11 + ...struns_list_post_request_data_item_type.py | 11 + .../models/testruns_list_post_response.py | 85 + .../testruns_list_post_response_data_item.py | 108 + ...runs_list_post_response_data_item_links.py | 76 + ...truns_list_post_response_data_item_type.py | 11 + .../models/testruns_single_get_response.py | 133 + .../testruns_single_get_response_data.py | 191 + ...uns_single_get_response_data_attributes.py | 256 + ...ponse_data_attributes_home_page_content.py | 96 + ..._data_attributes_home_page_content_type.py | 12 + ...se_data_attributes_select_test_cases_by.py | 16 + ...testruns_single_get_response_data_links.py | 74 + .../testruns_single_get_response_data_meta.py | 89 + ...ngle_get_response_data_meta_errors_item.py | 116 + ...t_response_data_meta_errors_item_source.py | 106 + ...e_data_meta_errors_item_source_resource.py | 77 + ..._single_get_response_data_relationships.py | 234 + ..._get_response_data_relationships_author.py | 90 + ...response_data_relationships_author_data.py | 99 + ...nse_data_relationships_author_data_type.py | 11 + ...et_response_data_relationships_document.py | 88 + ...sponse_data_relationships_document_data.py | 105 + ...e_data_relationships_document_data_type.py | 11 + ...get_response_data_relationships_project.py | 88 + ...esponse_data_relationships_project_data.py | 99 + ...se_data_relationships_project_data_type.py | 11 + ...esponse_data_relationships_project_span.py | 118 + ...ta_relationships_project_span_data_item.py | 103 + ...lationships_project_span_data_item_type.py | 13 + ...se_data_relationships_project_span_meta.py | 67 + ...ponse_data_relationships_summary_defect.py | 94 + ..._data_relationships_summary_defect_data.py | 102 + ..._relationships_summary_defect_data_type.py | 13 + ...et_response_data_relationships_template.py | 88 + ...sponse_data_relationships_template_data.py | 105 + ...e_data_relationships_template_data_type.py | 11 + .../testruns_single_get_response_data_type.py | 11 + ...truns_single_get_response_included_item.py | 51 + .../testruns_single_get_response_links.py | 64 + .../models/testruns_single_patch_request.py | 80 + .../testruns_single_patch_request_data.py | 142 + ...ns_single_patch_request_data_attributes.py | 206 + ...quest_data_attributes_home_page_content.py | 96 + ..._data_attributes_home_page_content_type.py | 12 + ...st_data_attributes_select_test_cases_by.py | 16 + ...single_patch_request_data_relationships.py | 146 + ...tch_request_data_relationships_document.py | 88 + ...equest_data_relationships_document_data.py | 96 + ...t_data_relationships_document_data_type.py | 11 + ...request_data_relationships_project_span.py | 96 + ...ta_relationships_project_span_data_item.py | 94 + ...lationships_project_span_data_item_type.py | 13 + ...quest_data_relationships_summary_defect.py | 94 + ..._data_relationships_summary_defect_data.py | 93 + ..._relationships_summary_defect_data_type.py | 13 + ...testruns_single_patch_request_data_type.py | 11 + .../teststep_results_list_get_response.py | 162 + ...tep_results_list_get_response_data_item.py | 203 + ..._list_get_response_data_item_attributes.py | 97 + ...t_response_data_item_attributes_comment.py | 96 + ...ponse_data_item_attributes_comment_type.py | 12 + ...sults_list_get_response_data_item_links.py | 66 + ...esults_list_get_response_data_item_meta.py | 91 + ...get_response_data_item_meta_errors_item.py | 120 + ...ponse_data_item_meta_errors_item_source.py | 111 + ...a_item_meta_errors_item_source_resource.py | 78 + ...st_get_response_data_item_relationships.py | 88 + ...ponse_data_item_relationships_test_step.py | 92 + ..._data_item_relationships_test_step_data.py | 104 + ..._item_relationships_test_step_data_type.py | 13 + ...esults_list_get_response_data_item_type.py | 11 + ...results_list_get_response_included_item.py | 51 + ...eststep_results_list_get_response_links.py | 104 + ...teststep_results_list_get_response_meta.py | 63 + .../teststep_results_list_post_request.py | 85 + ...tep_results_list_post_request_data_item.py | 109 + ..._list_post_request_data_item_attributes.py | 97 + ...st_request_data_item_attributes_comment.py | 96 + ...quest_data_item_attributes_comment_type.py | 12 + ...esults_list_post_request_data_item_type.py | 11 + .../teststep_results_list_post_response.py | 85 + ...ep_results_list_post_response_data_item.py | 112 + ...ults_list_post_response_data_item_links.py | 66 + ...sults_list_post_response_data_item_type.py | 11 + .../teststep_results_single_get_response.py | 135 + ...ststep_results_single_get_response_data.py | 199 + ...lts_single_get_response_data_attributes.py | 97 + ...le_get_response_data_attributes_comment.py | 90 + ...t_response_data_attributes_comment_type.py | 12 + ..._results_single_get_response_data_links.py | 66 + ...p_results_single_get_response_data_meta.py | 91 + ...ngle_get_response_data_meta_errors_item.py | 116 + ...t_response_data_meta_errors_item_source.py | 111 + ...e_data_meta_errors_item_source_resource.py | 78 + ..._single_get_response_data_relationships.py | 88 + ...t_response_data_relationships_test_step.py | 91 + ...ponse_data_relationships_test_step_data.py | 103 + ..._data_relationships_test_step_data_type.py | 13 + ...p_results_single_get_response_data_type.py | 11 + ...sults_single_get_response_included_item.py | 51 + ...tstep_results_single_get_response_links.py | 66 + ...tepresult_attachments_list_get_response.py | 174 + ...attachments_list_get_response_data_item.py | 216 + ..._list_get_response_data_item_attributes.py | 112 + ...ments_list_get_response_data_item_links.py | 76 + ...hments_list_get_response_data_item_meta.py | 90 + ...get_response_data_item_meta_errors_item.py | 120 + ...ponse_data_item_meta_errors_item_source.py | 112 + ...a_item_meta_errors_item_source_resource.py | 78 + ...st_get_response_data_item_relationships.py | 122 + ...response_data_item_relationships_author.py | 93 + ...nse_data_item_relationships_author_data.py | 104 + ...ata_item_relationships_author_data_type.py | 13 + ...esponse_data_item_relationships_project.py | 93 + ...se_data_item_relationships_project_data.py | 104 + ...ta_item_relationships_project_data_type.py | 13 + ...hments_list_get_response_data_item_type.py | 11 + ...chments_list_get_response_included_item.py | 51 + ...ult_attachments_list_get_response_links.py | 106 + ...sult_attachments_list_get_response_meta.py | 65 + ...tepresult_attachments_list_post_request.py | 91 + ...attachments_list_post_request_data_item.py | 120 + ..._list_post_request_data_item_attributes.py | 76 + ...hments_list_post_request_data_item_type.py | 11 + ...epresult_attachments_list_post_response.py | 91 + ...ttachments_list_post_response_data_item.py | 120 + ...ents_list_post_response_data_item_links.py | 82 + ...ments_list_post_response_data_item_type.py | 11 + ...presult_attachments_single_get_response.py | 143 + ...lt_attachments_single_get_response_data.py | 213 + ...nts_single_get_response_data_attributes.py | 116 + ...achments_single_get_response_data_links.py | 76 + ...tachments_single_get_response_data_meta.py | 90 + ...ngle_get_response_data_meta_errors_item.py | 120 + ...t_response_data_meta_errors_item_source.py | 112 + ...e_data_meta_errors_item_source_resource.py | 78 + ..._single_get_response_data_relationships.py | 122 + ..._get_response_data_relationships_author.py | 93 + ...response_data_relationships_author_data.py | 104 + ...nse_data_relationships_author_data_type.py | 13 + ...get_response_data_relationships_project.py | 93 + ...esponse_data_relationships_project_data.py | 104 + ...se_data_relationships_project_data_type.py | 13 + ...tachments_single_get_response_data_type.py | 11 + ...ments_single_get_response_included_item.py | 55 + ...t_attachments_single_get_response_links.py | 66 + .../models/teststeps_list_delete_request.py | 85 + ...teststeps_list_delete_request_data_item.py | 82 + ...teps_list_delete_request_data_item_type.py | 11 + .../models/teststeps_list_get_response.py | 160 + .../teststeps_list_get_response_data_item.py | 165 + ..._list_get_response_data_item_attributes.py | 111 + ...sponse_data_item_attributes_values_item.py | 90 + ...e_data_item_attributes_values_item_type.py | 12 + ...steps_list_get_response_data_item_links.py | 66 + ...tsteps_list_get_response_data_item_meta.py | 91 + ...get_response_data_item_meta_errors_item.py | 118 + ...ponse_data_item_meta_errors_item_source.py | 111 + ...a_item_meta_errors_item_source_resource.py | 77 + ...tsteps_list_get_response_data_item_type.py | 11 + ...ststeps_list_get_response_included_item.py | 49 + .../teststeps_list_get_response_links.py | 104 + .../teststeps_list_get_response_meta.py | 63 + .../models/teststeps_list_patch_request.py | 85 + .../teststeps_list_patch_request_data_item.py | 112 + ...list_patch_request_data_item_attributes.py | 100 + ...equest_data_item_attributes_values_item.py | 94 + ...t_data_item_attributes_values_item_type.py | 12 + ...steps_list_patch_request_data_item_type.py | 11 + .../models/teststeps_list_post_request.py | 85 + .../teststeps_list_post_request_data_item.py | 103 + ..._list_post_request_data_item_attributes.py | 102 + ...equest_data_item_attributes_values_item.py | 90 + ...t_data_item_attributes_values_item_type.py | 12 + ...tsteps_list_post_request_data_item_type.py | 11 + .../models/teststeps_list_post_response.py | 85 + .../teststeps_list_post_response_data_item.py | 108 + ...teps_list_post_response_data_item_links.py | 66 + ...steps_list_post_response_data_item_type.py | 11 + .../models/teststeps_single_get_response.py | 133 + .../teststeps_single_get_response_data.py | 165 + ...eps_single_get_response_data_attributes.py | 111 + ...et_response_data_attributes_values_item.py | 90 + ...sponse_data_attributes_values_item_type.py | 12 + ...eststeps_single_get_response_data_links.py | 64 + ...teststeps_single_get_response_data_meta.py | 89 + ...ngle_get_response_data_meta_errors_item.py | 118 + ...t_response_data_meta_errors_item_source.py | 106 + ...e_data_meta_errors_item_source_resource.py | 77 + ...teststeps_single_get_response_data_type.py | 11 + ...steps_single_get_response_included_item.py | 51 + .../teststeps_single_get_response_links.py | 64 + .../models/teststeps_single_patch_request.py | 80 + .../teststeps_single_patch_request_data.py | 112 + ...ps_single_patch_request_data_attributes.py | 102 + ...tch_request_data_attributes_values_item.py | 90 + ...equest_data_attributes_values_item_type.py | 12 + ...eststeps_single_patch_request_data_type.py | 11 + .../models/update_avatar_request_body.py | 92 + .../models/usergroups_single_get_response.py | 14 +- .../usergroups_single_get_response_data.py | 19 +- ...ups_single_get_response_data_attributes.py | 16 +- ...et_response_data_attributes_description.py | 7 +- ...ergroups_single_get_response_data_links.py | 5 +- ...sergroups_single_get_response_data_meta.py | 6 +- ...ngle_get_response_data_meta_errors_item.py | 18 +- ...t_response_data_meta_errors_item_source.py | 45 +- ...e_data_meta_errors_item_source_resource.py | 77 + ..._single_get_response_data_relationships.py | 9 +- ...esponse_data_relationships_global_roles.py | 8 +- ...ta_relationships_global_roles_data_item.py | 7 +- ...se_data_relationships_global_roles_meta.py | 5 +- ...sponse_data_relationships_project_roles.py | 8 +- ...a_relationships_project_roles_data_item.py | 7 +- ...e_data_relationships_project_roles_meta.py | 5 +- ...e_get_response_data_relationships_users.py | 8 +- ...onse_data_relationships_users_data_item.py | 10 +- ..._response_data_relationships_users_meta.py | 5 +- .../usergroups_single_get_response_links.py | 5 +- .../models/users_list_get_response.py | 17 +- .../users_list_get_response_data_item.py | 19 +- ..._list_get_response_data_item_attributes.py | 23 +- ...sponse_data_item_attributes_description.py | 7 +- ...users_list_get_response_data_item_links.py | 5 +- .../users_list_get_response_data_item_meta.py | 6 +- ...get_response_data_item_meta_errors_item.py | 18 +- ...ponse_data_item_meta_errors_item_source.py | 44 +- ...a_item_meta_errors_item_source_resource.py | 77 + ...st_get_response_data_item_relationships.py | 9 +- ...se_data_item_relationships_global_roles.py | 8 +- ...em_relationships_global_roles_data_item.py | 7 +- ...ta_item_relationships_global_roles_meta.py | 5 +- ...e_data_item_relationships_project_roles.py | 8 +- ...m_relationships_project_roles_data_item.py | 7 +- ...a_item_relationships_project_roles_meta.py | 5 +- ...nse_data_item_relationships_user_groups.py | 8 +- ...tem_relationships_user_groups_data_item.py | 10 +- ...ata_item_relationships_user_groups_meta.py | 5 +- .../models/users_list_get_response_links.py | 22 +- .../models/users_list_get_response_meta.py | 5 +- .../models/users_list_post_request.py | 6 +- .../users_list_post_request_data_item.py | 9 +- ..._list_post_request_data_item_attributes.py | 19 +- ...equest_data_item_attributes_description.py | 7 +- ...st_post_request_data_item_relationships.py | 9 +- ...st_data_item_relationships_global_roles.py | 6 +- ...em_relationships_global_roles_data_item.py | 7 +- ...t_data_item_relationships_project_roles.py | 6 +- ...m_relationships_project_roles_data_item.py | 7 +- ...est_data_item_relationships_user_groups.py | 6 +- ...tem_relationships_user_groups_data_item.py | 7 +- .../models/users_list_post_response.py | 6 +- .../users_list_post_response_data_item.py | 10 +- ...sers_list_post_response_data_item_links.py | 5 +- .../models/users_single_get_response.py | 14 +- .../models/users_single_get_response_data.py | 19 +- ...ers_single_get_response_data_attributes.py | 23 +- ...et_response_data_attributes_description.py | 7 +- .../users_single_get_response_data_links.py | 5 +- .../users_single_get_response_data_meta.py | 6 +- ...ngle_get_response_data_meta_errors_item.py | 18 +- ...t_response_data_meta_errors_item_source.py | 44 +- ...e_data_meta_errors_item_source_resource.py | 81 + ..._single_get_response_data_relationships.py | 9 +- ...esponse_data_relationships_global_roles.py | 8 +- ...ta_relationships_global_roles_data_item.py | 7 +- ...se_data_relationships_global_roles_meta.py | 5 +- ...sponse_data_relationships_project_roles.py | 8 +- ...a_relationships_project_roles_data_item.py | 7 +- ...e_data_relationships_project_roles_meta.py | 5 +- ...response_data_relationships_user_groups.py | 8 +- ...ata_relationships_user_groups_data_item.py | 10 +- ...nse_data_relationships_user_groups_meta.py | 5 +- .../models/users_single_get_response_links.py | 5 +- .../models/users_single_patch_request.py | 5 +- .../models/users_single_patch_request_data.py | 12 +- ...rs_single_patch_request_data_attributes.py | 16 +- ...tch_request_data_attributes_description.py | 7 +- ...single_patch_request_data_relationships.py | 9 +- ...request_data_relationships_global_roles.py | 6 +- ...ta_relationships_global_roles_data_item.py | 7 +- ...equest_data_relationships_project_roles.py | 6 +- ...a_relationships_project_roles_data_item.py | 7 +- ..._request_data_relationships_user_groups.py | 6 +- ...ata_relationships_user_groups_data_item.py | 7 +- .../workflow_actions_action_response_body.py | 131 + ..._actions_action_response_body_data_item.py | 161 + ...flow_actions_action_response_body_links.py | 106 + ...kflow_actions_action_response_body_meta.py | 65 + .../workitem_approvals_list_delete_request.py | 87 + ...approvals_list_delete_request_data_item.py | 84 + ...vals_list_delete_request_data_item_type.py | 11 + .../workitem_approvals_list_get_response.py | 164 + ...m_approvals_list_get_response_data_item.py | 205 + ..._list_get_response_data_item_attributes.py | 81 + ...et_response_data_item_attributes_status.py | 13 + ...ovals_list_get_response_data_item_links.py | 66 + ...rovals_list_get_response_data_item_meta.py | 89 + ...get_response_data_item_meta_errors_item.py | 122 + ...ponse_data_item_meta_errors_item_source.py | 111 + ...a_item_meta_errors_item_source_resource.py | 78 + ...st_get_response_data_item_relationships.py | 88 + ...t_response_data_item_relationships_user.py | 91 + ...ponse_data_item_relationships_user_data.py | 103 + ..._data_item_relationships_user_data_type.py | 13 + ...rovals_list_get_response_data_item_type.py | 11 + ...provals_list_get_response_included_item.py | 51 + ...kitem_approvals_list_get_response_links.py | 106 + ...rkitem_approvals_list_get_response_meta.py | 63 + .../workitem_approvals_list_patch_request.py | 87 + ..._approvals_list_patch_request_data_item.py | 118 + ...list_patch_request_data_item_attributes.py | 81 + ...tch_request_data_item_attributes_status.py | 13 + ...ovals_list_patch_request_data_item_type.py | 11 + .../workitem_approvals_list_post_request.py | 87 + ...m_approvals_list_post_request_data_item.py | 137 + ..._list_post_request_data_item_attributes.py | 81 + ...ost_request_data_item_attributes_status.py | 13 + ...st_post_request_data_item_relationships.py | 88 + ...st_request_data_item_relationships_user.py | 91 + ...quest_data_item_relationships_user_data.py | 94 + ..._data_item_relationships_user_data_type.py | 13 + ...rovals_list_post_request_data_item_type.py | 11 + .../workitem_approvals_list_post_response.py | 87 + ..._approvals_list_post_response_data_item.py | 114 + ...vals_list_post_response_data_item_links.py | 66 + ...ovals_list_post_response_data_item_type.py | 11 + .../workitem_approvals_single_get_response.py | 135 + ...item_approvals_single_get_response_data.py | 203 + ...als_single_get_response_data_attributes.py | 81 + ...gle_get_response_data_attributes_status.py | 13 + ...pprovals_single_get_response_data_links.py | 66 + ...approvals_single_get_response_data_meta.py | 91 + ...ngle_get_response_data_meta_errors_item.py | 116 + ...t_response_data_meta_errors_item_source.py | 111 + ...e_data_meta_errors_item_source_resource.py | 78 + ..._single_get_response_data_relationships.py | 88 + ...le_get_response_data_relationships_user.py | 94 + ...t_response_data_relationships_user_data.py | 102 + ...ponse_data_relationships_user_data_type.py | 13 + ...approvals_single_get_response_data_type.py | 11 + ...ovals_single_get_response_included_item.py | 51 + ...tem_approvals_single_get_response_links.py | 66 + ...workitem_approvals_single_patch_request.py | 80 + ...tem_approvals_single_patch_request_data.py | 118 + ...ls_single_patch_request_data_attributes.py | 81 + ...le_patch_request_data_attributes_status.py | 13 + ...pprovals_single_patch_request_data_type.py | 11 + .../workitem_attachments_list_get_response.py | 17 +- ...attachments_list_get_response_data_item.py | 19 +- ..._list_get_response_data_item_attributes.py | 17 +- ...ments_list_get_response_data_item_links.py | 10 +- ...hments_list_get_response_data_item_meta.py | 6 +- ...get_response_data_item_meta_errors_item.py | 18 +- ...ponse_data_item_meta_errors_item_source.py | 47 +- ...a_item_meta_errors_item_source_resource.py | 78 + ...st_get_response_data_item_relationships.py | 7 +- ...response_data_item_relationships_author.py | 5 +- ...nse_data_item_relationships_author_data.py | 10 +- ...esponse_data_item_relationships_project.py | 5 +- ...se_data_item_relationships_project_data.py | 10 +- ...tem_attachments_list_get_response_links.py | 22 +- ...item_attachments_list_get_response_meta.py | 5 +- .../workitem_attachments_list_post_request.py | 6 +- ...attachments_list_post_request_data_item.py | 10 +- ..._list_post_request_data_item_attributes.py | 8 +- ...workitem_attachments_list_post_response.py | 6 +- ...ttachments_list_post_response_data_item.py | 10 +- ...ents_list_post_response_data_item_links.py | 10 +- ...orkitem_attachments_single_get_response.py | 14 +- ...em_attachments_single_get_response_data.py | 19 +- ...nts_single_get_response_data_attributes.py | 17 +- ...achments_single_get_response_data_links.py | 10 +- ...tachments_single_get_response_data_meta.py | 6 +- ...ngle_get_response_data_meta_errors_item.py | 18 +- ...t_response_data_meta_errors_item_source.py | 47 +- ...e_data_meta_errors_item_source_resource.py | 78 + ..._single_get_response_data_relationships.py | 7 +- ..._get_response_data_relationships_author.py | 5 +- ...response_data_relationships_author_data.py | 10 +- ...get_response_data_relationships_project.py | 5 +- ...esponse_data_relationships_project_data.py | 10 +- ...m_attachments_single_get_response_links.py | 6 +- ...rkitem_attachments_single_patch_request.py | 5 +- ...m_attachments_single_patch_request_data.py | 10 +- ...ts_single_patch_request_data_attributes.py | 5 +- .../workitem_comments_list_get_response.py | 17 +- ...em_comments_list_get_response_data_item.py | 19 +- ..._list_get_response_data_item_attributes.py | 15 +- ..._get_response_data_item_attributes_text.py | 7 +- ...ments_list_get_response_data_item_links.py | 6 +- ...mments_list_get_response_data_item_meta.py | 6 +- ...get_response_data_item_meta_errors_item.py | 18 +- ...ponse_data_item_meta_errors_item_source.py | 47 +- ...a_item_meta_errors_item_source_resource.py | 78 + ...st_get_response_data_item_relationships.py | 11 +- ...response_data_item_relationships_author.py | 5 +- ...nse_data_item_relationships_author_data.py | 10 +- ..._data_item_relationships_child_comments.py | 8 +- ..._relationships_child_comments_data_item.py | 10 +- ..._item_relationships_child_comments_meta.py | 5 +- ..._data_item_relationships_parent_comment.py | 5 +- ..._item_relationships_parent_comment_data.py | 10 +- ...esponse_data_item_relationships_project.py | 5 +- ...se_data_item_relationships_project_data.py | 10 +- ...rkitem_comments_list_get_response_links.py | 22 +- ...orkitem_comments_list_get_response_meta.py | 5 +- .../workitem_comments_list_post_request.py | 6 +- ...em_comments_list_post_request_data_item.py | 9 +- ..._list_post_request_data_item_attributes.py | 10 +- ..._post_request_data_item_attributes_text.py | 7 +- ...st_post_request_data_item_relationships.py | 7 +- ..._request_data_item_relationships_author.py | 5 +- ...est_data_item_relationships_author_data.py | 7 +- ..._data_item_relationships_parent_comment.py | 5 +- ..._item_relationships_parent_comment_data.py | 7 +- .../workitem_comments_list_post_response.py | 6 +- ...m_comments_list_post_response_data_item.py | 10 +- ...ents_list_post_response_data_item_links.py | 6 +- .../workitem_comments_single_get_response.py | 14 +- ...kitem_comments_single_get_response_data.py | 19 +- ...nts_single_get_response_data_attributes.py | 15 +- ...ingle_get_response_data_attributes_text.py | 7 +- ...comments_single_get_response_data_links.py | 6 +- ..._comments_single_get_response_data_meta.py | 6 +- ...ngle_get_response_data_meta_errors_item.py | 18 +- ...t_response_data_meta_errors_item_source.py | 47 +- ...e_data_meta_errors_item_source_resource.py | 78 + ..._single_get_response_data_relationships.py | 11 +- ..._get_response_data_relationships_author.py | 5 +- ...response_data_relationships_author_data.py | 10 +- ...ponse_data_relationships_child_comments.py | 8 +- ..._relationships_child_comments_data_item.py | 10 +- ..._data_relationships_child_comments_meta.py | 5 +- ...ponse_data_relationships_parent_comment.py | 5 +- ..._data_relationships_parent_comment_data.py | 10 +- ...get_response_data_relationships_project.py | 5 +- ...esponse_data_relationships_project_data.py | 10 +- ...item_comments_single_get_response_links.py | 6 +- .../workitem_comments_single_patch_request.py | 5 +- ...item_comments_single_patch_request_data.py | 10 +- ...ts_single_patch_request_data_attributes.py | 5 +- .../models/workitems_list_delete_request.py | 6 +- ...workitems_list_delete_request_data_item.py | 7 +- .../models/workitems_list_get_response.py | 17 +- .../workitems_list_get_response_data_item.py | 19 +- ..._list_get_response_data_item_attributes.py | 53 +- ...sponse_data_item_attributes_description.py | 7 +- ...se_data_item_attributes_hyperlinks_item.py | 8 +- ...items_list_get_response_data_item_links.py | 10 +- ...kitems_list_get_response_data_item_meta.py | 6 +- ...get_response_data_item_meta_errors_item.py | 18 +- ...ponse_data_item_meta_errors_item_source.py | 45 +- ...a_item_meta_errors_item_source_resource.py | 77 + ...st_get_response_data_item_relationships.py | 260 +- ...ponse_data_item_relationships_approvals.py | 124 + ..._item_relationships_approvals_data_item.py | 103 + ..._relationships_approvals_data_item_type.py | 13 + ..._data_item_relationships_approvals_meta.py | 67 + ...sponse_data_item_relationships_assignee.py | 8 +- ...a_item_relationships_assignee_data_item.py | 10 +- ...e_data_item_relationships_assignee_meta.py | 5 +- ...nse_data_item_relationships_attachments.py | 10 +- ...tem_relationships_attachments_data_item.py | 10 +- ...ta_item_relationships_attachments_links.py | 6 +- ...ata_item_relationships_attachments_meta.py | 5 +- ...response_data_item_relationships_author.py | 5 +- ...nse_data_item_relationships_author_data.py | 10 +- ...tem_relationships_backlinked_work_items.py | 125 + ...onships_backlinked_work_items_data_item.py | 104 + ...ps_backlinked_work_items_data_item_type.py | 13 + ...elationships_backlinked_work_items_meta.py | 68 + ...onse_data_item_relationships_categories.py | 8 +- ...item_relationships_categories_data_item.py | 10 +- ...data_item_relationships_categories_meta.py | 5 +- ...sponse_data_item_relationships_comments.py | 10 +- ...a_item_relationships_comments_data_item.py | 10 +- ..._data_item_relationships_comments_links.py | 6 +- ...e_data_item_relationships_comments_meta.py | 5 +- ...ationships_externally_linked_work_items.py | 125 + ..._externally_linked_work_items_data_item.py | 104 + ...rnally_linked_work_items_data_item_type.py | 13 + ...ships_externally_linked_work_items_meta.py | 68 + ...tem_relationships_linked_oslc_resources.py | 125 + ...onships_linked_oslc_resources_data_item.py | 106 + ...ps_linked_oslc_resources_data_item_type.py | 13 + ...elationships_linked_oslc_resources_meta.py | 68 + ...ata_item_relationships_linked_revisions.py | 124 + ...elationships_linked_revisions_data_item.py | 104 + ...onships_linked_revisions_data_item_type.py | 13 + ...tem_relationships_linked_revisions_meta.py | 68 + ...ta_item_relationships_linked_work_items.py | 10 +- ...lationships_linked_work_items_data_item.py | 10 +- ...m_relationships_linked_work_items_links.py | 6 +- ...em_relationships_linked_work_items_meta.py | 5 +- ...response_data_item_relationships_module.py | 5 +- ...nse_data_item_relationships_module_data.py | 10 +- ...onse_data_item_relationships_planned_in.py | 8 +- ...item_relationships_planned_in_data_item.py | 10 +- ...data_item_relationships_planned_in_meta.py | 5 +- ...esponse_data_item_relationships_project.py | 5 +- ...se_data_item_relationships_project_data.py | 10 +- ...onse_data_item_relationships_test_steps.py | 124 + ...item_relationships_test_steps_data_item.py | 103 + ...relationships_test_steps_data_item_type.py | 13 + ...data_item_relationships_test_steps_meta.py | 67 + ..._response_data_item_relationships_votes.py | 118 + ...data_item_relationships_votes_data_item.py | 104 + ...item_relationships_votes_data_item_type.py | 13 + ...onse_data_item_relationships_votes_meta.py | 71 + ...esponse_data_item_relationships_watches.py | 8 +- ...ta_item_relationships_watches_data_item.py | 10 +- ...se_data_item_relationships_watches_meta.py | 5 +- ...se_data_item_relationships_work_records.py | 122 + ...em_relationships_work_records_data_item.py | 104 + ...lationships_work_records_data_item_type.py | 13 + ...ta_item_relationships_work_records_meta.py | 67 + .../workitems_list_get_response_links.py | 26 +- .../workitems_list_get_response_meta.py | 5 +- .../models/workitems_list_patch_request.py | 85 + .../workitems_list_patch_request_data_item.py | 142 + ...list_patch_request_data_item_attributes.py | 224 + ...equest_data_item_attributes_description.py | 96 + ...t_data_item_attributes_description_type.py | 12 + ...st_data_item_attributes_hyperlinks_item.py | 76 + ...t_patch_request_data_item_relationships.py | 203 + ...equest_data_item_relationships_assignee.py | 96 + ...a_item_relationships_assignee_data_item.py | 94 + ...m_relationships_assignee_data_item_type.py | 13 + ...uest_data_item_relationships_categories.py | 98 + ...item_relationships_categories_data_item.py | 95 + ...relationships_categories_data_item_type.py | 13 + ...ata_item_relationships_linked_revisions.py | 94 + ...elationships_linked_revisions_data_item.py | 95 + ...onships_linked_revisions_data_item_type.py | 13 + ...h_request_data_item_relationships_votes.py | 90 + ...data_item_relationships_votes_data_item.py | 93 + ...item_relationships_votes_data_item_type.py | 13 + ...request_data_item_relationships_watches.py | 90 + ...ta_item_relationships_watches_data_item.py | 94 + ...em_relationships_watches_data_item_type.py | 13 + ...items_list_patch_request_data_item_type.py | 11 + .../models/workitems_list_post_request.py | 6 +- .../workitems_list_post_request_data_item.py | 9 +- ..._list_post_request_data_item_attributes.py | 38 +- ...equest_data_item_attributes_description.py | 7 +- ...st_data_item_attributes_hyperlinks_item.py | 8 +- ...st_post_request_data_item_relationships.py | 39 +- ...equest_data_item_relationships_assignee.py | 6 +- ...a_item_relationships_assignee_data_item.py | 7 +- ..._request_data_item_relationships_author.py | 5 +- ...est_data_item_relationships_author_data.py | 7 +- ...uest_data_item_relationships_categories.py | 6 +- ...item_relationships_categories_data_item.py | 7 +- ...ata_item_relationships_linked_revisions.py | 94 + ...elationships_linked_revisions_data_item.py | 95 + ...onships_linked_revisions_data_item_type.py | 13 + ..._request_data_item_relationships_module.py | 5 +- ...est_data_item_relationships_module_data.py | 7 +- .../models/workitems_list_post_response.py | 6 +- .../workitems_list_post_response_data_item.py | 10 +- ...tems_list_post_response_data_item_links.py | 10 +- .../models/workitems_single_get_response.py | 14 +- .../workitems_single_get_response_data.py | 19 +- ...ems_single_get_response_data_attributes.py | 53 +- ...et_response_data_attributes_description.py | 7 +- ...esponse_data_attributes_hyperlinks_item.py | 8 +- ...orkitems_single_get_response_data_links.py | 10 +- ...workitems_single_get_response_data_meta.py | 6 +- ...ngle_get_response_data_meta_errors_item.py | 18 +- ...t_response_data_meta_errors_item_source.py | 44 +- ...e_data_meta_errors_item_source_resource.py | 77 + ..._single_get_response_data_relationships.py | 260 +- ...t_response_data_relationships_approvals.py | 118 + ..._data_relationships_approvals_data_item.py | 102 + ..._relationships_approvals_data_item_type.py | 13 + ...ponse_data_relationships_approvals_meta.py | 71 + ...et_response_data_relationships_assignee.py | 8 +- ...e_data_relationships_assignee_data_item.py | 10 +- ...sponse_data_relationships_assignee_meta.py | 5 +- ...response_data_relationships_attachments.py | 10 +- ...ata_relationships_attachments_data_item.py | 10 +- ...se_data_relationships_attachments_links.py | 6 +- ...nse_data_relationships_attachments_meta.py | 5 +- ..._get_response_data_relationships_author.py | 5 +- ...response_data_relationships_author_data.py | 10 +- ...ata_relationships_backlinked_work_items.py | 124 + ...onships_backlinked_work_items_data_item.py | 104 + ...ps_backlinked_work_items_data_item_type.py | 13 + ...elationships_backlinked_work_items_meta.py | 68 + ..._response_data_relationships_categories.py | 8 +- ...data_relationships_categories_data_item.py | 10 +- ...onse_data_relationships_categories_meta.py | 5 +- ...et_response_data_relationships_comments.py | 10 +- ...e_data_relationships_comments_data_item.py | 10 +- ...ponse_data_relationships_comments_links.py | 6 +- ...sponse_data_relationships_comments_meta.py | 5 +- ...ationships_externally_linked_work_items.py | 125 + ..._externally_linked_work_items_data_item.py | 104 + ...rnally_linked_work_items_data_item_type.py | 13 + ...ships_externally_linked_work_items_meta.py | 68 + ...ata_relationships_linked_oslc_resources.py | 124 + ...onships_linked_oslc_resources_data_item.py | 106 + ...ps_linked_oslc_resources_data_item_type.py | 13 + ...elationships_linked_oslc_resources_meta.py | 68 + ...nse_data_relationships_linked_revisions.py | 123 + ...elationships_linked_revisions_data_item.py | 104 + ...onships_linked_revisions_data_item_type.py | 13 + ...ata_relationships_linked_revisions_meta.py | 67 + ...se_data_relationships_linked_work_items.py | 10 +- ...lationships_linked_work_items_data_item.py | 10 +- ...a_relationships_linked_work_items_links.py | 6 +- ...ta_relationships_linked_work_items_meta.py | 5 +- ..._get_response_data_relationships_module.py | 5 +- ...response_data_relationships_module_data.py | 10 +- ..._response_data_relationships_planned_in.py | 8 +- ...data_relationships_planned_in_data_item.py | 10 +- ...onse_data_relationships_planned_in_meta.py | 5 +- ...get_response_data_relationships_project.py | 5 +- ...esponse_data_relationships_project_data.py | 10 +- ..._response_data_relationships_test_steps.py | 118 + ...data_relationships_test_steps_data_item.py | 102 + ...relationships_test_steps_data_item_type.py | 13 + ...onse_data_relationships_test_steps_meta.py | 67 + ...e_get_response_data_relationships_votes.py | 119 + ...onse_data_relationships_votes_data_item.py | 103 + ...data_relationships_votes_data_item_type.py | 11 + ..._response_data_relationships_votes_meta.py | 65 + ...get_response_data_relationships_watches.py | 8 +- ...se_data_relationships_watches_data_item.py | 10 +- ...esponse_data_relationships_watches_meta.py | 5 +- ...esponse_data_relationships_work_records.py | 124 + ...ta_relationships_work_records_data_item.py | 103 + ...lationships_work_records_data_item_type.py | 13 + ...se_data_relationships_work_records_meta.py | 67 + .../workitems_single_get_response_links.py | 6 +- .../models/workitems_single_patch_request.py | 5 +- .../workitems_single_patch_request_data.py | 12 +- ...ms_single_patch_request_data_attributes.py | 35 +- ...tch_request_data_attributes_description.py | 7 +- ...request_data_attributes_hyperlinks_item.py | 8 +- ...single_patch_request_data_relationships.py | 65 +- ...tch_request_data_relationships_assignee.py | 6 +- ...t_data_relationships_assignee_data_item.py | 7 +- ...h_request_data_relationships_categories.py | 6 +- ...data_relationships_categories_data_item.py | 7 +- ...est_data_relationships_linked_revisions.py | 94 + ...elationships_linked_revisions_data_item.py | 95 + ...onships_linked_revisions_data_item_type.py | 13 + ..._patch_request_data_relationships_votes.py | 90 + ...uest_data_relationships_votes_data_item.py | 95 + ...data_relationships_votes_data_item_type.py | 11 + ...atch_request_data_relationships_watches.py | 6 +- ...st_data_relationships_watches_data_item.py | 7 +- .../models/workrecords_list_delete_request.py | 85 + ...rkrecords_list_delete_request_data_item.py | 82 + ...ords_list_delete_request_data_item_type.py | 11 + .../models/workrecords_list_get_response.py | 160 + ...workrecords_list_get_response_data_item.py | 197 + ..._list_get_response_data_item_attributes.py | 110 + ...cords_list_get_response_data_item_links.py | 66 + ...ecords_list_get_response_data_item_meta.py | 91 + ...get_response_data_item_meta_errors_item.py | 116 + ...ponse_data_item_meta_errors_item_source.py | 114 + ...a_item_meta_errors_item_source_resource.py | 77 + ...st_get_response_data_item_relationships.py | 116 + ...esponse_data_item_relationships_project.py | 94 + ...se_data_item_relationships_project_data.py | 104 + ...ta_item_relationships_project_data_type.py | 13 + ...t_response_data_item_relationships_user.py | 88 + ...ponse_data_item_relationships_user_data.py | 105 + ..._data_item_relationships_user_data_type.py | 11 + ...ecords_list_get_response_data_item_type.py | 11 + ...records_list_get_response_included_item.py | 51 + .../workrecords_list_get_response_links.py | 104 + .../workrecords_list_get_response_meta.py | 63 + .../models/workrecords_list_post_request.py | 85 + ...workrecords_list_post_request_data_item.py | 135 + ..._list_post_request_data_item_attributes.py | 101 + ...st_post_request_data_item_relationships.py | 88 + ...st_request_data_item_relationships_user.py | 88 + ...quest_data_item_relationships_user_data.py | 96 + ..._data_item_relationships_user_data_type.py | 11 + ...ecords_list_post_request_data_item_type.py | 11 + .../models/workrecords_list_post_response.py | 85 + ...orkrecords_list_post_response_data_item.py | 108 + ...ords_list_post_response_data_item_links.py | 66 + ...cords_list_post_response_data_item_type.py | 11 + .../models/workrecords_single_get_response.py | 133 + .../workrecords_single_get_response_data.py | 195 + ...rds_single_get_response_data_attributes.py | 110 + ...krecords_single_get_response_data_links.py | 66 + ...rkrecords_single_get_response_data_meta.py | 89 + ...ngle_get_response_data_meta_errors_item.py | 118 + ...t_response_data_meta_errors_item_source.py | 107 + ...e_data_meta_errors_item_source_resource.py | 77 + ..._single_get_response_data_relationships.py | 116 + ...get_response_data_relationships_project.py | 88 + ...esponse_data_relationships_project_data.py | 107 + ...se_data_relationships_project_data_type.py | 11 + ...le_get_response_data_relationships_user.py | 88 + ...t_response_data_relationships_user_data.py | 99 + ...ponse_data_relationships_user_data_type.py | 11 + ...rkrecords_single_get_response_data_type.py | 11 + ...cords_single_get_response_included_item.py | 51 + .../workrecords_single_get_response_links.py | 64 + .../open_api_client/types.py | 2 +- pyproject.toml | 2 +- 1998 files changed, 131824 insertions(+), 10217 deletions(-) delete mode 100644 open_api_client_build/custom_templates/client.py.jinja delete mode 100644 open_api_client_build/custom_templates/client.py.jinja.license delete mode 100644 open_api_client_build/custom_templates/endpoint_macros.py.jinja delete mode 100644 open_api_client_build/custom_templates/endpoint_macros.py.jinja.license create mode 100644 polarion_rest_api_client/open_api_client/api/documents/branch_documents.py create mode 100644 polarion_rest_api_client/open_api_client/api/externally_linked_work_items/__init__.py create mode 100644 polarion_rest_api_client/open_api_client/api/externally_linked_work_items/delete_externally_linked_work_item.py create mode 100644 polarion_rest_api_client/open_api_client/api/externally_linked_work_items/delete_externally_linked_work_items.py create mode 100644 polarion_rest_api_client/open_api_client/api/externally_linked_work_items/get_externally_linked_work_item.py create mode 100644 polarion_rest_api_client/open_api_client/api/externally_linked_work_items/get_externally_linked_work_items.py create mode 100644 polarion_rest_api_client/open_api_client/api/externally_linked_work_items/post_externally_linked_work_items.py create mode 100644 polarion_rest_api_client/open_api_client/api/feature_selections/__init__.py create mode 100644 polarion_rest_api_client/open_api_client/api/feature_selections/get_feature_selection.py create mode 100644 polarion_rest_api_client/open_api_client/api/feature_selections/get_feature_selections.py create mode 100644 polarion_rest_api_client/open_api_client/api/icons/post_global_icons.py create mode 100644 polarion_rest_api_client/open_api_client/api/icons/post_project_icons.py create mode 100644 polarion_rest_api_client/open_api_client/api/jobs/__init__.py create mode 100644 polarion_rest_api_client/open_api_client/api/jobs/get_job.py create mode 100644 polarion_rest_api_client/open_api_client/api/jobs/get_job_result_file_content.py create mode 100644 polarion_rest_api_client/open_api_client/api/linked_oslc_resources/__init__.py create mode 100644 polarion_rest_api_client/open_api_client/api/linked_oslc_resources/delete_oslc_resources.py create mode 100644 polarion_rest_api_client/open_api_client/api/linked_oslc_resources/get_oslc_resources.py create mode 100644 polarion_rest_api_client/open_api_client/api/linked_oslc_resources/post_oslc_resources.py create mode 100644 polarion_rest_api_client/open_api_client/api/plans/__init__.py create mode 100644 polarion_rest_api_client/open_api_client/api/plans/delete_plan.py create mode 100644 polarion_rest_api_client/open_api_client/api/plans/delete_plan_relationship.py create mode 100644 polarion_rest_api_client/open_api_client/api/plans/delete_plans.py create mode 100644 polarion_rest_api_client/open_api_client/api/plans/get_plan.py create mode 100644 polarion_rest_api_client/open_api_client/api/plans/get_plan_relationship.py create mode 100644 polarion_rest_api_client/open_api_client/api/plans/get_plans.py create mode 100644 polarion_rest_api_client/open_api_client/api/plans/patch_plan.py create mode 100644 polarion_rest_api_client/open_api_client/api/plans/patch_plan_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/api/plans/post_plan_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/api/plans/post_plans.py create mode 100644 polarion_rest_api_client/open_api_client/api/project_templates/__init__.py create mode 100644 polarion_rest_api_client/open_api_client/api/project_templates/get_project_templates.py create mode 100644 polarion_rest_api_client/open_api_client/api/projects/create_project.py create mode 100644 polarion_rest_api_client/open_api_client/api/projects/delete_project.py create mode 100644 polarion_rest_api_client/open_api_client/api/projects/delete_project_test_parameter_definition.py create mode 100644 polarion_rest_api_client/open_api_client/api/projects/get_project_test_parameter_definition.py create mode 100644 polarion_rest_api_client/open_api_client/api/projects/get_project_test_parameter_definitions.py create mode 100644 polarion_rest_api_client/open_api_client/api/projects/mark_project.py create mode 100644 polarion_rest_api_client/open_api_client/api/projects/move_project_action.py create mode 100644 polarion_rest_api_client/open_api_client/api/projects/patch_project.py create mode 100644 polarion_rest_api_client/open_api_client/api/projects/post_project_test_parameter_definitions.py create mode 100644 polarion_rest_api_client/open_api_client/api/projects/unmark_project.py create mode 100644 polarion_rest_api_client/open_api_client/api/revisions/__init__.py create mode 100644 polarion_rest_api_client/open_api_client/api/revisions/get_revision.py create mode 100644 polarion_rest_api_client/open_api_client/api/revisions/get_revisions.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_record_attachments/__init__.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_record_attachments/get_test_record_attachment.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_record_attachments/get_test_record_attachment_content.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_record_attachments/get_test_record_attachments.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_record_attachments/post_test_record_attachments.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_records/__init__.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_records/delete_test_record_test_parameter.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_records/get_test_record.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_records/get_test_record_test_parameter.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_records/get_test_record_test_parameters.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_records/get_test_records.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_records/patch_test_record.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_records/post_test_record_test_parameters.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_records/post_test_records.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_run_attachments/__init__.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_run_attachments/delete_test_run_attachment.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_run_attachments/get_test_run_attachment.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_run_attachments/get_test_run_attachment_content.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_run_attachments/get_test_run_attachments.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_run_attachments/patch_test_run_attachment.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_run_attachments/post_test_run_attachments.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_run_comments/__init__.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_run_comments/get_test_run_comment.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_run_comments/get_test_run_comments.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_run_comments/patch_test_run_comment.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_run_comments/post_test_run_comments.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_runs/__init__.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_runs/delete_test_run.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_runs/delete_test_run_test_parameter.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_runs/delete_test_run_test_parameter_definition.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_runs/export_excel_tests.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_runs/get_test_run.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_runs/get_test_run_test_parameter.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_runs/get_test_run_test_parameter_definition.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_runs/get_test_run_test_parameter_definitions.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_runs/get_test_run_test_parameters.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_runs/get_test_runs.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_runs/import_excel_test_results.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_runs/import_x_unit_test_results.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_runs/patch_test_run.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_runs/post_test_run_parameter_definitions.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_runs/post_test_run_test_parameters.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_runs/post_test_runs.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_step_result_attachments/__init__.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_step_result_attachments/get_test_step_result_attachment.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_step_result_attachments/get_test_step_result_attachment_content.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_step_result_attachments/get_test_step_result_attachments.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_step_result_attachments/post_test_step_result_attachments.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_step_results/__init__.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_step_results/get_test_step_result.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_step_results/get_test_step_results.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_step_results/post_test_step_results.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_steps/__init__.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_steps/delete_test_step.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_steps/delete_test_steps.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_steps/get_test_step.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_steps/get_test_steps.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_steps/patch_test_step.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_steps/patch_test_steps.py create mode 100644 polarion_rest_api_client/open_api_client/api/test_steps/post_test_steps.py create mode 100644 polarion_rest_api_client/open_api_client/api/users/get_avatar.py create mode 100644 polarion_rest_api_client/open_api_client/api/users/update_avatar.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_item_approvals/__init__.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_item_approvals/delete_approval.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_item_approvals/delete_approvals.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_item_approvals/get_work_item_approval.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_item_approvals/get_work_item_approvals.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_item_approvals/patch_work_item_approval.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_item_approvals/patch_work_item_approvals.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_item_approvals/post_work_item_approvals.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_item_work_records/__init__.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_item_work_records/delete_work_record.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_item_work_records/delete_work_records.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_item_work_records/get_work_record.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_item_work_records/get_work_records.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_item_work_records/post_work_records.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_items/delete_all_work_items.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_items/delete_work_items_relationship.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_items/get_work_item_test_parameter_definition.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_items/get_work_item_test_parameter_definitions.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_items/get_work_items_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_items/get_workflow_actions_for_work_item.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_items/patch_all_work_items.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_items/patch_work_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_items/patch_work_items.py create mode 100644 polarion_rest_api_client/open_api_client/api/work_items/post_work_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/branch_documents_request_body.py create mode 100644 polarion_rest_api_client/open_api_client/models/branch_documents_request_body_document_configurations_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/create_project_request_body.py create mode 100644 polarion_rest_api_client/open_api_client/models/create_project_request_body_params_type_0.py create mode 100644 polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_attachments.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_attachments_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_attachments_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_attachments_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_author.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_author_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_author_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_branched_from.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_branched_from_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_branched_from_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_comments.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_comments_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_comments_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_comments_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_derived_from.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_derived_from_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_derived_from_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_project.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_project_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_project_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_updated_by.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_updated_by_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_updated_by_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_variant.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_variant_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_variant_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/errors_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/export_test_cases_request_body.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_delete_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_delete_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_delete_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_request_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_list_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_attributes_selection_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_relationships_work_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_relationships_work_item_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_relationships_work_item_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_single_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_attributes_selection_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_relationships_work_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_relationships_work_item_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_relationships_work_item_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/icons_list_post_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/icons_list_post_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/icons_list_post_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/icons_list_post_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/icons_list_post_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/icons_list_post_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/icons_list_post_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/import_test_results_request_body.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_delete_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_delete_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_delete_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_request_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/move_project_request_body.py create mode 100644 polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/patch_test_run_attachments_request_body.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_delete_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_delete_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_delete_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_calculation_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_description.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_description_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_home_page_content.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_home_page_content_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_author.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_author_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_author_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_parent.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_parent_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_parent_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_span.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_span_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_span_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_span_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_template.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_template_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_template_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_work_items.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_work_items_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_work_items_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_work_items_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_get_response_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_calculation_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_description.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_description_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_home_page_content.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_home_page_content_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_parent.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_parent_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_parent_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_project_span.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_project_span_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_project_span_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_template.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_template_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_template_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_work_items.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_work_items_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_work_items_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_list_post_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_calculation_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_description.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_description_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_home_page_content.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_home_page_content_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_author.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_author_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_author_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_parent.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_parent_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_parent_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_span.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_span_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_span_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_span_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_template.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_template_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_template_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_work_items.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_work_items_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_work_items_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_work_items_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_calculation_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_description.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_description_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_home_page_content.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_home_page_content_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_parent.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_parent_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_parent_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_project_span.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_project_span_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_project_span_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_work_items.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_work_items_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_work_items_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/post_icons_request_body.py create mode 100644 polarion_rest_api_client/open_api_client/models/post_import_action_request_body.py create mode 100644 polarion_rest_api_client/open_api_client/models/post_test_record_attachments_request_body.py create mode 100644 polarion_rest_api_client/open_api_client/models/post_test_run_attachments_request_body.py create mode 100644 polarion_rest_api_client/open_api_client/models/post_test_step_result_attachments_request_body.py create mode 100644 polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/projects_single_patch_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_attributes_description.py create mode 100644 polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_attributes_description_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_relationships_lead.py create mode 100644 polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_relationships_lead_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_relationships_lead_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_attributes_parameters.py create mode 100644 polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/relationship_data_body.py create mode 100644 polarion_rest_api_client/open_api_client/models/relationship_data_body_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/relationship_data_list_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/relationship_data_list_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/relationship_data_single_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/relationship_data_single_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/relationships_list_delete_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/relationships_list_delete_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/relationships_list_delete_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_list_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_relationships_author.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_relationships_author_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_relationships_author_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_list_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_list_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_list_get_response_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_single_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_relationships_author.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_relationships_author_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_relationships_author_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_single_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/revisions_single_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_request_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_relationships_definition.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_relationships_definition_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_relationships_definition_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_post_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_post_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_post_request_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_post_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_post_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_post_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_post_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_list_post_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_single_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_relationships_definition.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_relationships_definition_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_relationships_definition_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_author.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_author_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_author_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_project.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_project_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_project_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_request_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_author.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_author_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_author_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_project.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_project_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_project_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_attributes_comment.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_attributes_comment_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_defect.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_defect_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_defect_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_executed_by.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_executed_by_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_executed_by_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_test_case.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_test_case_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_test_case_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_attributes_comment.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_attributes_comment_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_defect.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_defect_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_defect_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_executed_by.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_executed_by_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_executed_by_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_test_case.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_test_case_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_test_case_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_list_post_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_attributes_comment.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_attributes_comment_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_defect.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_defect_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_defect_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_executed_by.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_executed_by_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_executed_by_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_test_case.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_test_case_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_test_case_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_attributes_comment.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_attributes_comment_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_defect.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_defect_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_defect_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_executed_by.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_executed_by_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_executed_by_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_author.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_author_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_author_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_project.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_project_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_project_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_request_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_author.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_author_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_author_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_project.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_project_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_project_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_patch_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_patch_request_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_patch_request_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_attachments_single_patch_request_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_attributes_text.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_attributes_text_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_author.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_author_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_author_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_child_comments.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_child_comments_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_child_comments_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_child_comments_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_parent_comment.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_parent_comment_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_parent_comment_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_project.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_project_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_project_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_attributes_text.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_attributes_text_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_author.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_author_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_author_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_parent_comment.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_parent_comment_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_parent_comment_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_attributes_text.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_attributes_text_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_author.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_author_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_author_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_child_comments.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_child_comments_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_child_comments_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_child_comments_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_parent_comment.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_parent_comment_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_parent_comment_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_project.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_project_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_project_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_patch_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_patch_request_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_patch_request_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testrun_comments_single_patch_request_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_attributes_home_page_content.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_attributes_home_page_content_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_attributes_select_test_cases_by.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_author.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_author_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_author_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_document.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_document_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_document_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_span.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_span_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_span_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_span_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_summary_defect.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_summary_defect_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_summary_defect_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_template.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_template_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_template_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_get_response_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_attributes_home_page_content.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_attributes_home_page_content_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_attributes_select_test_cases_by.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_document.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_document_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_document_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_project_span.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_project_span_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_project_span_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_summary_defect.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_summary_defect_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_summary_defect_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_template.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_template_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_template_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_list_post_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_attributes_home_page_content.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_attributes_home_page_content_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_attributes_select_test_cases_by.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_author.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_author_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_author_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_document.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_document_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_document_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_span.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_span_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_span_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_span_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_summary_defect.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_summary_defect_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_summary_defect_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_template.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_template_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_template_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_patch_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_attributes_home_page_content.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_attributes_home_page_content_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_attributes_select_test_cases_by.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_document.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_document_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_document_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_project_span.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_project_span_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_project_span_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_summary_defect.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_summary_defect_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_summary_defect_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_attributes_comment.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_attributes_comment_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_relationships_test_step.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_relationships_test_step_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_relationships_test_step_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item_attributes_comment.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item_attributes_comment_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_post_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_post_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_post_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_list_post_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_attributes_comment.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_attributes_comment_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_relationships_test_step.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_relationships_test_step_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_relationships_test_step_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_author.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_author_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_author_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_project.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_project_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_project_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_request_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_author.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_author_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_author_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_project.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_project_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_project_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_delete_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_delete_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_delete_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_attributes_values_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_attributes_values_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item_attributes_values_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item_attributes_values_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_post_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item_attributes_values_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item_attributes_values_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_post_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_post_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_post_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_list_post_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_attributes_values_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_attributes_values_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data_attributes_values_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data_attributes_values_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/update_avatar_request_body.py create mode 100644 polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/users_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/workflow_actions_action_response_body.py create mode 100644 polarion_rest_api_client/open_api_client/models/workflow_actions_action_response_body_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workflow_actions_action_response_body_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/workflow_actions_action_response_body_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_delete_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_delete_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_delete_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_attributes_status.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_relationships_user.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_relationships_user_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_relationships_user_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request_data_item_attributes_status.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_attributes_status.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_relationships_user.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_relationships_user_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_relationships_user_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_attributes_status.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_relationships_user.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_relationships_user_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_relationships_user_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request_data_attributes_status.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_approvals.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_approvals_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_approvals_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_approvals_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_backlinked_work_items.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_backlinked_work_items_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_backlinked_work_items_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_backlinked_work_items_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_externally_linked_work_items.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_externally_linked_work_items_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_externally_linked_work_items_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_externally_linked_work_items_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_oslc_resources.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_oslc_resources_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_oslc_resources_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_oslc_resources_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_revisions.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_revisions_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_revisions_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_revisions_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_test_steps.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_test_steps_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_test_steps_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_test_steps_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_votes.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_votes_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_votes_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_votes_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_work_records.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_work_records_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_work_records_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_work_records_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_attributes_description.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_attributes_description_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_attributes_hyperlinks_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_assignee.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_assignee_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_assignee_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_categories.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_categories_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_categories_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_linked_revisions.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_linked_revisions_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_linked_revisions_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_votes.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_votes_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_votes_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_watches.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_watches_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_watches_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_linked_revisions.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_linked_revisions_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_linked_revisions_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_approvals.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_approvals_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_approvals_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_approvals_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_backlinked_work_items.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_backlinked_work_items_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_backlinked_work_items_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_backlinked_work_items_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_externally_linked_work_items.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_externally_linked_work_items_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_externally_linked_work_items_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_externally_linked_work_items_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_oslc_resources.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_oslc_resources_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_oslc_resources_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_oslc_resources_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_revisions.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_revisions_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_revisions_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_revisions_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_test_steps.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_test_steps_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_test_steps_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_test_steps_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_votes.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_votes_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_votes_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_votes_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_work_records.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_work_records_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_work_records_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_work_records_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_linked_revisions.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_linked_revisions_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_linked_revisions_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_votes.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_votes_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_votes_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_delete_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_delete_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_delete_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_project.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_project_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_project_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_user.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_user_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_user_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_post_request.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_relationships_user.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_relationships_user_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_relationships_user_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_post_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_post_response_data_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_post_response_data_item_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_list_post_response_data_item_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_single_get_response.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_attributes.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_links.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_meta.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_meta_errors_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_meta_errors_item_source.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_meta_errors_item_source_resource.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_project.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_project_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_project_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_user.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_user_data.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_user_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_type.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_included_item.py create mode 100644 polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_links.py diff --git a/open_api_client_build/custom_templates/client.py.jinja b/open_api_client_build/custom_templates/client.py.jinja deleted file mode 100644 index cae86b01..00000000 --- a/open_api_client_build/custom_templates/client.py.jinja +++ /dev/null @@ -1,173 +0,0 @@ -import ssl -from typing import Any, Dict, Union, Optional - -from attrs import define, field, evolve -import httpx - - -@define -class Client: - """A class for keeping track of data related to the API - -{% macro httpx_args_docstring() %} - The following are accepted as keyword arguments and will be used to construct httpx 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 - httpx.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 ``httpx.Client`` and ``httpx.AsyncClient`` constructor. -{% endmacro %} -{{ httpx_args_docstring() }} - - Attributes - ---------- - raise_on_unexpected_status : bool - 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. - """ -{% macro attributes() %} - raise_on_unexpected_status: bool = field(default=False, kw_only=True) - _base_url: str - _cookies: Dict[str, str] = field(factory=dict, kw_only=True) - _headers: Dict[str, str] = field(factory=dict, kw_only=True) - _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True) - _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True) - _follow_redirects: bool = field(default=False, kw_only=True) - _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True) - _client: Optional[httpx.Client] = field(default=None, init=False) - _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) -{% endmacro %}{{ attributes() }} -{% macro builders(self) %} - def with_headers(self, headers: Dict[str, str]) -> "{{ self }}": - """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]) -> "{{ self }}": - """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: httpx.Timeout) -> "{{ self }}": - """Get a new client matching this one with a new timeout (in seconds)""" - 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) -{% endmacro %}{{ builders("Client") }} -{% macro httpx_stuff(name, custom_constructor=None) %} - def set_httpx_client(self, client: httpx.Client) -> "{{ name }}": - """Manually the underlying httpx.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) -> httpx.Client: - """Get the underlying httpx.Client, constructing a new one if not previously set""" - if self._client is None: - {% if custom_constructor %} - {{ custom_constructor | indent(12) }} - {% endif %} - self._client = httpx.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) -> "{{ name }}": - """Enter a context manager for self.client—you cannot enter twice (see httpx docs)""" - self.get_httpx_client().__enter__() - return self - - def __exit__(self, *args: Any, **kwargs: Any) -> None: - """Exit a context manager for internal httpx.Client (see httpx docs)""" - self.get_httpx_client().__exit__(*args, **kwargs) - - def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "{{ name }}": - """Manually the underlying httpx.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) -> httpx.AsyncClient: - """Get the underlying httpx.AsyncClient, constructing a new one if not previously set""" - if self._async_client is None: - {% if custom_constructor %} - {{ custom_constructor | indent(12) }} - {% endif %} - self._async_client = httpx.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) -> "{{ name }}": - """Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx 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 httpx.AsyncClient (see httpx docs)""" - await self.get_async_httpx_client().__aexit__(*args, **kwargs) -{% endmacro %}{{ httpx_stuff("Client") }} - -@define -class AuthenticatedClient: - """A Client which has been authenticated for use on secured endpoints - -{{ httpx_args_docstring() }} - - Attributes - ---------- - raise_on_unexpected_status : bool - 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 : str - The token to use for authentication - prefix : str - The prefix to use for the Authorization header - auth_header_name : str - The name of the Authorization header - """ - -{{ attributes() }} - token: str - prefix: str = "Bearer" - auth_header_name: str = "Authorization" - -{{ builders("AuthenticatedClient") }} -{{ httpx_stuff("AuthenticatedClient", "self._headers[self.auth_header_name] = f\"{self.prefix} {self.token}\" if self.prefix else self.token") }} diff --git a/open_api_client_build/custom_templates/client.py.jinja.license b/open_api_client_build/custom_templates/client.py.jinja.license deleted file mode 100644 index 6215fd0d..00000000 --- a/open_api_client_build/custom_templates/client.py.jinja.license +++ /dev/null @@ -1,2 +0,0 @@ -Copyright https://github.com/openapi-generators/openapi-python-client, DB InfraGO AG and contributors -SPDX-License-Identifier: Apache-2.0 diff --git a/open_api_client_build/custom_templates/endpoint_macros.py.jinja b/open_api_client_build/custom_templates/endpoint_macros.py.jinja deleted file mode 100644 index 91f2d7e1..00000000 --- a/open_api_client_build/custom_templates/endpoint_macros.py.jinja +++ /dev/null @@ -1,194 +0,0 @@ -{% from "property_templates/helpers.jinja" import guarded_statement %} -{% from "helpers.jinja" import safe_docstring %} - -{% macro header_params(endpoint) %} -{% if endpoint.header_parameters %} -headers = {} - {% for parameter in endpoint.header_parameters.values() %} - {% import "property_templates/" + parameter.template as param_template %} - {% if param_template.transform_header %} - {% set expression = param_template.transform_header(parameter.python_name) %} - {% else %} - {% set expression = parameter.python_name %} - {% endif %} - {% set statement = 'headers["' + parameter.name + '"]' + " = " + expression %} -{{ guarded_statement(parameter, parameter.python_name, statement) }} - {% endfor %} -{% endif %} -{% endmacro %} - -{% macro cookie_params(endpoint) %} -cookies = {} -{% if endpoint.cookie_parameters %} - {% for parameter in endpoint.cookie_parameters.values() %} - {% if parameter.required %} -cookies["{{ parameter.name}}"] = {{ parameter.python_name }} - {% else %} -if {{ parameter.python_name }} is not UNSET: - cookies["{{ parameter.name}}"] = {{ parameter.python_name }} - {% endif %} - {% endfor %} -{% endif %} -{% endmacro %} - - -{% macro query_params(endpoint) %} -{% if endpoint.query_parameters %} -params: Dict[str, Any] = {} -{% for property in endpoint.query_parameters.values() %} - {% set destination = property.python_name %} - {% import "property_templates/" + property.template as prop_template %} - {% if prop_template.transform %} - {% set destination = "json_" + property.python_name %} -{{ prop_template.transform(property, property.python_name, destination) }} - {% endif %} - {%- if not property.json_is_dict %} -params["{{ property.name }}"] = {{ destination }} - {% else %} -{{ guarded_statement(property, destination, "params.update(" + destination + ")") }} - {% endif %} - - -{% endfor %} - -params = {k: v for k, v in params.items() if v is not UNSET and v is not None} -{% endif %} -{% endmacro %} - -{% macro json_body(endpoint) %} -{% if endpoint.json_body %} - {% set property = endpoint.json_body %} - {% set destination = "json_" + property.python_name %} - {% import "property_templates/" + property.template as prop_template %} - {% if prop_template.transform %} -{{ prop_template.transform(property, property.python_name, destination) }} - {% else %} -{{ destination }} = {{ property.python_name }} - {% endif %} -{% endif %} -{% endmacro %} - -{% macro multipart_body(endpoint) %} -{% if endpoint.multipart_body %} - {% set property = endpoint.multipart_body %} - {% set destination = "multipart_" + property.python_name %} - {% import "property_templates/" + property.template as prop_template %} - {% if prop_template.transform_multipart %} -{{ prop_template.transform_multipart(property, property.python_name, destination) }} - {% endif %} -{% endif %} -{% endmacro %} - -{# The all the kwargs passed into an endpoint (and variants thereof)) #} -{% macro arguments(endpoint, include_client=True) %} -{# path parameters #} -{% for parameter in endpoint.path_parameters.values() %} -{{ parameter.to_string() }}, -{% endfor %} -{% if include_client or ((endpoint.list_all_parameters() | length) > (endpoint.path_parameters | length)) %} -*, -{% endif %} -{# Proper client based on whether or not the endpoint requires authentication #} -{% if include_client %} -{% if endpoint.requires_security %} -client: AuthenticatedClient, -{% else %} -client: Union[AuthenticatedClient, Client], -{% endif %} -{% endif %} -{# Form data if any #} -{% if endpoint.form_body %} -form_data: {{ endpoint.form_body.get_type_string() }}, -{% endif %} -{# Multipart data if any #} -{% if endpoint.multipart_body %} -multipart_data: {{ endpoint.multipart_body.get_type_string() }}, -{% endif %} -{# JSON body if any #} -{% if endpoint.json_body %} -json_body: {{ endpoint.json_body.get_type_string() }}, -{% endif %} -{# query parameters #} -{% for parameter in endpoint.query_parameters.values() %} -{{ parameter.to_string() }}, -{% endfor %} -{% for parameter in endpoint.header_parameters.values() %} -{{ parameter.to_string() }}, -{% endfor %} -{# cookie parameters #} -{% for parameter in endpoint.cookie_parameters.values() %} -{{ parameter.to_string() }}, -{% endfor %} -{% endmacro %} - -{# Just lists all kwargs to endpoints as name=name for passing to other functions #} -{% macro kwargs(endpoint, include_client=True) %} -{% for parameter in endpoint.path_parameters.values() %} -{{ parameter.python_name }}={{ parameter.python_name }}, -{% endfor %} -{% if include_client %} -client=client, -{% endif %} -{% if endpoint.form_body %} -form_data=form_data, -{% endif %} -{% if endpoint.multipart_body %} -multipart_data=multipart_data, -{% endif %} -{% if endpoint.json_body %} -json_body=json_body, -{% endif %} -{% for parameter in endpoint.query_parameters.values() %} -{{ parameter.python_name }}={{ parameter.python_name }}, -{% endfor %} -{% for parameter in endpoint.header_parameters.values() %} -{{ parameter.python_name }}={{ parameter.python_name }}, -{% endfor %} -{% for parameter in endpoint.cookie_parameters.values() %} -{{ parameter.python_name }}={{ parameter.python_name }}, -{% endfor %} -{% endmacro %} - -{% macro docstring_content(endpoint, return_string, is_detailed) %} -{% if endpoint.summary %}{{ endpoint.summary | wordwrap(100)}} - -{% endif -%} -{%- if endpoint.description %}{{ endpoint.description | wordwrap(100) }} - -{% endif %} -{% if not endpoint.summary and not endpoint.description %} -{# Leave extra space so that Args or Returns isn't at the top #} - -{% endif %} -{% set all_parameters = endpoint.list_all_parameters() %} -{% if all_parameters %} -Parameters ----------- -{% for parameter in all_parameters %} -{{ parameter.python_name }} : {{ parameter.get_type_string() }}{% if parameter.default %}, default {{parameter.default}}{% endif %} - -{% if parameter.description %} - {{ parameter.description | wordwrap(90) | indent(4) }} -{% endif %} -{% endfor %} - -{% endif %} -Raises ------- -errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. -httpx.TimeoutException - If the request takes longer than Client.timeout. - -Returns -------- -{% if is_detailed %} -Response[{{ return_string }}] -{% else %} -{{ return_string }} -{% endif %} -{% endmacro %} - -{% macro docstring(endpoint, return_string, is_detailed) %} -{{ safe_docstring(docstring_content(endpoint, return_string, is_detailed)) }} -{% endmacro %} diff --git a/open_api_client_build/custom_templates/endpoint_macros.py.jinja.license b/open_api_client_build/custom_templates/endpoint_macros.py.jinja.license deleted file mode 100644 index 6215fd0d..00000000 --- a/open_api_client_build/custom_templates/endpoint_macros.py.jinja.license +++ /dev/null @@ -1,2 +0,0 @@ -Copyright https://github.com/openapi-generators/openapi-python-client, DB InfraGO AG and contributors -SPDX-License-Identifier: Apache-2.0 diff --git a/open_api_client_build/custom_templates/model.py.jinja b/open_api_client_build/custom_templates/model.py.jinja index 6b934303..9ca3474e 100644 --- a/open_api_client_build/custom_templates/model.py.jinja +++ b/open_api_client_build/custom_templates/model.py.jinja @@ -53,14 +53,9 @@ T = TypeVar("T", bound="{{ class_name }}") {% endif %} {% if model.required_properties or model.optional_properties %} - Attributes - ---------- + Attributes: {% for property in model.required_properties + model.optional_properties %} - {{ property.python_name }} : {{ property.get_type_string() }}{% if property.default %}, default {{property.default}}{% endif %} - - {% if property.description %} - {{ property.description | wordwrap(90) | indent(8) }} - {% endif %} + {{ property.to_docstring() | wordwrap(112) | indent(12) }} {% endfor %}{% endif %} {% endmacro %} @@ -82,41 +77,42 @@ class {{ class_name }}: additional_properties: Dict[str, {{ additional_property_type }}] = _attrs_field(init=False, factory=dict) {% endif %} -{%- macro _transform_property(property, content, multipart=False) -%} +{% macro _transform_property(property, content, multipart=False) %} {% import "property_templates/" + property.template as prop_template %} -{%- if prop_template.transform -%} +{% if prop_template.transform %} {{ prop_template.transform(property, content, property.python_name, multipart=multipart) }} -{%- elif multipart -%} +{% elif multipart %} {{ property.python_name }} = {{ content }} if isinstance({{ content }}, Unset) else (None, str({{ content }}).encode(), "text/plain") -{%- else -%} +{% else %} {{ property.python_name }} = {{ content }} -{%- endif -%} -{%- endmacro -%} +{% endif %} -{%- macro _prepare_field_dict(multipart=False) -%} +{% endmacro %} + +{% macro _prepare_field_dict(multipart=False) %} field_dict: Dict[str, Any] = {} {% if model.additional_properties %} -{%- if model.additional_properties.template -%}{# Can be a bool instead of an object #} +{% if model.additional_properties.template %}{# Can be a bool instead of an object #} {% import "property_templates/" + model.additional_properties.template as prop_template %} -{%- else -%} - {%- set prop_template = None -%} -{%- endif -%} -{%- if prop_template and prop_template.transform -%} +{% else %} + {% set prop_template = None %} +{% endif %} +{% if prop_template and prop_template.transform %} for prop_name, prop in self.additional_properties.items(): {{ prop_template.transform(model.additional_properties, "prop", "field_dict[prop_name]", multipart=multipart, declare_type=false) | indent(4) }} -{%- elif multipart -%} +{% elif multipart %} field_dict.update({ key: (None, str(value).encode(), "text/plain") for key, value in self.additional_properties.items() }) -{%- else -%} +{% else %} field_dict.update(self.additional_properties) {%- endif -%} -{% endif %} -{%- endmacro -%} +{%- endif -%} +{% endmacro %} {% macro _to_dict() %} -{% for property in model.required_properties + model.optional_properties %} +{% for property in model.required_properties + model.optional_properties -%} {{ _transform_property(property, "self." + property.python_name) }} {% endfor %} @@ -138,7 +134,6 @@ if {{ property.python_name }} is not UNSET: return field_dict {% endmacro %} - def to_dict(self) -> Dict[str, Any]: {% for lazy_import in model.lazy_imports %} {{ lazy_import }} diff --git a/open_api_client_build/custom_templates/property_templates/model_property.py.jinja b/open_api_client_build/custom_templates/property_templates/model_property.py.jinja index 23feb8ac..ac88fc76 100644 --- a/open_api_client_build/custom_templates/property_templates/model_property.py.jinja +++ b/open_api_client_build/custom_templates/property_templates/model_property.py.jinja @@ -4,8 +4,8 @@ {% from "property_templates/property_macros.py.jinja" import construct_template %} -{% macro construct(property, source, initial_value=None) %} -{{ construct_template(construct_function, property, source, initial_value=initial_value) }} +{% macro construct(property, source) %} +{{ construct_template(construct_function, property, source) }} {% endmacro %} {% macro check_type_for_construct(property, source) %}isinstance({{ source }}, dict){% endmacro %} @@ -14,25 +14,17 @@ {% set transformed = source + "." + transform_method + "()" %} {% if multipart %} {% set transformed = "(None, json.dumps(" + transformed + ").encode(), 'text/plain')" %} - {% set type_string = "Union[Unset, Tuple[None, bytes, str]]" %} + {% set type_string = property.get_type_string(multipart=True) %} {% else %} {% set type_string = property.get_type_string(json=True) %} {% endif %} {% if property.required %} -{% if property.nullable %} -{{ destination }} = {{ transformed }} if {{ source }} else None -{% else %} {{ destination }} = {{ transformed }} -{% endif %} -{% else %} +{%- else %} {{ destination }}{% if declare_type %}: {{ type_string }}{% endif %} = UNSET if not isinstance({{ source }}, Unset): -{% if property.nullable %} - {{ destination }} = {{ transformed }} if {{ source }} else None -{% else %} {{ destination }} = {{ transformed }} -{% endif %} -{% endif %} +{%- endif %} {% endmacro %} {% macro transform_multipart(property, source, destination) %} diff --git a/polarion_rest_api_client/client.py b/polarion_rest_api_client/client.py index 90b3384e..5cf4de38 100644 --- a/polarion_rest_api_client/client.py +++ b/polarion_rest_api_client/client.py @@ -292,7 +292,7 @@ def _post_work_item_batch( retry: bool = True, ): response = post_work_items.sync_detailed( - self.project_id, client=self.client, json_body=work_item_batch + self.project_id, client=self.client, body=work_item_batch ) if not self._check_response(response, not retry) and retry: sleep_random_time() @@ -442,7 +442,7 @@ def update_work_item_attachment( work_item_attachment.work_item_id, work_item_attachment.id, client=self.client, - multipart_data=multipart, + body=multipart, ) if not self._check_response(response, not retry) and retry: sleep_random_time() @@ -505,7 +505,7 @@ def create_work_item_attachments( self.project_id, work_item_attachments[0].work_item_id, client=self.client, - multipart_data=multipart, + body=multipart, ) if not self._check_response(response, not retry) and retry: sleep_random_time() @@ -646,11 +646,16 @@ def get_document( space_id: str, document_name: str, fields: dict[str, str] | None = None, - include: str | None = None, - revision: str | None = None, + include: str | None | oa_types.Unset = None, + revision: str | None | oa_types.Unset = None, retry: bool = True, ) -> dm.Document: """Return the document with the given document_name and space_id.""" + if include is None: + include = oa_types.UNSET + + if revision is None: + revision = oa_types.UNSET if " " in space_id or " " in document_name: space_id = urllib.parse.quote( @@ -777,7 +782,7 @@ def _delete_work_items(self, work_item_ids: list[str], retry: bool = True): response = delete_work_items.sync_detailed( self.project_id, client=self.client, - json_body=api_models.WorkitemsListDeleteRequest( + body=api_models.WorkitemsListDeleteRequest( [ api_models.WorkitemsListDeleteRequestDataItem( api_models.WorkitemsListDeleteRequestDataItemType.WORKITEMS, # pylint: disable=line-too-long @@ -806,7 +811,7 @@ def update_work_item( self.project_id, work_item.id, client=self.client, - json_body=self._build_work_item_patch_request(work_item), + body=self._build_work_item_patch_request(work_item), ) if not self._check_response(response, not retry) and retry: @@ -817,7 +822,7 @@ def get_work_item_links( self, work_item_id: str, fields: dict[str, str] | None = None, - include: str | None = None, + include: str | None | oa_types.Unset = None, page_size: int = 100, page_number: int = 1, retry: bool = True, @@ -831,6 +836,9 @@ def get_work_item_links( if fields is None: fields = self.default_fields.linkedworkitems + if include is None: + include = oa_types.UNSET + sparse_fields = _build_sparse_fields(fields) response = get_linked_work_items.sync_detailed( self.project_id, @@ -902,7 +910,7 @@ def _create_work_item_links( work_item_links[0].primary_work_item_id, client=self.client, # pylint: disable=line-too-long - json_body=api_models.LinkedworkitemsListPostRequest( + body=api_models.LinkedworkitemsListPostRequest( [ api_models.LinkedworkitemsListPostRequestDataItem( api_models.LinkedworkitemsListPostRequestDataItemType.LINKEDWORKITEMS, @@ -937,7 +945,7 @@ def _delete_work_item_links( work_item_links[0].primary_work_item_id, client=self.client, # pylint: disable=line-too-long - json_body=api_models.LinkedworkitemsListDeleteRequest( + body=api_models.LinkedworkitemsListDeleteRequest( [ api_models.LinkedworkitemsListDeleteRequestDataItem( api_models.LinkedworkitemsListDeleteRequestDataItemType.LINKEDWORKITEMS, diff --git a/polarion_rest_api_client/open_api_client/api/document_attachments/get_document_attachment.py b/polarion_rest_api_client/open_api_client/api/document_attachments/get_document_attachment.py index 688697c1..0ebfb7ee 100644 --- a/polarion_rest_api_client/open_api_client/api/document_attachments/get_document_attachment.py +++ b/polarion_rest_api_client/open_api_client/api/document_attachments/get_document_attachment.py @@ -21,18 +21,16 @@ def _get_kwargs( document_name: str, attachment_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -43,7 +41,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments/{attachmentId}".format( projectId=project_id, @@ -54,6 +52,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -109,32 +109,27 @@ def sync_detailed( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, DocumentAttachmentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - attachment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentAttachmentsSingleGetResponse]] + """Returns the specified Document Attachment. + + Args: + project_id (str): + space_id (str): + document_name (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentAttachmentsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -161,32 +156,27 @@ def sync( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, DocumentAttachmentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - attachment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentAttachmentsSingleGetResponse] + """Returns the specified Document Attachment. + + Args: + project_id (str): + space_id (str): + document_name (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentAttachmentsSingleGetResponse] """ return sync_detailed( @@ -208,32 +198,27 @@ async def asyncio_detailed( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, DocumentAttachmentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - attachment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentAttachmentsSingleGetResponse]] + """Returns the specified Document Attachment. + + Args: + project_id (str): + space_id (str): + document_name (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentAttachmentsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -258,32 +243,27 @@ async def asyncio( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, DocumentAttachmentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - attachment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentAttachmentsSingleGetResponse] + """Returns the specified Document Attachment. + + Args: + project_id (str): + space_id (str): + document_name (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentAttachmentsSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/document_attachments/get_document_attachment_content.py b/polarion_rest_api_client/open_api_client/api/document_attachments/get_document_attachment_content.py index 56b81690..67d64c9a 100644 --- a/polarion_rest_api_client/open_api_client/api/document_attachments/get_document_attachment_content.py +++ b/polarion_rest_api_client/open_api_client/api/document_attachments/get_document_attachment_content.py @@ -17,18 +17,17 @@ def _get_kwargs( document_name: str, attachment_id: str, *, - revision: Union[Unset, None, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} + params["revision"] = revision params = { k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments/{attachmentId}/content".format( projectId=project_id, @@ -39,6 +38,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -83,28 +84,23 @@ def sync_detailed( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - revision: Union[Unset, None, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Any]: - """Downloads the file content for a specified attachment. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - attachment_id : str - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Downloads the file content for a specified Document Attachment. + + Args: + project_id (str): + space_id (str): + document_name (str): + attachment_id (str): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( @@ -129,28 +125,23 @@ async def asyncio_detailed( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - revision: Union[Unset, None, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Any]: - """Downloads the file content for a specified attachment. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - attachment_id : str - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Downloads the file content for a specified Document Attachment. + + Args: + project_id (str): + space_id (str): + document_name (str): + attachment_id (str): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( diff --git a/polarion_rest_api_client/open_api_client/api/document_attachments/get_document_attachments.py b/polarion_rest_api_client/open_api_client/api/document_attachments/get_document_attachments.py index b7214cb1..9a982323 100644 --- a/polarion_rest_api_client/open_api_client/api/document_attachments/get_document_attachments.py +++ b/polarion_rest_api_client/open_api_client/api/document_attachments/get_document_attachments.py @@ -20,20 +20,18 @@ def _get_kwargs( space_id: str, document_name: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -48,7 +46,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments".format( projectId=project_id, @@ -58,6 +56,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -112,35 +112,30 @@ def sync_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, DocumentAttachmentsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentAttachmentsListGetResponse]] + """Returns a list of Document Attachments. + + Args: + project_id (str): + space_id (str): + document_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentAttachmentsListGetResponse]] """ kwargs = _get_kwargs( @@ -167,35 +162,30 @@ def sync( document_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, DocumentAttachmentsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentAttachmentsListGetResponse] + """Returns a list of Document Attachments. + + Args: + project_id (str): + space_id (str): + document_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentAttachmentsListGetResponse] """ return sync_detailed( @@ -217,35 +207,30 @@ async def asyncio_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, DocumentAttachmentsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentAttachmentsListGetResponse]] + """Returns a list of Document Attachments. + + Args: + project_id (str): + space_id (str): + document_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentAttachmentsListGetResponse]] """ kwargs = _get_kwargs( @@ -270,35 +255,30 @@ async def asyncio( document_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, DocumentAttachmentsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentAttachmentsListGetResponse] + """Returns a list of Document Attachments. + + Args: + project_id (str): + space_id (str): + document_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentAttachmentsListGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/document_attachments/patch_document_attachment.py b/polarion_rest_api_client/open_api_client/api/document_attachments/patch_document_attachment.py index daf0bd00..05e08148 100644 --- a/polarion_rest_api_client/open_api_client/api/document_attachments/patch_document_attachment.py +++ b/polarion_rest_api_client/open_api_client/api/document_attachments/patch_document_attachment.py @@ -20,13 +20,11 @@ def _get_kwargs( document_name: str, attachment_id: str, *, - multipart_data: PatchDocumentAttachmentsRequestBody, + body: PatchDocumentAttachmentsRequestBody, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - multipart_multipart_data = multipart_data.to_multipart() - - return { + _kwargs: Dict[str, Any] = { "method": "patch", "url": "/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments/{attachmentId}".format( projectId=project_id, @@ -34,9 +32,15 @@ def _get_kwargs( documentName=document_name, attachmentId=attachment_id, ), - "files": multipart_multipart_data, } + _body = body.to_multipart() + + _kwargs["files"] = _body + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -85,31 +89,26 @@ def sync_detailed( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - multipart_data: PatchDocumentAttachmentsRequestBody, + body: PatchDocumentAttachmentsRequestBody, ) -> Response[Any]: - r"""Updates the specified instance. + r"""Updates the specified Document Attachment. - See more in the Rest API User Guide. - Parameters - ---------- - project_id : str - space_id : str - document_name : str - attachment_id : str - multipart_data : PatchDocumentAttachmentsRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + Args: + project_id (str): + space_id (str): + document_name (str): + attachment_id (str): + body (PatchDocumentAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( @@ -117,7 +116,7 @@ def sync_detailed( space_id=space_id, document_name=document_name, attachment_id=attachment_id, - multipart_data=multipart_data, + body=body, ) response = client.get_httpx_client().request( @@ -134,31 +133,26 @@ async def asyncio_detailed( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - multipart_data: PatchDocumentAttachmentsRequestBody, + body: PatchDocumentAttachmentsRequestBody, ) -> Response[Any]: - r"""Updates the specified instance. + r"""Updates the specified Document Attachment. - See more in the Rest API User Guide. - Parameters - ---------- - project_id : str - space_id : str - document_name : str - attachment_id : str - multipart_data : PatchDocumentAttachmentsRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + Args: + project_id (str): + space_id (str): + document_name (str): + attachment_id (str): + body (PatchDocumentAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( @@ -166,7 +160,7 @@ async def asyncio_detailed( space_id=space_id, document_name=document_name, attachment_id=attachment_id, - multipart_data=multipart_data, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) diff --git a/polarion_rest_api_client/open_api_client/api/document_attachments/post_document_item_attachments.py b/polarion_rest_api_client/open_api_client/api/document_attachments/post_document_item_attachments.py index 42777843..43e4ed76 100644 --- a/polarion_rest_api_client/open_api_client/api/document_attachments/post_document_item_attachments.py +++ b/polarion_rest_api_client/open_api_client/api/document_attachments/post_document_item_attachments.py @@ -22,22 +22,26 @@ def _get_kwargs( space_id: str, document_name: str, *, - multipart_data: PostDocumentAttachmentsRequestBody, + body: PostDocumentAttachmentsRequestBody, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - multipart_multipart_data = multipart_data.to_multipart() - - return { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments".format( projectId=project_id, spaceId=space_id, documentName=document_name, ), - "files": multipart_multipart_data, } + _body = body.to_multipart() + + _kwargs["files"] = _body + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -101,38 +105,33 @@ def sync_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - multipart_data: PostDocumentAttachmentsRequestBody, + body: PostDocumentAttachmentsRequestBody, ) -> Response[Union[Any, DocumentAttachmentsListPostResponse]]: - r"""Creates a list of instances. + r"""Creates a list of Document Attachments. - Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. - Parameters - ---------- - project_id : str - space_id : str - document_name : str - multipart_data : PostDocumentAttachmentsRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentAttachmentsListPostResponse]] + Args: + project_id (str): + space_id (str): + document_name (str): + body (PostDocumentAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentAttachmentsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, space_id=space_id, document_name=document_name, - multipart_data=multipart_data, + body=body, ) response = client.get_httpx_client().request( @@ -148,31 +147,26 @@ def sync( document_name: str, *, client: Union[AuthenticatedClient, Client], - multipart_data: PostDocumentAttachmentsRequestBody, + body: PostDocumentAttachmentsRequestBody, ) -> Optional[Union[Any, DocumentAttachmentsListPostResponse]]: - r"""Creates a list of instances. + r"""Creates a list of Document Attachments. - Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. - Parameters - ---------- - project_id : str - space_id : str - document_name : str - multipart_data : PostDocumentAttachmentsRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentAttachmentsListPostResponse] + Args: + project_id (str): + space_id (str): + document_name (str): + body (PostDocumentAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentAttachmentsListPostResponse] """ return sync_detailed( @@ -180,7 +174,7 @@ def sync( space_id=space_id, document_name=document_name, client=client, - multipart_data=multipart_data, + body=body, ).parsed @@ -190,38 +184,33 @@ async def asyncio_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - multipart_data: PostDocumentAttachmentsRequestBody, + body: PostDocumentAttachmentsRequestBody, ) -> Response[Union[Any, DocumentAttachmentsListPostResponse]]: - r"""Creates a list of instances. + r"""Creates a list of Document Attachments. - Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. - Parameters - ---------- - project_id : str - space_id : str - document_name : str - multipart_data : PostDocumentAttachmentsRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentAttachmentsListPostResponse]] + Args: + project_id (str): + space_id (str): + document_name (str): + body (PostDocumentAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentAttachmentsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, space_id=space_id, document_name=document_name, - multipart_data=multipart_data, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -235,31 +224,26 @@ async def asyncio( document_name: str, *, client: Union[AuthenticatedClient, Client], - multipart_data: PostDocumentAttachmentsRequestBody, + body: PostDocumentAttachmentsRequestBody, ) -> Optional[Union[Any, DocumentAttachmentsListPostResponse]]: - r"""Creates a list of instances. + r"""Creates a list of Document Attachments. - Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. - Parameters - ---------- - project_id : str - space_id : str - document_name : str - multipart_data : PostDocumentAttachmentsRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentAttachmentsListPostResponse] + Args: + project_id (str): + space_id (str): + document_name (str): + body (PostDocumentAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentAttachmentsListPostResponse] """ return ( @@ -268,6 +252,6 @@ async def asyncio( space_id=space_id, document_name=document_name, client=client, - multipart_data=multipart_data, + body=body, ) ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/document_comments/get_document_comment.py b/polarion_rest_api_client/open_api_client/api/document_comments/get_document_comment.py index 2856ed37..342150a6 100644 --- a/polarion_rest_api_client/open_api_client/api/document_comments/get_document_comment.py +++ b/polarion_rest_api_client/open_api_client/api/document_comments/get_document_comment.py @@ -21,18 +21,16 @@ def _get_kwargs( document_name: str, comment_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -43,7 +41,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments/{commentId}".format( projectId=project_id, @@ -54,6 +52,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -109,32 +109,27 @@ def sync_detailed( comment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, DocumentCommentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - comment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentCommentsSingleGetResponse]] + """Returns the specified Document Comment. + + Args: + project_id (str): + space_id (str): + document_name (str): + comment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentCommentsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -161,32 +156,27 @@ def sync( comment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, DocumentCommentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - comment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentCommentsSingleGetResponse] + """Returns the specified Document Comment. + + Args: + project_id (str): + space_id (str): + document_name (str): + comment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentCommentsSingleGetResponse] """ return sync_detailed( @@ -208,32 +198,27 @@ async def asyncio_detailed( comment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, DocumentCommentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - comment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentCommentsSingleGetResponse]] + """Returns the specified Document Comment. + + Args: + project_id (str): + space_id (str): + document_name (str): + comment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentCommentsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -258,32 +243,27 @@ async def asyncio( comment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, DocumentCommentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - comment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentCommentsSingleGetResponse] + """Returns the specified Document Comment. + + Args: + project_id (str): + space_id (str): + document_name (str): + comment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentCommentsSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/document_comments/get_document_comments.py b/polarion_rest_api_client/open_api_client/api/document_comments/get_document_comments.py index 03b1da01..93898771 100644 --- a/polarion_rest_api_client/open_api_client/api/document_comments/get_document_comments.py +++ b/polarion_rest_api_client/open_api_client/api/document_comments/get_document_comments.py @@ -20,20 +20,18 @@ def _get_kwargs( space_id: str, document_name: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -48,7 +46,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments".format( projectId=project_id, @@ -58,6 +56,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -112,35 +112,30 @@ def sync_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, DocumentCommentsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentCommentsListGetResponse]] + """Returns a list of Document Comments. + + Args: + project_id (str): + space_id (str): + document_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentCommentsListGetResponse]] """ kwargs = _get_kwargs( @@ -167,35 +162,30 @@ def sync( document_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, DocumentCommentsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentCommentsListGetResponse] + """Returns a list of Document Comments. + + Args: + project_id (str): + space_id (str): + document_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentCommentsListGetResponse] """ return sync_detailed( @@ -217,35 +207,30 @@ async def asyncio_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, DocumentCommentsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentCommentsListGetResponse]] + """Returns a list of Document Comments. + + Args: + project_id (str): + space_id (str): + document_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentCommentsListGetResponse]] """ kwargs = _get_kwargs( @@ -270,35 +255,30 @@ async def asyncio( document_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, DocumentCommentsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentCommentsListGetResponse] + """Returns a list of Document Comments. + + Args: + project_id (str): + space_id (str): + document_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentCommentsListGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/document_comments/patch_document_comment.py b/polarion_rest_api_client/open_api_client/api/document_comments/patch_document_comment.py index 0ee8a034..a580d388 100644 --- a/polarion_rest_api_client/open_api_client/api/document_comments/patch_document_comment.py +++ b/polarion_rest_api_client/open_api_client/api/document_comments/patch_document_comment.py @@ -20,13 +20,11 @@ def _get_kwargs( document_name: str, comment_id: str, *, - json_body: DocumentCommentsSinglePatchRequest, + body: DocumentCommentsSinglePatchRequest, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "patch", "url": "/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments/{commentId}".format( projectId=project_id, @@ -34,9 +32,16 @@ def _get_kwargs( documentName=document_name, commentId=comment_id, ), - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -87,28 +92,23 @@ def sync_detailed( comment_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: DocumentCommentsSinglePatchRequest, + body: DocumentCommentsSinglePatchRequest, ) -> Response[Any]: - """Updates the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - comment_id : str - json_body : DocumentCommentsSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Updates the specified Document Comment. + + Args: + project_id (str): + space_id (str): + document_name (str): + comment_id (str): + body (DocumentCommentsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( @@ -116,7 +116,7 @@ def sync_detailed( space_id=space_id, document_name=document_name, comment_id=comment_id, - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -133,28 +133,23 @@ async def asyncio_detailed( comment_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: DocumentCommentsSinglePatchRequest, + body: DocumentCommentsSinglePatchRequest, ) -> Response[Any]: - """Updates the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - comment_id : str - json_body : DocumentCommentsSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Updates the specified Document Comment. + + Args: + project_id (str): + space_id (str): + document_name (str): + comment_id (str): + body (DocumentCommentsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( @@ -162,7 +157,7 @@ async def asyncio_detailed( space_id=space_id, document_name=document_name, comment_id=comment_id, - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) diff --git a/polarion_rest_api_client/open_api_client/api/document_comments/post_document_comments.py b/polarion_rest_api_client/open_api_client/api/document_comments/post_document_comments.py index 88502051..89bce4b0 100644 --- a/polarion_rest_api_client/open_api_client/api/document_comments/post_document_comments.py +++ b/polarion_rest_api_client/open_api_client/api/document_comments/post_document_comments.py @@ -22,22 +22,27 @@ def _get_kwargs( space_id: str, document_name: str, *, - json_body: DocumentCommentsListPostRequest, + body: DocumentCommentsListPostRequest, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments".format( projectId=project_id, spaceId=space_id, documentName=document_name, ), - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -101,34 +106,29 @@ def sync_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: DocumentCommentsListPostRequest, + body: DocumentCommentsListPostRequest, ) -> Response[Union[Any, DocumentCommentsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - json_body : DocumentCommentsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentCommentsListPostResponse]] + """Creates a list of Document Comments. + + Args: + project_id (str): + space_id (str): + document_name (str): + body (DocumentCommentsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentCommentsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, space_id=space_id, document_name=document_name, - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -144,27 +144,22 @@ def sync( document_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: DocumentCommentsListPostRequest, + body: DocumentCommentsListPostRequest, ) -> Optional[Union[Any, DocumentCommentsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - json_body : DocumentCommentsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentCommentsListPostResponse] + """Creates a list of Document Comments. + + Args: + project_id (str): + space_id (str): + document_name (str): + body (DocumentCommentsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentCommentsListPostResponse] """ return sync_detailed( @@ -172,7 +167,7 @@ def sync( space_id=space_id, document_name=document_name, client=client, - json_body=json_body, + body=body, ).parsed @@ -182,34 +177,29 @@ async def asyncio_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: DocumentCommentsListPostRequest, + body: DocumentCommentsListPostRequest, ) -> Response[Union[Any, DocumentCommentsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - json_body : DocumentCommentsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentCommentsListPostResponse]] + """Creates a list of Document Comments. + + Args: + project_id (str): + space_id (str): + document_name (str): + body (DocumentCommentsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentCommentsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, space_id=space_id, document_name=document_name, - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -223,27 +213,22 @@ async def asyncio( document_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: DocumentCommentsListPostRequest, + body: DocumentCommentsListPostRequest, ) -> Optional[Union[Any, DocumentCommentsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - json_body : DocumentCommentsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentCommentsListPostResponse] + """Creates a list of Document Comments. + + Args: + project_id (str): + space_id (str): + document_name (str): + body (DocumentCommentsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentCommentsListPostResponse] """ return ( @@ -252,6 +237,6 @@ async def asyncio( space_id=space_id, document_name=document_name, client=client, - json_body=json_body, + body=body, ) ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/document_parts/get_document_part.py b/polarion_rest_api_client/open_api_client/api/document_parts/get_document_part.py index ad8e68fb..ac18bcc7 100644 --- a/polarion_rest_api_client/open_api_client/api/document_parts/get_document_part.py +++ b/polarion_rest_api_client/open_api_client/api/document_parts/get_document_part.py @@ -21,18 +21,16 @@ def _get_kwargs( document_name: str, part_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -43,7 +41,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/parts/{partId}".format( projectId=project_id, @@ -54,6 +52,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -109,32 +109,27 @@ def sync_detailed( part_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, DocumentPartsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - part_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentPartsSingleGetResponse]] + """Returns the specified Document Part. + + Args: + project_id (str): + space_id (str): + document_name (str): + part_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentPartsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -161,32 +156,27 @@ def sync( part_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, DocumentPartsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - part_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentPartsSingleGetResponse] + """Returns the specified Document Part. + + Args: + project_id (str): + space_id (str): + document_name (str): + part_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentPartsSingleGetResponse] """ return sync_detailed( @@ -208,32 +198,27 @@ async def asyncio_detailed( part_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, DocumentPartsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - part_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentPartsSingleGetResponse]] + """Returns the specified Document Part. + + Args: + project_id (str): + space_id (str): + document_name (str): + part_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentPartsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -258,32 +243,27 @@ async def asyncio( part_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, DocumentPartsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - part_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentPartsSingleGetResponse] + """Returns the specified Document Part. + + Args: + project_id (str): + space_id (str): + document_name (str): + part_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentPartsSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/document_parts/get_document_parts.py b/polarion_rest_api_client/open_api_client/api/document_parts/get_document_parts.py index 6ed954df..271ffe55 100644 --- a/polarion_rest_api_client/open_api_client/api/document_parts/get_document_parts.py +++ b/polarion_rest_api_client/open_api_client/api/document_parts/get_document_parts.py @@ -20,20 +20,18 @@ def _get_kwargs( space_id: str, document_name: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -48,7 +46,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/parts".format( projectId=project_id, @@ -58,6 +56,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -110,35 +110,30 @@ def sync_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, DocumentPartsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentPartsListGetResponse]] + """Returns a list of Document Parts. + + Args: + project_id (str): + space_id (str): + document_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentPartsListGetResponse]] """ kwargs = _get_kwargs( @@ -165,35 +160,30 @@ def sync( document_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, DocumentPartsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentPartsListGetResponse] + """Returns a list of Document Parts. + + Args: + project_id (str): + space_id (str): + document_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentPartsListGetResponse] """ return sync_detailed( @@ -215,35 +205,30 @@ async def asyncio_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, DocumentPartsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentPartsListGetResponse]] + """Returns a list of Document Parts. + + Args: + project_id (str): + space_id (str): + document_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentPartsListGetResponse]] """ kwargs = _get_kwargs( @@ -268,35 +253,30 @@ async def asyncio( document_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, DocumentPartsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentPartsListGetResponse] + """Returns a list of Document Parts. + + Args: + project_id (str): + space_id (str): + document_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentPartsListGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/document_parts/post_document_parts.py b/polarion_rest_api_client/open_api_client/api/document_parts/post_document_parts.py index 7149b126..15f4dfd8 100644 --- a/polarion_rest_api_client/open_api_client/api/document_parts/post_document_parts.py +++ b/polarion_rest_api_client/open_api_client/api/document_parts/post_document_parts.py @@ -22,22 +22,27 @@ def _get_kwargs( space_id: str, document_name: str, *, - json_body: DocumentPartsListPostRequest, + body: DocumentPartsListPostRequest, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/parts".format( projectId=project_id, spaceId=space_id, documentName=document_name, ), - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -99,34 +104,29 @@ def sync_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: DocumentPartsListPostRequest, + body: DocumentPartsListPostRequest, ) -> Response[Union[Any, DocumentPartsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - json_body : DocumentPartsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentPartsListPostResponse]] + """Creates a list of Document Parts. + + Args: + project_id (str): + space_id (str): + document_name (str): + body (DocumentPartsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentPartsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, space_id=space_id, document_name=document_name, - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -142,27 +142,22 @@ def sync( document_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: DocumentPartsListPostRequest, + body: DocumentPartsListPostRequest, ) -> Optional[Union[Any, DocumentPartsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - json_body : DocumentPartsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentPartsListPostResponse] + """Creates a list of Document Parts. + + Args: + project_id (str): + space_id (str): + document_name (str): + body (DocumentPartsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentPartsListPostResponse] """ return sync_detailed( @@ -170,7 +165,7 @@ def sync( space_id=space_id, document_name=document_name, client=client, - json_body=json_body, + body=body, ).parsed @@ -180,34 +175,29 @@ async def asyncio_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: DocumentPartsListPostRequest, + body: DocumentPartsListPostRequest, ) -> Response[Union[Any, DocumentPartsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - json_body : DocumentPartsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentPartsListPostResponse]] + """Creates a list of Document Parts. + + Args: + project_id (str): + space_id (str): + document_name (str): + body (DocumentPartsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentPartsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, space_id=space_id, document_name=document_name, - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -221,27 +211,22 @@ async def asyncio( document_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: DocumentPartsListPostRequest, + body: DocumentPartsListPostRequest, ) -> Optional[Union[Any, DocumentPartsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - json_body : DocumentPartsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentPartsListPostResponse] + """Creates a list of Document Parts. + + Args: + project_id (str): + space_id (str): + document_name (str): + body (DocumentPartsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentPartsListPostResponse] """ return ( @@ -250,6 +235,6 @@ async def asyncio( space_id=space_id, document_name=document_name, client=client, - json_body=json_body, + body=body, ) ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/documents/branch_document.py b/polarion_rest_api_client/open_api_client/api/documents/branch_document.py index 36a065d4..b75d8df1 100644 --- a/polarion_rest_api_client/open_api_client/api/documents/branch_document.py +++ b/polarion_rest_api_client/open_api_client/api/documents/branch_document.py @@ -20,31 +20,37 @@ def _get_kwargs( space_id: str, document_name: str, *, - json_body: BranchDocumentRequestBody, - revision: Union[Unset, None, str] = UNSET, + body: BranchDocumentRequestBody, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} params: Dict[str, Any] = {} + params["revision"] = revision params = { k: v for k, v in params.items() if v is not UNSET and v is not None } - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/branch".format( projectId=project_id, spaceId=space_id, documentName=document_name, ), - "json": json_json_body, "params": params, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -106,36 +112,31 @@ def sync_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: BranchDocumentRequestBody, - revision: Union[Unset, None, str] = UNSET, + body: BranchDocumentRequestBody, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, DocumentsSinglePostResponse]]: - """Creates a branch of the document. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - revision : Union[Unset, None, str] - json_body : BranchDocumentRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentsSinglePostResponse]] + """Creates a Branch of the Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + revision (Union[Unset, str]): + body (BranchDocumentRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentsSinglePostResponse]] """ kwargs = _get_kwargs( project_id=project_id, space_id=space_id, document_name=document_name, - json_body=json_body, + body=body, revision=revision, ) @@ -152,29 +153,24 @@ def sync( document_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: BranchDocumentRequestBody, - revision: Union[Unset, None, str] = UNSET, + body: BranchDocumentRequestBody, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, DocumentsSinglePostResponse]]: - """Creates a branch of the document. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - revision : Union[Unset, None, str] - json_body : BranchDocumentRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentsSinglePostResponse] + """Creates a Branch of the Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + revision (Union[Unset, str]): + body (BranchDocumentRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentsSinglePostResponse] """ return sync_detailed( @@ -182,7 +178,7 @@ def sync( space_id=space_id, document_name=document_name, client=client, - json_body=json_body, + body=body, revision=revision, ).parsed @@ -193,36 +189,31 @@ async def asyncio_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: BranchDocumentRequestBody, - revision: Union[Unset, None, str] = UNSET, + body: BranchDocumentRequestBody, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, DocumentsSinglePostResponse]]: - """Creates a branch of the document. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - revision : Union[Unset, None, str] - json_body : BranchDocumentRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentsSinglePostResponse]] + """Creates a Branch of the Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + revision (Union[Unset, str]): + body (BranchDocumentRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentsSinglePostResponse]] """ kwargs = _get_kwargs( project_id=project_id, space_id=space_id, document_name=document_name, - json_body=json_body, + body=body, revision=revision, ) @@ -237,29 +228,24 @@ async def asyncio( document_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: BranchDocumentRequestBody, - revision: Union[Unset, None, str] = UNSET, + body: BranchDocumentRequestBody, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, DocumentsSinglePostResponse]]: - """Creates a branch of the document. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - revision : Union[Unset, None, str] - json_body : BranchDocumentRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentsSinglePostResponse] + """Creates a Branch of the Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + revision (Union[Unset, str]): + body (BranchDocumentRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentsSinglePostResponse] """ return ( @@ -268,7 +254,7 @@ async def asyncio( space_id=space_id, document_name=document_name, client=client, - json_body=json_body, + body=body, revision=revision, ) ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/documents/branch_documents.py b/polarion_rest_api_client/open_api_client/api/documents/branch_documents.py new file mode 100644 index 00000000..8ec5bac7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/documents/branch_documents.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.branch_documents_request_body import BranchDocumentsRequestBody +from ...types import Response + + +def _get_kwargs( + *, + body: BranchDocumentsRequestBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/all/documents/actions/branch", + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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: Union[AuthenticatedClient, Client], + body: BranchDocumentsRequestBody, +) -> Response[Any]: + """Creates Branches of Documents. + + Args: + body (BranchDocumentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], + body: BranchDocumentsRequestBody, +) -> Response[Any]: + """Creates Branches of Documents. + + Args: + body (BranchDocumentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/documents/copy_document.py b/polarion_rest_api_client/open_api_client/api/documents/copy_document.py index 5ee0208d..3e321ea4 100644 --- a/polarion_rest_api_client/open_api_client/api/documents/copy_document.py +++ b/polarion_rest_api_client/open_api_client/api/documents/copy_document.py @@ -20,31 +20,37 @@ def _get_kwargs( space_id: str, document_name: str, *, - json_body: CopyDocumentRequestBody, - revision: Union[Unset, None, str] = UNSET, + body: CopyDocumentRequestBody, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} params: Dict[str, Any] = {} + params["revision"] = revision params = { k: v for k, v in params.items() if v is not UNSET and v is not None } - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/copy".format( projectId=project_id, spaceId=space_id, documentName=document_name, ), - "json": json_json_body, "params": params, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -106,36 +112,31 @@ def sync_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: CopyDocumentRequestBody, - revision: Union[Unset, None, str] = UNSET, + body: CopyDocumentRequestBody, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, DocumentsSinglePostResponse]]: - """Creates a copy of the document. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - revision : Union[Unset, None, str] - json_body : CopyDocumentRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentsSinglePostResponse]] + """Creates a copy of the Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + revision (Union[Unset, str]): + body (CopyDocumentRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentsSinglePostResponse]] """ kwargs = _get_kwargs( project_id=project_id, space_id=space_id, document_name=document_name, - json_body=json_body, + body=body, revision=revision, ) @@ -152,29 +153,24 @@ def sync( document_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: CopyDocumentRequestBody, - revision: Union[Unset, None, str] = UNSET, + body: CopyDocumentRequestBody, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, DocumentsSinglePostResponse]]: - """Creates a copy of the document. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - revision : Union[Unset, None, str] - json_body : CopyDocumentRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentsSinglePostResponse] + """Creates a copy of the Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + revision (Union[Unset, str]): + body (CopyDocumentRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentsSinglePostResponse] """ return sync_detailed( @@ -182,7 +178,7 @@ def sync( space_id=space_id, document_name=document_name, client=client, - json_body=json_body, + body=body, revision=revision, ).parsed @@ -193,36 +189,31 @@ async def asyncio_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: CopyDocumentRequestBody, - revision: Union[Unset, None, str] = UNSET, + body: CopyDocumentRequestBody, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, DocumentsSinglePostResponse]]: - """Creates a copy of the document. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - revision : Union[Unset, None, str] - json_body : CopyDocumentRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentsSinglePostResponse]] + """Creates a copy of the Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + revision (Union[Unset, str]): + body (CopyDocumentRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentsSinglePostResponse]] """ kwargs = _get_kwargs( project_id=project_id, space_id=space_id, document_name=document_name, - json_body=json_body, + body=body, revision=revision, ) @@ -237,29 +228,24 @@ async def asyncio( document_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: CopyDocumentRequestBody, - revision: Union[Unset, None, str] = UNSET, + body: CopyDocumentRequestBody, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, DocumentsSinglePostResponse]]: - """Creates a copy of the document. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - revision : Union[Unset, None, str] - json_body : CopyDocumentRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentsSinglePostResponse] + """Creates a copy of the Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + revision (Union[Unset, str]): + body (CopyDocumentRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentsSinglePostResponse] """ return ( @@ -268,7 +254,7 @@ async def asyncio( space_id=space_id, document_name=document_name, client=client, - json_body=json_body, + body=body, revision=revision, ) ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/documents/get_available_enum_options_for_document.py b/polarion_rest_api_client/open_api_client/api/documents/get_available_enum_options_for_document.py index 41a3b507..785ef1ff 100644 --- a/polarion_rest_api_client/open_api_client/api/documents/get_available_enum_options_for_document.py +++ b/polarion_rest_api_client/open_api_client/api/documents/get_available_enum_options_for_document.py @@ -20,12 +20,11 @@ def _get_kwargs( document_name: str, field_id: str, *, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} + params["page[size]"] = pagesize params["page[number]"] = pagenumber @@ -34,7 +33,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/fields/{fieldId}/actions/getAvailableOptions".format( projectId=project_id, @@ -45,6 +44,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -98,30 +99,26 @@ def sync_detailed( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Response[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumOptionsActionResponseBody]] + """Returns a list of available options for the requested field in the + specified Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumOptionsActionResponseBody]] """ kwargs = _get_kwargs( @@ -147,30 +144,26 @@ def sync( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Optional[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumOptionsActionResponseBody] + """Returns a list of available options for the requested field in the + specified Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumOptionsActionResponseBody] """ return sync_detailed( @@ -191,30 +184,26 @@ async def asyncio_detailed( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Response[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumOptionsActionResponseBody]] + """Returns a list of available options for the requested field in the + specified Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumOptionsActionResponseBody]] """ kwargs = _get_kwargs( @@ -238,30 +227,26 @@ async def asyncio( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Optional[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumOptionsActionResponseBody] + """Returns a list of available options for the requested field in the + specified Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumOptionsActionResponseBody] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/documents/get_available_enum_options_for_document_type.py b/polarion_rest_api_client/open_api_client/api/documents/get_available_enum_options_for_document_type.py index 3ce96098..ffc0508e 100644 --- a/polarion_rest_api_client/open_api_client/api/documents/get_available_enum_options_for_document_type.py +++ b/polarion_rest_api_client/open_api_client/api/documents/get_available_enum_options_for_document_type.py @@ -18,13 +18,12 @@ def _get_kwargs( project_id: str, field_id: str, *, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - type: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + type: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} + params["page[size]"] = pagesize params["page[number]"] = pagenumber @@ -35,7 +34,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/documents/fields/{fieldId}/actions/getAvailableOptions".format( projectId=project_id, @@ -44,6 +43,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -95,30 +96,26 @@ def sync_detailed( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - type: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + type: Union[Unset, str] = UNSET, ) -> Response[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - type : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumOptionsActionResponseBody]] + """Returns a list of available options for the requested field for the + specified Document type. + + Args: + project_id (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + type (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumOptionsActionResponseBody]] """ kwargs = _get_kwargs( @@ -141,30 +138,26 @@ def sync( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - type: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + type: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - type : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumOptionsActionResponseBody] + """Returns a list of available options for the requested field for the + specified Document type. + + Args: + project_id (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + type (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumOptionsActionResponseBody] """ return sync_detailed( @@ -182,30 +175,26 @@ async def asyncio_detailed( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - type: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + type: Union[Unset, str] = UNSET, ) -> Response[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - type : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumOptionsActionResponseBody]] + """Returns a list of available options for the requested field for the + specified Document type. + + Args: + project_id (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + type (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumOptionsActionResponseBody]] """ kwargs = _get_kwargs( @@ -226,30 +215,26 @@ async def asyncio( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - type: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + type: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - type : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumOptionsActionResponseBody] + """Returns a list of available options for the requested field for the + specified Document type. + + Args: + project_id (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + type (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumOptionsActionResponseBody] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/documents/get_current_enumeration_options_for_document.py b/polarion_rest_api_client/open_api_client/api/documents/get_current_enumeration_options_for_document.py index 6f4ccf8b..b30655c3 100644 --- a/polarion_rest_api_client/open_api_client/api/documents/get_current_enumeration_options_for_document.py +++ b/polarion_rest_api_client/open_api_client/api/documents/get_current_enumeration_options_for_document.py @@ -20,13 +20,12 @@ def _get_kwargs( document_name: str, field_id: str, *, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} + params["page[size]"] = pagesize params["page[number]"] = pagenumber @@ -37,7 +36,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/fields/{fieldId}/actions/getCurrentOptions".format( projectId=project_id, @@ -48,6 +47,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -101,32 +102,28 @@ def sync_detailed( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumOptionsActionResponseBody]] + """Returns a list of selected options for the requested field in the + specified Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumOptionsActionResponseBody]] """ kwargs = _get_kwargs( @@ -153,32 +150,28 @@ def sync( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumOptionsActionResponseBody] + """Returns a list of selected options for the requested field in the + specified Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumOptionsActionResponseBody] """ return sync_detailed( @@ -200,32 +193,28 @@ async def asyncio_detailed( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumOptionsActionResponseBody]] + """Returns a list of selected options for the requested field in the + specified Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumOptionsActionResponseBody]] """ kwargs = _get_kwargs( @@ -250,32 +239,28 @@ async def asyncio( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumOptionsActionResponseBody] + """Returns a list of selected options for the requested field in the + specified Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumOptionsActionResponseBody] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/documents/get_document.py b/polarion_rest_api_client/open_api_client/api/documents/get_document.py index 560cd4b7..bf0bf089 100644 --- a/polarion_rest_api_client/open_api_client/api/documents/get_document.py +++ b/polarion_rest_api_client/open_api_client/api/documents/get_document.py @@ -18,18 +18,16 @@ def _get_kwargs( space_id: str, document_name: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -40,7 +38,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/spaces/{spaceId}/documents/{documentName}".format( projectId=project_id, @@ -50,6 +48,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -102,31 +102,26 @@ def sync_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, DocumentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentsSingleGetResponse]] + """Returns the specified Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -151,31 +146,26 @@ def sync( document_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, DocumentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentsSingleGetResponse] + """Returns the specified Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentsSingleGetResponse] """ return sync_detailed( @@ -195,31 +185,26 @@ async def asyncio_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, DocumentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentsSingleGetResponse]] + """Returns the specified Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -242,31 +227,26 @@ async def asyncio( document_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, DocumentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentsSingleGetResponse] + """Returns the specified Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentsSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/documents/patch_document.py b/polarion_rest_api_client/open_api_client/api/documents/patch_document.py index c8a6cb3f..b65ddd3e 100644 --- a/polarion_rest_api_client/open_api_client/api/documents/patch_document.py +++ b/polarion_rest_api_client/open_api_client/api/documents/patch_document.py @@ -19,31 +19,37 @@ def _get_kwargs( space_id: str, document_name: str, *, - json_body: DocumentsSinglePatchRequest, - workflow_action: Union[Unset, None, str] = UNSET, + body: DocumentsSinglePatchRequest, + workflow_action: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} params: Dict[str, Any] = {} + params["workflowAction"] = workflow_action params = { k: v for k, v in params.items() if v is not UNSET and v is not None } - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "patch", "url": "/projects/{projectId}/spaces/{spaceId}/documents/{documentName}".format( projectId=project_id, spaceId=space_id, documentName=document_name, ), - "json": json_json_body, "params": params, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -91,36 +97,31 @@ def sync_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: DocumentsSinglePatchRequest, - workflow_action: Union[Unset, None, str] = UNSET, + body: DocumentsSinglePatchRequest, + workflow_action: Union[Unset, str] = UNSET, ) -> Response[Any]: - """Updates the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - workflow_action : Union[Unset, None, str] - json_body : DocumentsSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Updates the specified Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + workflow_action (Union[Unset, str]): + body (DocumentsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( project_id=project_id, space_id=space_id, document_name=document_name, - json_body=json_body, + body=body, workflow_action=workflow_action, ) @@ -137,36 +138,31 @@ async def asyncio_detailed( document_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: DocumentsSinglePatchRequest, - workflow_action: Union[Unset, None, str] = UNSET, + body: DocumentsSinglePatchRequest, + workflow_action: Union[Unset, str] = UNSET, ) -> Response[Any]: - """Updates the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - document_name : str - workflow_action : Union[Unset, None, str] - json_body : DocumentsSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Updates the specified Document. + + Args: + project_id (str): + space_id (str): + document_name (str): + workflow_action (Union[Unset, str]): + body (DocumentsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( project_id=project_id, space_id=space_id, document_name=document_name, - json_body=json_body, + body=body, workflow_action=workflow_action, ) diff --git a/polarion_rest_api_client/open_api_client/api/documents/post_documents.py b/polarion_rest_api_client/open_api_client/api/documents/post_documents.py index b480f28a..8a56f5eb 100644 --- a/polarion_rest_api_client/open_api_client/api/documents/post_documents.py +++ b/polarion_rest_api_client/open_api_client/api/documents/post_documents.py @@ -17,21 +17,26 @@ def _get_kwargs( project_id: str, space_id: str, *, - json_body: DocumentsListPostRequest, + body: DocumentsListPostRequest, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/projects/{projectId}/spaces/{spaceId}/documents".format( projectId=project_id, spaceId=space_id, ), - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -92,32 +97,27 @@ def sync_detailed( space_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: DocumentsListPostRequest, + body: DocumentsListPostRequest, ) -> Response[Union[Any, DocumentsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - json_body : DocumentsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentsListPostResponse]] + """Creates a list of Documents. + + Args: + project_id (str): + space_id (str): + body (DocumentsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, space_id=space_id, - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -132,33 +132,28 @@ def sync( space_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: DocumentsListPostRequest, + body: DocumentsListPostRequest, ) -> Optional[Union[Any, DocumentsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - json_body : DocumentsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentsListPostResponse] + """Creates a list of Documents. + + Args: + project_id (str): + space_id (str): + body (DocumentsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentsListPostResponse] """ return sync_detailed( project_id=project_id, space_id=space_id, client=client, - json_body=json_body, + body=body, ).parsed @@ -167,32 +162,27 @@ async def asyncio_detailed( space_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: DocumentsListPostRequest, + body: DocumentsListPostRequest, ) -> Response[Union[Any, DocumentsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - json_body : DocumentsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, DocumentsListPostResponse]] + """Creates a list of Documents. + + Args: + project_id (str): + space_id (str): + body (DocumentsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, DocumentsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, space_id=space_id, - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -205,26 +195,21 @@ async def asyncio( space_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: DocumentsListPostRequest, + body: DocumentsListPostRequest, ) -> Optional[Union[Any, DocumentsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - space_id : str - json_body : DocumentsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, DocumentsListPostResponse] + """Creates a list of Documents. + + Args: + project_id (str): + space_id (str): + body (DocumentsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, DocumentsListPostResponse] """ return ( @@ -232,6 +217,6 @@ async def asyncio( project_id=project_id, space_id=space_id, client=client, - json_body=json_body, + body=body, ) ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/enumerations/delete_global_enumeration.py b/polarion_rest_api_client/open_api_client/api/enumerations/delete_global_enumeration.py index 649ad15e..373565b5 100644 --- a/polarion_rest_api_client/open_api_client/api/enumerations/delete_global_enumeration.py +++ b/polarion_rest_api_client/open_api_client/api/enumerations/delete_global_enumeration.py @@ -16,9 +16,7 @@ def _get_kwargs( enum_name: str, target_type: str, ) -> Dict[str, Any]: - pass - - return { + _kwargs: Dict[str, Any] = { "method": "delete", "url": "/enumerations/{enumContext}/{enumName}/{targetType}".format( enumContext=enum_context, @@ -27,6 +25,8 @@ def _get_kwargs( ), } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -69,24 +69,19 @@ def sync_detailed( *, client: Union[AuthenticatedClient, Client], ) -> Response[Any]: - """Deletes the specified instance. - - Parameters - ---------- - enum_context : str - enum_name : str - target_type : str - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Deletes the specified Enumeration from the Global context. + + Args: + enum_context (str): + enum_name (str): + target_type (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( @@ -109,24 +104,19 @@ async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], ) -> Response[Any]: - """Deletes the specified instance. - - Parameters - ---------- - enum_context : str - enum_name : str - target_type : str - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Deletes the specified Enumeration from the Global context. + + Args: + enum_context (str): + enum_name (str): + target_type (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( diff --git a/polarion_rest_api_client/open_api_client/api/enumerations/delete_project_enumeration.py b/polarion_rest_api_client/open_api_client/api/enumerations/delete_project_enumeration.py index 31032997..5665ae78 100644 --- a/polarion_rest_api_client/open_api_client/api/enumerations/delete_project_enumeration.py +++ b/polarion_rest_api_client/open_api_client/api/enumerations/delete_project_enumeration.py @@ -17,9 +17,7 @@ def _get_kwargs( enum_name: str, target_type: str, ) -> Dict[str, Any]: - pass - - return { + _kwargs: Dict[str, Any] = { "method": "delete", "url": "/projects/{projectId}/enumerations/{enumContext}/{enumName}/{targetType}".format( projectId=project_id, @@ -29,6 +27,8 @@ def _get_kwargs( ), } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -72,25 +72,20 @@ def sync_detailed( *, client: Union[AuthenticatedClient, Client], ) -> Response[Any]: - """Deletes the specified instance. - - Parameters - ---------- - project_id : str - enum_context : str - enum_name : str - target_type : str - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Deletes the specified Enumeration from the Project context. + + Args: + project_id (str): + enum_context (str): + enum_name (str): + target_type (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( @@ -115,25 +110,20 @@ async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], ) -> Response[Any]: - """Deletes the specified instance. - - Parameters - ---------- - project_id : str - enum_context : str - enum_name : str - target_type : str - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Deletes the specified Enumeration from the Project context. + + Args: + project_id (str): + enum_context (str): + enum_name (str): + target_type (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( diff --git a/polarion_rest_api_client/open_api_client/api/enumerations/get_global_enumeration.py b/polarion_rest_api_client/open_api_client/api/enumerations/get_global_enumeration.py index 68970349..262d07fe 100644 --- a/polarion_rest_api_client/open_api_client/api/enumerations/get_global_enumeration.py +++ b/polarion_rest_api_client/open_api_client/api/enumerations/get_global_enumeration.py @@ -20,17 +20,15 @@ def _get_kwargs( enum_name: str, target_type: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -39,7 +37,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/enumerations/{enumContext}/{enumName}/{targetType}".format( enumContext=enum_context, @@ -49,6 +47,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -101,29 +101,24 @@ def sync_detailed( target_type: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, ) -> Response[Union[Any, EnumerationsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - enum_context : str - enum_name : str - target_type : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumerationsSingleGetResponse]] + """Returns the specified Enumeration from the Global context. + + Args: + enum_context (str): + enum_name (str): + target_type (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumerationsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -147,29 +142,24 @@ def sync( target_type: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, EnumerationsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - enum_context : str - enum_name : str - target_type : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumerationsSingleGetResponse] + """Returns the specified Enumeration from the Global context. + + Args: + enum_context (str): + enum_name (str): + target_type (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumerationsSingleGetResponse] """ return sync_detailed( @@ -188,29 +178,24 @@ async def asyncio_detailed( target_type: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, ) -> Response[Union[Any, EnumerationsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - enum_context : str - enum_name : str - target_type : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumerationsSingleGetResponse]] + """Returns the specified Enumeration from the Global context. + + Args: + enum_context (str): + enum_name (str): + target_type (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumerationsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -232,29 +217,24 @@ async def asyncio( target_type: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, EnumerationsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - enum_context : str - enum_name : str - target_type : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumerationsSingleGetResponse] + """Returns the specified Enumeration from the Global context. + + Args: + enum_context (str): + enum_name (str): + target_type (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumerationsSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/enumerations/get_project_enumeration.py b/polarion_rest_api_client/open_api_client/api/enumerations/get_project_enumeration.py index 0609298a..e6c6a0e5 100644 --- a/polarion_rest_api_client/open_api_client/api/enumerations/get_project_enumeration.py +++ b/polarion_rest_api_client/open_api_client/api/enumerations/get_project_enumeration.py @@ -21,17 +21,15 @@ def _get_kwargs( enum_name: str, target_type: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -40,7 +38,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/enumerations/{enumContext}/{enumName}/{targetType}".format( projectId=project_id, @@ -51,6 +49,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -104,30 +104,25 @@ def sync_detailed( target_type: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, ) -> Response[Union[Any, EnumerationsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - enum_context : str - enum_name : str - target_type : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumerationsSingleGetResponse]] + """Returns the specified Enumeration from the Project context. + + Args: + project_id (str): + enum_context (str): + enum_name (str): + target_type (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumerationsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -153,30 +148,25 @@ def sync( target_type: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, EnumerationsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - enum_context : str - enum_name : str - target_type : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumerationsSingleGetResponse] + """Returns the specified Enumeration from the Project context. + + Args: + project_id (str): + enum_context (str): + enum_name (str): + target_type (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumerationsSingleGetResponse] """ return sync_detailed( @@ -197,30 +187,25 @@ async def asyncio_detailed( target_type: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, ) -> Response[Union[Any, EnumerationsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - enum_context : str - enum_name : str - target_type : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumerationsSingleGetResponse]] + """Returns the specified Enumeration from the Project context. + + Args: + project_id (str): + enum_context (str): + enum_name (str): + target_type (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumerationsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -244,30 +229,25 @@ async def asyncio( target_type: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, EnumerationsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - enum_context : str - enum_name : str - target_type : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumerationsSingleGetResponse] + """Returns the specified Enumeration from the Project context. + + Args: + project_id (str): + enum_context (str): + enum_name (str): + target_type (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumerationsSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/enumerations/patch_global_enumeration.py b/polarion_rest_api_client/open_api_client/api/enumerations/patch_global_enumeration.py index ceeeb181..39cdea21 100644 --- a/polarion_rest_api_client/open_api_client/api/enumerations/patch_global_enumeration.py +++ b/polarion_rest_api_client/open_api_client/api/enumerations/patch_global_enumeration.py @@ -19,22 +19,27 @@ def _get_kwargs( enum_name: str, target_type: str, *, - json_body: EnumerationsSinglePatchRequest, + body: EnumerationsSinglePatchRequest, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "patch", "url": "/enumerations/{enumContext}/{enumName}/{targetType}".format( enumContext=enum_context, enumName=enum_name, targetType=target_type, ), - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -95,34 +100,29 @@ def sync_detailed( target_type: str, *, client: Union[AuthenticatedClient, Client], - json_body: EnumerationsSinglePatchRequest, + body: EnumerationsSinglePatchRequest, ) -> Response[Union[Any, EnumerationsSinglePatchRequest]]: - """Updates the specified instance. - - Parameters - ---------- - enum_context : str - enum_name : str - target_type : str - json_body : EnumerationsSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumerationsSinglePatchRequest]] + """Updates the specified Enumeration in the Global context. + + Args: + enum_context (str): + enum_name (str): + target_type (str): + body (EnumerationsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumerationsSinglePatchRequest]] """ kwargs = _get_kwargs( enum_context=enum_context, enum_name=enum_name, target_type=target_type, - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -138,27 +138,22 @@ def sync( target_type: str, *, client: Union[AuthenticatedClient, Client], - json_body: EnumerationsSinglePatchRequest, + body: EnumerationsSinglePatchRequest, ) -> Optional[Union[Any, EnumerationsSinglePatchRequest]]: - """Updates the specified instance. - - Parameters - ---------- - enum_context : str - enum_name : str - target_type : str - json_body : EnumerationsSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumerationsSinglePatchRequest] + """Updates the specified Enumeration in the Global context. + + Args: + enum_context (str): + enum_name (str): + target_type (str): + body (EnumerationsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumerationsSinglePatchRequest] """ return sync_detailed( @@ -166,7 +161,7 @@ def sync( enum_name=enum_name, target_type=target_type, client=client, - json_body=json_body, + body=body, ).parsed @@ -176,34 +171,29 @@ async def asyncio_detailed( target_type: str, *, client: Union[AuthenticatedClient, Client], - json_body: EnumerationsSinglePatchRequest, + body: EnumerationsSinglePatchRequest, ) -> Response[Union[Any, EnumerationsSinglePatchRequest]]: - """Updates the specified instance. - - Parameters - ---------- - enum_context : str - enum_name : str - target_type : str - json_body : EnumerationsSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumerationsSinglePatchRequest]] + """Updates the specified Enumeration in the Global context. + + Args: + enum_context (str): + enum_name (str): + target_type (str): + body (EnumerationsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumerationsSinglePatchRequest]] """ kwargs = _get_kwargs( enum_context=enum_context, enum_name=enum_name, target_type=target_type, - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -217,27 +207,22 @@ async def asyncio( target_type: str, *, client: Union[AuthenticatedClient, Client], - json_body: EnumerationsSinglePatchRequest, + body: EnumerationsSinglePatchRequest, ) -> Optional[Union[Any, EnumerationsSinglePatchRequest]]: - """Updates the specified instance. - - Parameters - ---------- - enum_context : str - enum_name : str - target_type : str - json_body : EnumerationsSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumerationsSinglePatchRequest] + """Updates the specified Enumeration in the Global context. + + Args: + enum_context (str): + enum_name (str): + target_type (str): + body (EnumerationsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumerationsSinglePatchRequest] """ return ( @@ -246,6 +231,6 @@ async def asyncio( enum_name=enum_name, target_type=target_type, client=client, - json_body=json_body, + body=body, ) ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/enumerations/patch_project_enumeration.py b/polarion_rest_api_client/open_api_client/api/enumerations/patch_project_enumeration.py index be9d513e..3394a1d6 100644 --- a/polarion_rest_api_client/open_api_client/api/enumerations/patch_project_enumeration.py +++ b/polarion_rest_api_client/open_api_client/api/enumerations/patch_project_enumeration.py @@ -20,13 +20,11 @@ def _get_kwargs( enum_name: str, target_type: str, *, - json_body: EnumerationsSinglePatchRequest, + body: EnumerationsSinglePatchRequest, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "patch", "url": "/projects/{projectId}/enumerations/{enumContext}/{enumName}/{targetType}".format( projectId=project_id, @@ -34,9 +32,16 @@ def _get_kwargs( enumName=enum_name, targetType=target_type, ), - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -101,28 +106,23 @@ def sync_detailed( target_type: str, *, client: Union[AuthenticatedClient, Client], - json_body: EnumerationsSinglePatchRequest, + body: EnumerationsSinglePatchRequest, ) -> Response[Union[Any, EnumerationsSinglePatchRequest]]: - """Updates the specified instance. - - Parameters - ---------- - project_id : str - enum_context : str - enum_name : str - target_type : str - json_body : EnumerationsSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumerationsSinglePatchRequest]] + """Updates the specified Enumeration in the Project context. + + Args: + project_id (str): + enum_context (str): + enum_name (str): + target_type (str): + body (EnumerationsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumerationsSinglePatchRequest]] """ kwargs = _get_kwargs( @@ -130,7 +130,7 @@ def sync_detailed( enum_context=enum_context, enum_name=enum_name, target_type=target_type, - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -147,28 +147,23 @@ def sync( target_type: str, *, client: Union[AuthenticatedClient, Client], - json_body: EnumerationsSinglePatchRequest, + body: EnumerationsSinglePatchRequest, ) -> Optional[Union[Any, EnumerationsSinglePatchRequest]]: - """Updates the specified instance. - - Parameters - ---------- - project_id : str - enum_context : str - enum_name : str - target_type : str - json_body : EnumerationsSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumerationsSinglePatchRequest] + """Updates the specified Enumeration in the Project context. + + Args: + project_id (str): + enum_context (str): + enum_name (str): + target_type (str): + body (EnumerationsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumerationsSinglePatchRequest] """ return sync_detailed( @@ -177,7 +172,7 @@ def sync( enum_name=enum_name, target_type=target_type, client=client, - json_body=json_body, + body=body, ).parsed @@ -188,28 +183,23 @@ async def asyncio_detailed( target_type: str, *, client: Union[AuthenticatedClient, Client], - json_body: EnumerationsSinglePatchRequest, + body: EnumerationsSinglePatchRequest, ) -> Response[Union[Any, EnumerationsSinglePatchRequest]]: - """Updates the specified instance. - - Parameters - ---------- - project_id : str - enum_context : str - enum_name : str - target_type : str - json_body : EnumerationsSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumerationsSinglePatchRequest]] + """Updates the specified Enumeration in the Project context. + + Args: + project_id (str): + enum_context (str): + enum_name (str): + target_type (str): + body (EnumerationsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumerationsSinglePatchRequest]] """ kwargs = _get_kwargs( @@ -217,7 +207,7 @@ async def asyncio_detailed( enum_context=enum_context, enum_name=enum_name, target_type=target_type, - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -232,28 +222,23 @@ async def asyncio( target_type: str, *, client: Union[AuthenticatedClient, Client], - json_body: EnumerationsSinglePatchRequest, + body: EnumerationsSinglePatchRequest, ) -> Optional[Union[Any, EnumerationsSinglePatchRequest]]: - """Updates the specified instance. - - Parameters - ---------- - project_id : str - enum_context : str - enum_name : str - target_type : str - json_body : EnumerationsSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumerationsSinglePatchRequest] + """Updates the specified Enumeration in the Project context. + + Args: + project_id (str): + enum_context (str): + enum_name (str): + target_type (str): + body (EnumerationsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumerationsSinglePatchRequest] """ return ( @@ -263,6 +248,6 @@ async def asyncio( enum_name=enum_name, target_type=target_type, client=client, - json_body=json_body, + body=body, ) ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/enumerations/post_global_enumeration.py b/polarion_rest_api_client/open_api_client/api/enumerations/post_global_enumeration.py index 31f571c3..7a383311 100644 --- a/polarion_rest_api_client/open_api_client/api/enumerations/post_global_enumeration.py +++ b/polarion_rest_api_client/open_api_client/api/enumerations/post_global_enumeration.py @@ -19,18 +19,23 @@ def _get_kwargs( *, - json_body: EnumerationsListPostRequest, + body: EnumerationsListPostRequest, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/enumerations", - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -89,28 +94,23 @@ def _build_response( def sync_detailed( *, client: Union[AuthenticatedClient, Client], - json_body: EnumerationsListPostRequest, + body: EnumerationsListPostRequest, ) -> Response[Union[Any, EnumerationsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - json_body : EnumerationsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumerationsListPostResponse]] + """Creates a list of Enumerations in the Global context. + + Args: + body (EnumerationsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumerationsListPostResponse]] """ kwargs = _get_kwargs( - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -123,57 +123,47 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], - json_body: EnumerationsListPostRequest, + body: EnumerationsListPostRequest, ) -> Optional[Union[Any, EnumerationsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - json_body : EnumerationsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumerationsListPostResponse] + """Creates a list of Enumerations in the Global context. + + Args: + body (EnumerationsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumerationsListPostResponse] """ return sync_detailed( client=client, - json_body=json_body, + body=body, ).parsed async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], - json_body: EnumerationsListPostRequest, + body: EnumerationsListPostRequest, ) -> Response[Union[Any, EnumerationsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - json_body : EnumerationsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumerationsListPostResponse]] + """Creates a list of Enumerations in the Global context. + + Args: + body (EnumerationsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumerationsListPostResponse]] """ kwargs = _get_kwargs( - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -184,29 +174,24 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], - json_body: EnumerationsListPostRequest, + body: EnumerationsListPostRequest, ) -> Optional[Union[Any, EnumerationsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - json_body : EnumerationsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumerationsListPostResponse] + """Creates a list of Enumerations in the Global context. + + Args: + body (EnumerationsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumerationsListPostResponse] """ return ( await asyncio_detailed( client=client, - json_body=json_body, + body=body, ) ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/enumerations/post_project_enumeration.py b/polarion_rest_api_client/open_api_client/api/enumerations/post_project_enumeration.py index 5a3ad99d..3385f533 100644 --- a/polarion_rest_api_client/open_api_client/api/enumerations/post_project_enumeration.py +++ b/polarion_rest_api_client/open_api_client/api/enumerations/post_project_enumeration.py @@ -20,20 +20,25 @@ def _get_kwargs( project_id: str, *, - json_body: EnumerationsListPostRequest, + body: EnumerationsListPostRequest, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/projects/{projectId}/enumerations".format( projectId=project_id, ), - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -93,30 +98,25 @@ def sync_detailed( project_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: EnumerationsListPostRequest, + body: EnumerationsListPostRequest, ) -> Response[Union[Any, EnumerationsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - json_body : EnumerationsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumerationsListPostResponse]] + """Creates a list of Enumerations in the Project context. + + Args: + project_id (str): + body (EnumerationsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumerationsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -130,31 +130,26 @@ def sync( project_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: EnumerationsListPostRequest, + body: EnumerationsListPostRequest, ) -> Optional[Union[Any, EnumerationsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - json_body : EnumerationsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumerationsListPostResponse] + """Creates a list of Enumerations in the Project context. + + Args: + project_id (str): + body (EnumerationsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumerationsListPostResponse] """ return sync_detailed( project_id=project_id, client=client, - json_body=json_body, + body=body, ).parsed @@ -162,30 +157,25 @@ async def asyncio_detailed( project_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: EnumerationsListPostRequest, + body: EnumerationsListPostRequest, ) -> Response[Union[Any, EnumerationsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - json_body : EnumerationsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumerationsListPostResponse]] + """Creates a list of Enumerations in the Project context. + + Args: + project_id (str): + body (EnumerationsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumerationsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -197,31 +187,26 @@ async def asyncio( project_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: EnumerationsListPostRequest, + body: EnumerationsListPostRequest, ) -> Optional[Union[Any, EnumerationsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - json_body : EnumerationsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumerationsListPostResponse] + """Creates a list of Enumerations in the Project context. + + Args: + project_id (str): + body (EnumerationsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumerationsListPostResponse] """ return ( await asyncio_detailed( project_id=project_id, client=client, - json_body=json_body, + body=body, ) ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/externally_linked_work_items/__init__.py b/polarion_rest_api_client/open_api_client/api/externally_linked_work_items/__init__.py new file mode 100644 index 00000000..dd5d085d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/externally_linked_work_items/__init__.py @@ -0,0 +1,2 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 diff --git a/polarion_rest_api_client/open_api_client/api/externally_linked_work_items/delete_externally_linked_work_item.py b/polarion_rest_api_client/open_api_client/api/externally_linked_work_items/delete_externally_linked_work_item.py new file mode 100644 index 00000000..1ed61218 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/externally_linked_work_items/delete_externally_linked_work_item.py @@ -0,0 +1,156 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + role_id: str, + hostname: str, + target_project_id: str, + linked_work_item_id: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems/{roleId}/{hostname}/{targetProjectId}/{linkedWorkItemId}".format( + projectId=project_id, + workItemId=work_item_id, + roleId=role_id, + hostname=hostname, + targetProjectId=target_project_id, + linkedWorkItemId=linked_work_item_id, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + work_item_id: str, + role_id: str, + hostname: str, + target_project_id: str, + linked_work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Externally Linked Work Item. + + Args: + project_id (str): + work_item_id (str): + role_id (str): + hostname (str): + target_project_id (str): + linked_work_item_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + role_id=role_id, + hostname=hostname, + target_project_id=target_project_id, + linked_work_item_id=linked_work_item_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + role_id: str, + hostname: str, + target_project_id: str, + linked_work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Externally Linked Work Item. + + Args: + project_id (str): + work_item_id (str): + role_id (str): + hostname (str): + target_project_id (str): + linked_work_item_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + role_id=role_id, + hostname=hostname, + target_project_id=target_project_id, + linked_work_item_id=linked_work_item_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/externally_linked_work_items/delete_externally_linked_work_items.py b/polarion_rest_api_client/open_api_client/api/externally_linked_work_items/delete_externally_linked_work_items.py new file mode 100644 index 00000000..a636c96d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/externally_linked_work_items/delete_externally_linked_work_items.py @@ -0,0 +1,145 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.externallylinkedworkitems_list_delete_request import ( + ExternallylinkedworkitemsListDeleteRequest, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + body: ExternallylinkedworkitemsListDeleteRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems".format( + projectId=project_id, + workItemId=work_item_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: ExternallylinkedworkitemsListDeleteRequest, +) -> Response[Any]: + """Deletes a list of Externally Linked Work Items. + + Args: + project_id (str): + work_item_id (str): + body (ExternallylinkedworkitemsListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: ExternallylinkedworkitemsListDeleteRequest, +) -> Response[Any]: + """Deletes a list of Externally Linked Work Items. + + Args: + project_id (str): + work_item_id (str): + body (ExternallylinkedworkitemsListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/externally_linked_work_items/get_externally_linked_work_item.py b/polarion_rest_api_client/open_api_client/api/externally_linked_work_items/get_externally_linked_work_item.py new file mode 100644 index 00000000..ce7e0d69 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/externally_linked_work_items/get_externally_linked_work_item.py @@ -0,0 +1,316 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.externallylinkedworkitems_single_get_response import ( + ExternallylinkedworkitemsSingleGetResponse, +) +from ...models.sparse_fields import SparseFields +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + work_item_id: str, + role_id: str, + hostname: str, + target_project_id: str, + linked_work_item_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["revision"] = revision + + 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": "/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems/{roleId}/{hostname}/{targetProjectId}/{linkedWorkItemId}".format( + projectId=project_id, + workItemId=work_item_id, + roleId=role_id, + hostname=hostname, + targetProjectId=target_project_id, + linkedWorkItemId=linked_work_item_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, ExternallylinkedworkitemsSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = ExternallylinkedworkitemsSingleGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, ExternallylinkedworkitemsSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + role_id: str, + hostname: str, + target_project_id: str, + linked_work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, ExternallylinkedworkitemsSingleGetResponse]]: + """Returns the specified Externally Linked Work Item. + + Returns the external links to other Work Items. (The same as the corresponding Java API method.) + + Args: + project_id (str): + work_item_id (str): + role_id (str): + hostname (str): + target_project_id (str): + linked_work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ExternallylinkedworkitemsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + role_id=role_id, + hostname=hostname, + target_project_id=target_project_id, + linked_work_item_id=linked_work_item_id, + fields=fields, + include=include, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + role_id: str, + hostname: str, + target_project_id: str, + linked_work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, ExternallylinkedworkitemsSingleGetResponse]]: + """Returns the specified Externally Linked Work Item. + + Returns the external links to other Work Items. (The same as the corresponding Java API method.) + + Args: + project_id (str): + work_item_id (str): + role_id (str): + hostname (str): + target_project_id (str): + linked_work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ExternallylinkedworkitemsSingleGetResponse] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + role_id=role_id, + hostname=hostname, + target_project_id=target_project_id, + linked_work_item_id=linked_work_item_id, + client=client, + fields=fields, + include=include, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + role_id: str, + hostname: str, + target_project_id: str, + linked_work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, ExternallylinkedworkitemsSingleGetResponse]]: + """Returns the specified Externally Linked Work Item. + + Returns the external links to other Work Items. (The same as the corresponding Java API method.) + + Args: + project_id (str): + work_item_id (str): + role_id (str): + hostname (str): + target_project_id (str): + linked_work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ExternallylinkedworkitemsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + role_id=role_id, + hostname=hostname, + target_project_id=target_project_id, + linked_work_item_id=linked_work_item_id, + fields=fields, + include=include, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + role_id: str, + hostname: str, + target_project_id: str, + linked_work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, ExternallylinkedworkitemsSingleGetResponse]]: + """Returns the specified Externally Linked Work Item. + + Returns the external links to other Work Items. (The same as the corresponding Java API method.) + + Args: + project_id (str): + work_item_id (str): + role_id (str): + hostname (str): + target_project_id (str): + linked_work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ExternallylinkedworkitemsSingleGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + role_id=role_id, + hostname=hostname, + target_project_id=target_project_id, + linked_work_item_id=linked_work_item_id, + client=client, + fields=fields, + include=include, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/externally_linked_work_items/get_externally_linked_work_items.py b/polarion_rest_api_client/open_api_client/api/externally_linked_work_items/get_externally_linked_work_items.py new file mode 100644 index 00000000..5f1473b3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/externally_linked_work_items/get_externally_linked_work_items.py @@ -0,0 +1,290 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.externallylinkedworkitems_list_get_response import ( + ExternallylinkedworkitemsListGetResponse, +) +from ...models.sparse_fields import SparseFields +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["revision"] = revision + + 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": "/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems".format( + projectId=project_id, + workItemId=work_item_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, ExternallylinkedworkitemsListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = ExternallylinkedworkitemsListGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, ExternallylinkedworkitemsListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, ExternallylinkedworkitemsListGetResponse]]: + """Returns a list of Externally Linked Work Items. + + Returns the external links to other Work Items. (The same as the corresponding Java API method.) + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ExternallylinkedworkitemsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, ExternallylinkedworkitemsListGetResponse]]: + """Returns a list of Externally Linked Work Items. + + Returns the external links to other Work Items. (The same as the corresponding Java API method.) + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ExternallylinkedworkitemsListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, ExternallylinkedworkitemsListGetResponse]]: + """Returns a list of Externally Linked Work Items. + + Returns the external links to other Work Items. (The same as the corresponding Java API method.) + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ExternallylinkedworkitemsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, ExternallylinkedworkitemsListGetResponse]]: + """Returns a list of Externally Linked Work Items. + + Returns the external links to other Work Items. (The same as the corresponding Java API method.) + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ExternallylinkedworkitemsListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/externally_linked_work_items/post_externally_linked_work_items.py b/polarion_rest_api_client/open_api_client/api/externally_linked_work_items/post_externally_linked_work_items.py new file mode 100644 index 00000000..963c1344 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/externally_linked_work_items/post_externally_linked_work_items.py @@ -0,0 +1,228 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.externallylinkedworkitems_list_post_request import ( + ExternallylinkedworkitemsListPostRequest, +) +from ...models.externallylinkedworkitems_list_post_response import ( + ExternallylinkedworkitemsListPostResponse, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + body: ExternallylinkedworkitemsListPostRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems".format( + projectId=project_id, + workItemId=work_item_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, ExternallylinkedworkitemsListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = ExternallylinkedworkitemsListPostResponse.from_dict( + response.json() + ) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, ExternallylinkedworkitemsListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: ExternallylinkedworkitemsListPostRequest, +) -> Response[Union[Any, ExternallylinkedworkitemsListPostResponse]]: + """Creates a list of Externally Linked Work Items. + + Args: + project_id (str): + work_item_id (str): + body (ExternallylinkedworkitemsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ExternallylinkedworkitemsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: ExternallylinkedworkitemsListPostRequest, +) -> Optional[Union[Any, ExternallylinkedworkitemsListPostResponse]]: + """Creates a list of Externally Linked Work Items. + + Args: + project_id (str): + work_item_id (str): + body (ExternallylinkedworkitemsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ExternallylinkedworkitemsListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: ExternallylinkedworkitemsListPostRequest, +) -> Response[Union[Any, ExternallylinkedworkitemsListPostResponse]]: + """Creates a list of Externally Linked Work Items. + + Args: + project_id (str): + work_item_id (str): + body (ExternallylinkedworkitemsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ExternallylinkedworkitemsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: ExternallylinkedworkitemsListPostRequest, +) -> Optional[Union[Any, ExternallylinkedworkitemsListPostResponse]]: + """Creates a list of Externally Linked Work Items. + + Args: + project_id (str): + work_item_id (str): + body (ExternallylinkedworkitemsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ExternallylinkedworkitemsListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/feature_selections/__init__.py b/polarion_rest_api_client/open_api_client/api/feature_selections/__init__.py new file mode 100644 index 00000000..dd5d085d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/feature_selections/__init__.py @@ -0,0 +1,2 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 diff --git a/polarion_rest_api_client/open_api_client/api/feature_selections/get_feature_selection.py b/polarion_rest_api_client/open_api_client/api/feature_selections/get_feature_selection.py new file mode 100644 index 00000000..3fa3cf33 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/feature_selections/get_feature_selection.py @@ -0,0 +1,294 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.featureselections_single_get_response import ( + FeatureselectionsSingleGetResponse, +) +from ...models.sparse_fields import SparseFields +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + work_item_id: str, + selection_type_id: str, + target_project_id: str, + target_work_item_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["revision"] = revision + + 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": "/projects/{projectId}/workitems/{workItemId}/featureselections/{selectionTypeId}/{targetProjectId}/{targetWorkItemId}".format( + projectId=project_id, + workItemId=work_item_id, + selectionTypeId=selection_type_id, + targetProjectId=target_project_id, + targetWorkItemId=target_work_item_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, FeatureselectionsSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = FeatureselectionsSingleGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, FeatureselectionsSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + selection_type_id: str, + target_project_id: str, + target_work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, FeatureselectionsSingleGetResponse]]: + """Returns the specified Feature Selection. + + Args: + project_id (str): + work_item_id (str): + selection_type_id (str): + target_project_id (str): + target_work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, FeatureselectionsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + selection_type_id=selection_type_id, + target_project_id=target_project_id, + target_work_item_id=target_work_item_id, + fields=fields, + include=include, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + selection_type_id: str, + target_project_id: str, + target_work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, FeatureselectionsSingleGetResponse]]: + """Returns the specified Feature Selection. + + Args: + project_id (str): + work_item_id (str): + selection_type_id (str): + target_project_id (str): + target_work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, FeatureselectionsSingleGetResponse] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + selection_type_id=selection_type_id, + target_project_id=target_project_id, + target_work_item_id=target_work_item_id, + client=client, + fields=fields, + include=include, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + selection_type_id: str, + target_project_id: str, + target_work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, FeatureselectionsSingleGetResponse]]: + """Returns the specified Feature Selection. + + Args: + project_id (str): + work_item_id (str): + selection_type_id (str): + target_project_id (str): + target_work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, FeatureselectionsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + selection_type_id=selection_type_id, + target_project_id=target_project_id, + target_work_item_id=target_work_item_id, + fields=fields, + include=include, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + selection_type_id: str, + target_project_id: str, + target_work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, FeatureselectionsSingleGetResponse]]: + """Returns the specified Feature Selection. + + Args: + project_id (str): + work_item_id (str): + selection_type_id (str): + target_project_id (str): + target_work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, FeatureselectionsSingleGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + selection_type_id=selection_type_id, + target_project_id=target_project_id, + target_work_item_id=target_work_item_id, + client=client, + fields=fields, + include=include, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/feature_selections/get_feature_selections.py b/polarion_rest_api_client/open_api_client/api/feature_selections/get_feature_selections.py new file mode 100644 index 00000000..1ba6aa88 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/feature_selections/get_feature_selections.py @@ -0,0 +1,282 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.featureselections_list_get_response import ( + FeatureselectionsListGetResponse, +) +from ...models.sparse_fields import SparseFields +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["revision"] = revision + + 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": "/projects/{projectId}/workitems/{workItemId}/featureselections".format( + projectId=project_id, + workItemId=work_item_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, FeatureselectionsListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = FeatureselectionsListGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, FeatureselectionsListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, FeatureselectionsListGetResponse]]: + """Returns a list of Feature Selections. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, FeatureselectionsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, FeatureselectionsListGetResponse]]: + """Returns a list of Feature Selections. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, FeatureselectionsListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, FeatureselectionsListGetResponse]]: + """Returns a list of Feature Selections. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, FeatureselectionsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, FeatureselectionsListGetResponse]]: + """Returns a list of Feature Selections. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, FeatureselectionsListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/icons/get_default_icon.py b/polarion_rest_api_client/open_api_client/api/icons/get_default_icon.py index 8bab7ec6..aa832245 100644 --- a/polarion_rest_api_client/open_api_client/api/icons/get_default_icon.py +++ b/polarion_rest_api_client/open_api_client/api/icons/get_default_icon.py @@ -16,23 +16,21 @@ def _get_kwargs( icon_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params = { k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/enumerations/defaulticons/{iconId}".format( iconId=icon_id, @@ -40,6 +38,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -90,25 +90,20 @@ def sync_detailed( icon_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, ) -> Response[Union[Any, IconsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - icon_id : str - fields : Union[Unset, None, SparseFields] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, IconsSingleGetResponse]] + """Returns the specified Icon from the default context. + + Args: + icon_id (str): + fields (Union[Unset, SparseFields]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, IconsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -127,25 +122,20 @@ def sync( icon_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, ) -> Optional[Union[Any, IconsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - icon_id : str - fields : Union[Unset, None, SparseFields] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, IconsSingleGetResponse] + """Returns the specified Icon from the default context. + + Args: + icon_id (str): + fields (Union[Unset, SparseFields]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, IconsSingleGetResponse] """ return sync_detailed( @@ -159,25 +149,20 @@ async def asyncio_detailed( icon_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, ) -> Response[Union[Any, IconsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - icon_id : str - fields : Union[Unset, None, SparseFields] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, IconsSingleGetResponse]] + """Returns the specified Icon from the default context. + + Args: + icon_id (str): + fields (Union[Unset, SparseFields]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, IconsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -194,25 +179,20 @@ async def asyncio( icon_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, ) -> Optional[Union[Any, IconsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - icon_id : str - fields : Union[Unset, None, SparseFields] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, IconsSingleGetResponse] + """Returns the specified Icon from the default context. + + Args: + icon_id (str): + fields (Union[Unset, SparseFields]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, IconsSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/icons/get_default_icons.py b/polarion_rest_api_client/open_api_client/api/icons/get_default_icons.py index 88616c7d..31d0cc2c 100644 --- a/polarion_rest_api_client/open_api_client/api/icons/get_default_icons.py +++ b/polarion_rest_api_client/open_api_client/api/icons/get_default_icons.py @@ -15,18 +15,16 @@ def _get_kwargs( *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["page[size]"] = pagesize @@ -37,12 +35,14 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/enumerations/defaulticons", "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -92,28 +92,23 @@ def _build_response( def sync_detailed( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Response[Union[Any, IconsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, IconsListGetResponse]] + """Returns a list of Icons from the default context. + + Args: + fields (Union[Unset, SparseFields]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, IconsListGetResponse]] """ kwargs = _get_kwargs( @@ -132,28 +127,23 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Optional[Union[Any, IconsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, IconsListGetResponse] + """Returns a list of Icons from the default context. + + Args: + fields (Union[Unset, SparseFields]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, IconsListGetResponse] """ return sync_detailed( @@ -167,28 +157,23 @@ def sync( async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Response[Union[Any, IconsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, IconsListGetResponse]] + """Returns a list of Icons from the default context. + + Args: + fields (Union[Unset, SparseFields]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, IconsListGetResponse]] """ kwargs = _get_kwargs( @@ -205,28 +190,23 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Optional[Union[Any, IconsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, IconsListGetResponse] + """Returns a list of Icons from the default context. + + Args: + fields (Union[Unset, SparseFields]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, IconsListGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/icons/get_global_icon.py b/polarion_rest_api_client/open_api_client/api/icons/get_global_icon.py index 6750c52d..b8cc60bc 100644 --- a/polarion_rest_api_client/open_api_client/api/icons/get_global_icon.py +++ b/polarion_rest_api_client/open_api_client/api/icons/get_global_icon.py @@ -16,23 +16,21 @@ def _get_kwargs( icon_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params = { k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/enumerations/icons/{iconId}".format( iconId=icon_id, @@ -40,6 +38,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -90,25 +90,20 @@ def sync_detailed( icon_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, ) -> Response[Union[Any, IconsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - icon_id : str - fields : Union[Unset, None, SparseFields] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, IconsSingleGetResponse]] + """Returns the specified Icon from the Global context. + + Args: + icon_id (str): + fields (Union[Unset, SparseFields]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, IconsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -127,25 +122,20 @@ def sync( icon_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, ) -> Optional[Union[Any, IconsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - icon_id : str - fields : Union[Unset, None, SparseFields] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, IconsSingleGetResponse] + """Returns the specified Icon from the Global context. + + Args: + icon_id (str): + fields (Union[Unset, SparseFields]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, IconsSingleGetResponse] """ return sync_detailed( @@ -159,25 +149,20 @@ async def asyncio_detailed( icon_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, ) -> Response[Union[Any, IconsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - icon_id : str - fields : Union[Unset, None, SparseFields] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, IconsSingleGetResponse]] + """Returns the specified Icon from the Global context. + + Args: + icon_id (str): + fields (Union[Unset, SparseFields]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, IconsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -194,25 +179,20 @@ async def asyncio( icon_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, ) -> Optional[Union[Any, IconsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - icon_id : str - fields : Union[Unset, None, SparseFields] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, IconsSingleGetResponse] + """Returns the specified Icon from the Global context. + + Args: + icon_id (str): + fields (Union[Unset, SparseFields]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, IconsSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/icons/get_global_icons.py b/polarion_rest_api_client/open_api_client/api/icons/get_global_icons.py index d218ba6c..e715564c 100644 --- a/polarion_rest_api_client/open_api_client/api/icons/get_global_icons.py +++ b/polarion_rest_api_client/open_api_client/api/icons/get_global_icons.py @@ -15,18 +15,16 @@ def _get_kwargs( *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["page[size]"] = pagesize @@ -37,12 +35,14 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/enumerations/icons", "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -92,28 +92,23 @@ def _build_response( def sync_detailed( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Response[Union[Any, IconsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, IconsListGetResponse]] + """Returns a list of Icons from the Global context. + + Args: + fields (Union[Unset, SparseFields]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, IconsListGetResponse]] """ kwargs = _get_kwargs( @@ -132,28 +127,23 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Optional[Union[Any, IconsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, IconsListGetResponse] + """Returns a list of Icons from the Global context. + + Args: + fields (Union[Unset, SparseFields]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, IconsListGetResponse] """ return sync_detailed( @@ -167,28 +157,23 @@ def sync( async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Response[Union[Any, IconsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, IconsListGetResponse]] + """Returns a list of Icons from the Global context. + + Args: + fields (Union[Unset, SparseFields]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, IconsListGetResponse]] """ kwargs = _get_kwargs( @@ -205,28 +190,23 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Optional[Union[Any, IconsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, IconsListGetResponse] + """Returns a list of Icons from the Global context. + + Args: + fields (Union[Unset, SparseFields]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, IconsListGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/icons/get_project_icon.py b/polarion_rest_api_client/open_api_client/api/icons/get_project_icon.py index 42f01991..36e3ca2d 100644 --- a/polarion_rest_api_client/open_api_client/api/icons/get_project_icon.py +++ b/polarion_rest_api_client/open_api_client/api/icons/get_project_icon.py @@ -17,23 +17,21 @@ def _get_kwargs( project_id: str, icon_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params = { k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/enumerations/icons/{iconId}".format( projectId=project_id, @@ -42,6 +40,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -93,26 +93,21 @@ def sync_detailed( icon_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, ) -> Response[Union[Any, IconsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - icon_id : str - fields : Union[Unset, None, SparseFields] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, IconsSingleGetResponse]] + """Returns the specified Icon from the Project context. + + Args: + project_id (str): + icon_id (str): + fields (Union[Unset, SparseFields]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, IconsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -133,26 +128,21 @@ def sync( icon_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, ) -> Optional[Union[Any, IconsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - icon_id : str - fields : Union[Unset, None, SparseFields] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, IconsSingleGetResponse] + """Returns the specified Icon from the Project context. + + Args: + project_id (str): + icon_id (str): + fields (Union[Unset, SparseFields]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, IconsSingleGetResponse] """ return sync_detailed( @@ -168,26 +158,21 @@ async def asyncio_detailed( icon_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, ) -> Response[Union[Any, IconsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - icon_id : str - fields : Union[Unset, None, SparseFields] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, IconsSingleGetResponse]] + """Returns the specified Icon from the Project context. + + Args: + project_id (str): + icon_id (str): + fields (Union[Unset, SparseFields]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, IconsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -206,26 +191,21 @@ async def asyncio( icon_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, ) -> Optional[Union[Any, IconsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - icon_id : str - fields : Union[Unset, None, SparseFields] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, IconsSingleGetResponse] + """Returns the specified Icon from the Project context. + + Args: + project_id (str): + icon_id (str): + fields (Union[Unset, SparseFields]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, IconsSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/icons/get_project_icons.py b/polarion_rest_api_client/open_api_client/api/icons/get_project_icons.py index 2545eb15..983991a7 100644 --- a/polarion_rest_api_client/open_api_client/api/icons/get_project_icons.py +++ b/polarion_rest_api_client/open_api_client/api/icons/get_project_icons.py @@ -16,18 +16,16 @@ def _get_kwargs( project_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["page[size]"] = pagesize @@ -38,7 +36,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/enumerations/icons".format( projectId=project_id, @@ -46,6 +44,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -96,29 +96,24 @@ def sync_detailed( project_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Response[Union[Any, IconsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - fields : Union[Unset, None, SparseFields] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, IconsListGetResponse]] + """Returns a list of Icons from the Project context. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, IconsListGetResponse]] """ kwargs = _get_kwargs( @@ -139,29 +134,24 @@ def sync( project_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Optional[Union[Any, IconsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - fields : Union[Unset, None, SparseFields] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, IconsListGetResponse] + """Returns a list of Icons from the Project context. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, IconsListGetResponse] """ return sync_detailed( @@ -177,29 +167,24 @@ async def asyncio_detailed( project_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Response[Union[Any, IconsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - fields : Union[Unset, None, SparseFields] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, IconsListGetResponse]] + """Returns a list of Icons from the Project context. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, IconsListGetResponse]] """ kwargs = _get_kwargs( @@ -218,29 +203,24 @@ async def asyncio( project_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Optional[Union[Any, IconsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - fields : Union[Unset, None, SparseFields] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, IconsListGetResponse] + """Returns a list of Icons from the Project context. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, IconsListGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/icons/post_global_icons.py b/polarion_rest_api_client/open_api_client/api/icons/post_global_icons.py new file mode 100644 index 00000000..55eb07c4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/icons/post_global_icons.py @@ -0,0 +1,200 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.icons_list_post_response import IconsListPostResponse +from ...models.post_icons_request_body import PostIconsRequestBody +from ...types import Response + + +def _get_kwargs( + *, + body: PostIconsRequestBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/enumerations/icons", + } + + _body = body.to_multipart() + + _kwargs["files"] = _body + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, IconsListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = IconsListPostResponse.from_dict(response.json()) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, IconsListPostResponse]]: + 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: Union[AuthenticatedClient, Client], + body: PostIconsRequestBody, +) -> Response[Union[Any, IconsListPostResponse]]: + """Creates a list of Icons in the Global context. + + Icons are identified by order + + Args: + body (PostIconsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, IconsListPostResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: Union[AuthenticatedClient, Client], + body: PostIconsRequestBody, +) -> Optional[Union[Any, IconsListPostResponse]]: + """Creates a list of Icons in the Global context. + + Icons are identified by order + + Args: + body (PostIconsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, IconsListPostResponse] + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], + body: PostIconsRequestBody, +) -> Response[Union[Any, IconsListPostResponse]]: + """Creates a list of Icons in the Global context. + + Icons are identified by order + + Args: + body (PostIconsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, IconsListPostResponse]] + """ + + 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: Union[AuthenticatedClient, Client], + body: PostIconsRequestBody, +) -> Optional[Union[Any, IconsListPostResponse]]: + """Creates a list of Icons in the Global context. + + Icons are identified by order + + Args: + body (PostIconsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, IconsListPostResponse] + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/icons/post_project_icons.py b/polarion_rest_api_client/open_api_client/api/icons/post_project_icons.py new file mode 100644 index 00000000..6797d31b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/icons/post_project_icons.py @@ -0,0 +1,215 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.icons_list_post_response import IconsListPostResponse +from ...models.post_icons_request_body import PostIconsRequestBody +from ...types import Response + + +def _get_kwargs( + project_id: str, + *, + body: PostIconsRequestBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/enumerations/icons".format( + projectId=project_id, + ), + } + + _body = body.to_multipart() + + _kwargs["files"] = _body + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, IconsListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = IconsListPostResponse.from_dict(response.json()) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, IconsListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PostIconsRequestBody, +) -> Response[Union[Any, IconsListPostResponse]]: + """Creates a list of Icons in the Project context. + + Icons are identified by order + + Args: + project_id (str): + body (PostIconsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, IconsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PostIconsRequestBody, +) -> Optional[Union[Any, IconsListPostResponse]]: + """Creates a list of Icons in the Project context. + + Icons are identified by order + + Args: + project_id (str): + body (PostIconsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, IconsListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PostIconsRequestBody, +) -> Response[Union[Any, IconsListPostResponse]]: + """Creates a list of Icons in the Project context. + + Icons are identified by order + + Args: + project_id (str): + body (PostIconsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, IconsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PostIconsRequestBody, +) -> Optional[Union[Any, IconsListPostResponse]]: + """Creates a list of Icons in the Project context. + + Icons are identified by order + + Args: + project_id (str): + body (PostIconsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, IconsListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/jobs/__init__.py b/polarion_rest_api_client/open_api_client/api/jobs/__init__.py new file mode 100644 index 00000000..dd5d085d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/jobs/__init__.py @@ -0,0 +1,2 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 diff --git a/polarion_rest_api_client/open_api_client/api/jobs/get_job.py b/polarion_rest_api_client/open_api_client/api/jobs/get_job.py new file mode 100644 index 00000000..ff1f9032 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/jobs/get_job.py @@ -0,0 +1,145 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + job_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + 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": "/jobs/{jobId}".format( + jobId=job_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + job_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, +) -> Response[Any]: + """Returns the specified Job. + + Args: + job_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + job_id=job_id, + fields=fields, + include=include, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + job_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, +) -> Response[Any]: + """Returns the specified Job. + + Args: + job_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + job_id=job_id, + fields=fields, + include=include, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/jobs/get_job_result_file_content.py b/polarion_rest_api_client/open_api_client/api/jobs/get_job_result_file_content.py new file mode 100644 index 00000000..40f87c7a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/jobs/get_job_result_file_content.py @@ -0,0 +1,124 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + job_id: str, + filename: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "get", + "url": "/jobs/{jobId}/actions/download/{filename}".format( + jobId=job_id, + filename=filename, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.OK: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + job_id: str, + filename: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Downloads the file content for a specified job. + + Args: + job_id (str): + filename (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + job_id=job_id, + filename=filename, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + job_id: str, + filename: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Downloads the file content for a specified job. + + Args: + job_id (str): + filename (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + job_id=job_id, + filename=filename, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/linked_oslc_resources/__init__.py b/polarion_rest_api_client/open_api_client/api/linked_oslc_resources/__init__.py new file mode 100644 index 00000000..dd5d085d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/linked_oslc_resources/__init__.py @@ -0,0 +1,2 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 diff --git a/polarion_rest_api_client/open_api_client/api/linked_oslc_resources/delete_oslc_resources.py b/polarion_rest_api_client/open_api_client/api/linked_oslc_resources/delete_oslc_resources.py new file mode 100644 index 00000000..079fb503 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/linked_oslc_resources/delete_oslc_resources.py @@ -0,0 +1,145 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.linkedoslcresources_list_delete_request import ( + LinkedoslcresourcesListDeleteRequest, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + body: LinkedoslcresourcesListDeleteRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/workitems/{workItemId}/linkedoslcresources".format( + projectId=project_id, + workItemId=work_item_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: LinkedoslcresourcesListDeleteRequest, +) -> Response[Any]: + """Deletes a list of instances. + + Args: + project_id (str): + work_item_id (str): + body (LinkedoslcresourcesListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: LinkedoslcresourcesListDeleteRequest, +) -> Response[Any]: + """Deletes a list of instances. + + Args: + project_id (str): + work_item_id (str): + body (LinkedoslcresourcesListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/linked_oslc_resources/get_oslc_resources.py b/polarion_rest_api_client/open_api_client/api/linked_oslc_resources/get_oslc_resources.py new file mode 100644 index 00000000..c44c5686 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/linked_oslc_resources/get_oslc_resources.py @@ -0,0 +1,297 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.linkedoslcresources_list_get_response import ( + LinkedoslcresourcesListGetResponse, +) +from ...models.sparse_fields import SparseFields +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["query"] = query + + params["sort"] = sort + + 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": "/projects/{projectId}/workitems/{workItemId}/linkedoslcresources".format( + projectId=project_id, + workItemId=work_item_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, LinkedoslcresourcesListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = LinkedoslcresourcesListGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, LinkedoslcresourcesListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, +) -> Response[Union[Any, LinkedoslcresourcesListGetResponse]]: + """Returns a list of instances. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, LinkedoslcresourcesListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + query=query, + sort=sort, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, LinkedoslcresourcesListGetResponse]]: + """Returns a list of instances. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, LinkedoslcresourcesListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + query=query, + sort=sort, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, +) -> Response[Union[Any, LinkedoslcresourcesListGetResponse]]: + """Returns a list of instances. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, LinkedoslcresourcesListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + query=query, + sort=sort, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, LinkedoslcresourcesListGetResponse]]: + """Returns a list of instances. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, LinkedoslcresourcesListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + query=query, + sort=sort, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/linked_oslc_resources/post_oslc_resources.py b/polarion_rest_api_client/open_api_client/api/linked_oslc_resources/post_oslc_resources.py new file mode 100644 index 00000000..b7010d4f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/linked_oslc_resources/post_oslc_resources.py @@ -0,0 +1,228 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.linkedoslcresources_list_post_request import ( + LinkedoslcresourcesListPostRequest, +) +from ...models.linkedoslcresources_list_post_response import ( + LinkedoslcresourcesListPostResponse, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + body: LinkedoslcresourcesListPostRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/workitems/{workItemId}/linkedoslcresources".format( + projectId=project_id, + workItemId=work_item_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, LinkedoslcresourcesListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = LinkedoslcresourcesListPostResponse.from_dict( + response.json() + ) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, LinkedoslcresourcesListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: LinkedoslcresourcesListPostRequest, +) -> Response[Union[Any, LinkedoslcresourcesListPostResponse]]: + """Creates a list of instances. + + Args: + project_id (str): + work_item_id (str): + body (LinkedoslcresourcesListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, LinkedoslcresourcesListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: LinkedoslcresourcesListPostRequest, +) -> Optional[Union[Any, LinkedoslcresourcesListPostResponse]]: + """Creates a list of instances. + + Args: + project_id (str): + work_item_id (str): + body (LinkedoslcresourcesListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, LinkedoslcresourcesListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: LinkedoslcresourcesListPostRequest, +) -> Response[Union[Any, LinkedoslcresourcesListPostResponse]]: + """Creates a list of instances. + + Args: + project_id (str): + work_item_id (str): + body (LinkedoslcresourcesListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, LinkedoslcresourcesListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: LinkedoslcresourcesListPostRequest, +) -> Optional[Union[Any, LinkedoslcresourcesListPostResponse]]: + """Creates a list of instances. + + Args: + project_id (str): + work_item_id (str): + body (LinkedoslcresourcesListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, LinkedoslcresourcesListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/linked_work_items/delete_linked_work_item.py b/polarion_rest_api_client/open_api_client/api/linked_work_items/delete_linked_work_item.py index 15bf71c1..86bb50a1 100644 --- a/polarion_rest_api_client/open_api_client/api/linked_work_items/delete_linked_work_item.py +++ b/polarion_rest_api_client/open_api_client/api/linked_work_items/delete_linked_work_item.py @@ -18,9 +18,7 @@ def _get_kwargs( target_project_id: str, linked_work_item_id: str, ) -> Dict[str, Any]: - pass - - return { + _kwargs: Dict[str, Any] = { "method": "delete", "url": "/projects/{projectId}/workitems/{workItemId}/linkedworkitems/{roleId}/{targetProjectId}/{linkedWorkItemId}".format( projectId=project_id, @@ -31,6 +29,8 @@ def _get_kwargs( ), } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -77,29 +77,24 @@ def sync_detailed( *, client: Union[AuthenticatedClient, Client], ) -> Response[Any]: - """Deletes the specified instance. + """Deletes the specified Linked Work Item. - Deletes the direct outgoing links to other Work Items. (The same as the corresponding Java API + Deletes the direct outgoing links to other Work Items. (The same as the corresponding Java API method.) Does not pertain to external links or backlinks. - Parameters - ---------- - project_id : str - work_item_id : str - role_id : str - target_project_id : str - linked_work_item_id : str - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + Args: + project_id (str): + work_item_id (str): + role_id (str): + target_project_id (str): + linked_work_item_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( @@ -126,29 +121,24 @@ async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], ) -> Response[Any]: - """Deletes the specified instance. + """Deletes the specified Linked Work Item. - Deletes the direct outgoing links to other Work Items. (The same as the corresponding Java API + Deletes the direct outgoing links to other Work Items. (The same as the corresponding Java API method.) Does not pertain to external links or backlinks. - Parameters - ---------- - project_id : str - work_item_id : str - role_id : str - target_project_id : str - linked_work_item_id : str - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + Args: + project_id (str): + work_item_id (str): + role_id (str): + target_project_id (str): + linked_work_item_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( diff --git a/polarion_rest_api_client/open_api_client/api/linked_work_items/delete_linked_work_items.py b/polarion_rest_api_client/open_api_client/api/linked_work_items/delete_linked_work_items.py index c01ed707..f13b8520 100644 --- a/polarion_rest_api_client/open_api_client/api/linked_work_items/delete_linked_work_items.py +++ b/polarion_rest_api_client/open_api_client/api/linked_work_items/delete_linked_work_items.py @@ -18,21 +18,26 @@ def _get_kwargs( project_id: str, work_item_id: str, *, - json_body: LinkedworkitemsListDeleteRequest, + body: LinkedworkitemsListDeleteRequest, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "delete", "url": "/projects/{projectId}/workitems/{workItemId}/linkedworkitems".format( projectId=project_id, workItemId=work_item_id, ), - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -77,35 +82,30 @@ def sync_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: LinkedworkitemsListDeleteRequest, + body: LinkedworkitemsListDeleteRequest, ) -> Response[Any]: - """Deletes a list of instances. + """Deletes a list of Linked Work Items. - Deletes the direct outgoing links to other Work Items. (The same as the corresponding Java API + Deletes the direct outgoing links to other Work Items. (The same as the corresponding Java API method.) Does not pertain to external links or backlinks. - Parameters - ---------- - project_id : str - work_item_id : str - json_body : LinkedworkitemsListDeleteRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + Args: + project_id (str): + work_item_id (str): + body (LinkedworkitemsListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( project_id=project_id, work_item_id=work_item_id, - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -120,35 +120,30 @@ async def asyncio_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: LinkedworkitemsListDeleteRequest, + body: LinkedworkitemsListDeleteRequest, ) -> Response[Any]: - """Deletes a list of instances. + """Deletes a list of Linked Work Items. - Deletes the direct outgoing links to other Work Items. (The same as the corresponding Java API + Deletes the direct outgoing links to other Work Items. (The same as the corresponding Java API method.) Does not pertain to external links or backlinks. - Parameters - ---------- - project_id : str - work_item_id : str - json_body : LinkedworkitemsListDeleteRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + Args: + project_id (str): + work_item_id (str): + body (LinkedworkitemsListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( project_id=project_id, work_item_id=work_item_id, - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) diff --git a/polarion_rest_api_client/open_api_client/api/linked_work_items/get_linked_work_item.py b/polarion_rest_api_client/open_api_client/api/linked_work_items/get_linked_work_item.py index ec859a99..9e23c971 100644 --- a/polarion_rest_api_client/open_api_client/api/linked_work_items/get_linked_work_item.py +++ b/polarion_rest_api_client/open_api_client/api/linked_work_items/get_linked_work_item.py @@ -22,18 +22,16 @@ def _get_kwargs( target_project_id: str, linked_work_item_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -44,7 +42,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/workitems/{workItemId}/linkedworkitems/{roleId}/{targetProjectId}/{linkedWorkItemId}".format( projectId=project_id, @@ -56,6 +54,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -112,36 +112,31 @@ def sync_detailed( linked_work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, LinkedworkitemsSingleGetResponse]]: - """Returns the specified instance. + """Returns the specified Linked Work Item. - Returns the direct outgoing links to other Work Items. (The same as the corresponding Java API + Returns the direct outgoing links to other Work Items. (The same as the corresponding Java API method.) Does not pertain to external links or backlinks. - Parameters - ---------- - project_id : str - work_item_id : str - role_id : str - target_project_id : str - linked_work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, LinkedworkitemsSingleGetResponse]] + Args: + project_id (str): + work_item_id (str): + role_id (str): + target_project_id (str): + linked_work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, LinkedworkitemsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -170,36 +165,31 @@ def sync( linked_work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, LinkedworkitemsSingleGetResponse]]: - """Returns the specified instance. + """Returns the specified Linked Work Item. - Returns the direct outgoing links to other Work Items. (The same as the corresponding Java API + Returns the direct outgoing links to other Work Items. (The same as the corresponding Java API method.) Does not pertain to external links or backlinks. - Parameters - ---------- - project_id : str - work_item_id : str - role_id : str - target_project_id : str - linked_work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, LinkedworkitemsSingleGetResponse] + Args: + project_id (str): + work_item_id (str): + role_id (str): + target_project_id (str): + linked_work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, LinkedworkitemsSingleGetResponse] """ return sync_detailed( @@ -223,36 +213,31 @@ async def asyncio_detailed( linked_work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, LinkedworkitemsSingleGetResponse]]: - """Returns the specified instance. + """Returns the specified Linked Work Item. - Returns the direct outgoing links to other Work Items. (The same as the corresponding Java API + Returns the direct outgoing links to other Work Items. (The same as the corresponding Java API method.) Does not pertain to external links or backlinks. - Parameters - ---------- - project_id : str - work_item_id : str - role_id : str - target_project_id : str - linked_work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, LinkedworkitemsSingleGetResponse]] + Args: + project_id (str): + work_item_id (str): + role_id (str): + target_project_id (str): + linked_work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, LinkedworkitemsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -279,36 +264,31 @@ async def asyncio( linked_work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, LinkedworkitemsSingleGetResponse]]: - """Returns the specified instance. + """Returns the specified Linked Work Item. - Returns the direct outgoing links to other Work Items. (The same as the corresponding Java API + Returns the direct outgoing links to other Work Items. (The same as the corresponding Java API method.) Does not pertain to external links or backlinks. - Parameters - ---------- - project_id : str - work_item_id : str - role_id : str - target_project_id : str - linked_work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, LinkedworkitemsSingleGetResponse] + Args: + project_id (str): + work_item_id (str): + role_id (str): + target_project_id (str): + linked_work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, LinkedworkitemsSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/linked_work_items/get_linked_work_items.py b/polarion_rest_api_client/open_api_client/api/linked_work_items/get_linked_work_items.py index f1dad469..d4ed6d47 100644 --- a/polarion_rest_api_client/open_api_client/api/linked_work_items/get_linked_work_items.py +++ b/polarion_rest_api_client/open_api_client/api/linked_work_items/get_linked_work_items.py @@ -19,20 +19,18 @@ def _get_kwargs( project_id: str, work_item_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -47,7 +45,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/workitems/{workItemId}/linkedworkitems".format( projectId=project_id, @@ -56,6 +54,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -109,37 +109,32 @@ def sync_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, LinkedworkitemsListGetResponse]]: - """Returns a list of instances. + """Returns a list of Linked Work Items. - Returns the direct outgoing links to other Work Items. (The same as the corresponding Java API + Returns the direct outgoing links to other Work Items. (The same as the corresponding Java API method.) Does not pertain to external links or backlinks. - Parameters - ---------- - project_id : str - work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, LinkedworkitemsListGetResponse]] + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, LinkedworkitemsListGetResponse]] """ kwargs = _get_kwargs( @@ -164,37 +159,32 @@ def sync( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, LinkedworkitemsListGetResponse]]: - """Returns a list of instances. + """Returns a list of Linked Work Items. - Returns the direct outgoing links to other Work Items. (The same as the corresponding Java API + Returns the direct outgoing links to other Work Items. (The same as the corresponding Java API method.) Does not pertain to external links or backlinks. - Parameters - ---------- - project_id : str - work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, LinkedworkitemsListGetResponse] + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, LinkedworkitemsListGetResponse] """ return sync_detailed( @@ -214,37 +204,32 @@ async def asyncio_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, LinkedworkitemsListGetResponse]]: - """Returns a list of instances. + """Returns a list of Linked Work Items. - Returns the direct outgoing links to other Work Items. (The same as the corresponding Java API + Returns the direct outgoing links to other Work Items. (The same as the corresponding Java API method.) Does not pertain to external links or backlinks. - Parameters - ---------- - project_id : str - work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, LinkedworkitemsListGetResponse]] + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, LinkedworkitemsListGetResponse]] """ kwargs = _get_kwargs( @@ -267,37 +252,32 @@ async def asyncio( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, LinkedworkitemsListGetResponse]]: - """Returns a list of instances. + """Returns a list of Linked Work Items. - Returns the direct outgoing links to other Work Items. (The same as the corresponding Java API + Returns the direct outgoing links to other Work Items. (The same as the corresponding Java API method.) Does not pertain to external links or backlinks. - Parameters - ---------- - project_id : str - work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, LinkedworkitemsListGetResponse] + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, LinkedworkitemsListGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/linked_work_items/patch_linked_work_item.py b/polarion_rest_api_client/open_api_client/api/linked_work_items/patch_linked_work_item.py index 1a786fd5..7485a8e4 100644 --- a/polarion_rest_api_client/open_api_client/api/linked_work_items/patch_linked_work_item.py +++ b/polarion_rest_api_client/open_api_client/api/linked_work_items/patch_linked_work_item.py @@ -21,13 +21,11 @@ def _get_kwargs( target_project_id: str, linked_work_item_id: str, *, - json_body: LinkedworkitemsSinglePatchRequest, + body: LinkedworkitemsSinglePatchRequest, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "patch", "url": "/projects/{projectId}/workitems/{workItemId}/linkedworkitems/{roleId}/{targetProjectId}/{linkedWorkItemId}".format( projectId=project_id, @@ -36,9 +34,16 @@ def _get_kwargs( targetProjectId=target_project_id, linkedWorkItemId=linked_work_item_id, ), - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -88,32 +93,27 @@ def sync_detailed( linked_work_item_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: LinkedworkitemsSinglePatchRequest, + body: LinkedworkitemsSinglePatchRequest, ) -> Response[Any]: - """Updates the specified instance. + """Updates the specified Linked Work Item. - Updates the direct outgoing links to other Work Items. (The same as the corresponding Java API + Updates the direct outgoing links to other Work Items. (The same as the corresponding Java API method.) Does not pertain to external links or backlinks. - Parameters - ---------- - project_id : str - work_item_id : str - role_id : str - target_project_id : str - linked_work_item_id : str - json_body : LinkedworkitemsSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + Args: + project_id (str): + work_item_id (str): + role_id (str): + target_project_id (str): + linked_work_item_id (str): + body (LinkedworkitemsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( @@ -122,7 +122,7 @@ def sync_detailed( role_id=role_id, target_project_id=target_project_id, linked_work_item_id=linked_work_item_id, - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -140,32 +140,27 @@ async def asyncio_detailed( linked_work_item_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: LinkedworkitemsSinglePatchRequest, + body: LinkedworkitemsSinglePatchRequest, ) -> Response[Any]: - """Updates the specified instance. + """Updates the specified Linked Work Item. - Updates the direct outgoing links to other Work Items. (The same as the corresponding Java API + Updates the direct outgoing links to other Work Items. (The same as the corresponding Java API method.) Does not pertain to external links or backlinks. - Parameters - ---------- - project_id : str - work_item_id : str - role_id : str - target_project_id : str - linked_work_item_id : str - json_body : LinkedworkitemsSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + Args: + project_id (str): + work_item_id (str): + role_id (str): + target_project_id (str): + linked_work_item_id (str): + body (LinkedworkitemsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( @@ -174,7 +169,7 @@ async def asyncio_detailed( role_id=role_id, target_project_id=target_project_id, linked_work_item_id=linked_work_item_id, - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) diff --git a/polarion_rest_api_client/open_api_client/api/linked_work_items/post_linked_work_items.py b/polarion_rest_api_client/open_api_client/api/linked_work_items/post_linked_work_items.py index e930e016..a5f33ffd 100644 --- a/polarion_rest_api_client/open_api_client/api/linked_work_items/post_linked_work_items.py +++ b/polarion_rest_api_client/open_api_client/api/linked_work_items/post_linked_work_items.py @@ -21,21 +21,26 @@ def _get_kwargs( project_id: str, work_item_id: str, *, - json_body: LinkedworkitemsListPostRequest, + body: LinkedworkitemsListPostRequest, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/projects/{projectId}/workitems/{workItemId}/linkedworkitems".format( projectId=project_id, workItemId=work_item_id, ), - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -98,35 +103,30 @@ def sync_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: LinkedworkitemsListPostRequest, + body: LinkedworkitemsListPostRequest, ) -> Response[Union[Any, LinkedworkitemsListPostResponse]]: - """Creates a list of instances. + """Creates a list of Linked Work Items. - Creates the direct outgoing links to other Work Items. (The same as the corresponding Java API + Creates the direct outgoing links to other Work Items. (The same as the corresponding Java API method.) Does not pertain to external links or backlinks. - Parameters - ---------- - project_id : str - work_item_id : str - json_body : LinkedworkitemsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, LinkedworkitemsListPostResponse]] + Args: + project_id (str): + work_item_id (str): + body (LinkedworkitemsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, LinkedworkitemsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, work_item_id=work_item_id, - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -141,36 +141,31 @@ def sync( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: LinkedworkitemsListPostRequest, + body: LinkedworkitemsListPostRequest, ) -> Optional[Union[Any, LinkedworkitemsListPostResponse]]: - """Creates a list of instances. + """Creates a list of Linked Work Items. - Creates the direct outgoing links to other Work Items. (The same as the corresponding Java API + Creates the direct outgoing links to other Work Items. (The same as the corresponding Java API method.) Does not pertain to external links or backlinks. - Parameters - ---------- - project_id : str - work_item_id : str - json_body : LinkedworkitemsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, LinkedworkitemsListPostResponse] + Args: + project_id (str): + work_item_id (str): + body (LinkedworkitemsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, LinkedworkitemsListPostResponse] """ return sync_detailed( project_id=project_id, work_item_id=work_item_id, client=client, - json_body=json_body, + body=body, ).parsed @@ -179,35 +174,30 @@ async def asyncio_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: LinkedworkitemsListPostRequest, + body: LinkedworkitemsListPostRequest, ) -> Response[Union[Any, LinkedworkitemsListPostResponse]]: - """Creates a list of instances. + """Creates a list of Linked Work Items. - Creates the direct outgoing links to other Work Items. (The same as the corresponding Java API + Creates the direct outgoing links to other Work Items. (The same as the corresponding Java API method.) Does not pertain to external links or backlinks. - Parameters - ---------- - project_id : str - work_item_id : str - json_body : LinkedworkitemsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, LinkedworkitemsListPostResponse]] + Args: + project_id (str): + work_item_id (str): + body (LinkedworkitemsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, LinkedworkitemsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, work_item_id=work_item_id, - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -220,29 +210,24 @@ async def asyncio( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: LinkedworkitemsListPostRequest, + body: LinkedworkitemsListPostRequest, ) -> Optional[Union[Any, LinkedworkitemsListPostResponse]]: - """Creates a list of instances. + """Creates a list of Linked Work Items. - Creates the direct outgoing links to other Work Items. (The same as the corresponding Java API + Creates the direct outgoing links to other Work Items. (The same as the corresponding Java API method.) Does not pertain to external links or backlinks. - Parameters - ---------- - project_id : str - work_item_id : str - json_body : LinkedworkitemsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, LinkedworkitemsListPostResponse] + Args: + project_id (str): + work_item_id (str): + body (LinkedworkitemsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, LinkedworkitemsListPostResponse] """ return ( @@ -250,6 +235,6 @@ async def asyncio( project_id=project_id, work_item_id=work_item_id, client=client, - json_body=json_body, + body=body, ) ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/page_attachments/get_page_attachment.py b/polarion_rest_api_client/open_api_client/api/page_attachments/get_page_attachment.py index 6556aee6..a53f59ac 100644 --- a/polarion_rest_api_client/open_api_client/api/page_attachments/get_page_attachment.py +++ b/polarion_rest_api_client/open_api_client/api/page_attachments/get_page_attachment.py @@ -21,18 +21,16 @@ def _get_kwargs( page_name: str, attachment_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -43,7 +41,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/spaces/{spaceId}/pages/{pageName}/attachments/{attachmentId}".format( projectId=project_id, @@ -54,6 +52,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -109,32 +109,27 @@ def sync_detailed( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, PageAttachmentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - page_name : str - attachment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, PageAttachmentsSingleGetResponse]] + """Returns the specified Page Attachment. + + Args: + project_id (str): + space_id (str): + page_name (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, PageAttachmentsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -161,32 +156,27 @@ def sync( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, PageAttachmentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - page_name : str - attachment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, PageAttachmentsSingleGetResponse] + """Returns the specified Page Attachment. + + Args: + project_id (str): + space_id (str): + page_name (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, PageAttachmentsSingleGetResponse] """ return sync_detailed( @@ -208,32 +198,27 @@ async def asyncio_detailed( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, PageAttachmentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - page_name : str - attachment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, PageAttachmentsSingleGetResponse]] + """Returns the specified Page Attachment. + + Args: + project_id (str): + space_id (str): + page_name (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, PageAttachmentsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -258,32 +243,27 @@ async def asyncio( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, PageAttachmentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - page_name : str - attachment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, PageAttachmentsSingleGetResponse] + """Returns the specified Page Attachment. + + Args: + project_id (str): + space_id (str): + page_name (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, PageAttachmentsSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/page_attachments/get_page_attachment_content.py b/polarion_rest_api_client/open_api_client/api/page_attachments/get_page_attachment_content.py index e08d81d8..cb5dca1b 100644 --- a/polarion_rest_api_client/open_api_client/api/page_attachments/get_page_attachment_content.py +++ b/polarion_rest_api_client/open_api_client/api/page_attachments/get_page_attachment_content.py @@ -17,18 +17,17 @@ def _get_kwargs( page_name: str, attachment_id: str, *, - revision: Union[Unset, None, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} + params["revision"] = revision params = { k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/spaces/{spaceId}/pages/{pageName}/attachments/{attachmentId}/content".format( projectId=project_id, @@ -39,6 +38,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -83,28 +84,23 @@ def sync_detailed( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - revision: Union[Unset, None, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Any]: - """Downloads the file content for a specified attachment. - - Parameters - ---------- - project_id : str - space_id : str - page_name : str - attachment_id : str - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Downloads the file content for a specified Page Attachment. + + Args: + project_id (str): + space_id (str): + page_name (str): + attachment_id (str): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( @@ -129,28 +125,23 @@ async def asyncio_detailed( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - revision: Union[Unset, None, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Any]: - """Downloads the file content for a specified attachment. - - Parameters - ---------- - project_id : str - space_id : str - page_name : str - attachment_id : str - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Downloads the file content for a specified Page Attachment. + + Args: + project_id (str): + space_id (str): + page_name (str): + attachment_id (str): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( diff --git a/polarion_rest_api_client/open_api_client/api/page_attachments/post_page_attachments.py b/polarion_rest_api_client/open_api_client/api/page_attachments/post_page_attachments.py index 5ec28fef..10768857 100644 --- a/polarion_rest_api_client/open_api_client/api/page_attachments/post_page_attachments.py +++ b/polarion_rest_api_client/open_api_client/api/page_attachments/post_page_attachments.py @@ -22,22 +22,26 @@ def _get_kwargs( space_id: str, page_name: str, *, - multipart_data: PostPageAttachmentsRequestBody, + body: PostPageAttachmentsRequestBody, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - multipart_multipart_data = multipart_data.to_multipart() - - return { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/projects/{projectId}/spaces/{spaceId}/pages/{pageName}/attachments".format( projectId=project_id, spaceId=space_id, pageName=page_name, ), - "files": multipart_multipart_data, } + _body = body.to_multipart() + + _kwargs["files"] = _body + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -101,38 +105,33 @@ def sync_detailed( page_name: str, *, client: Union[AuthenticatedClient, Client], - multipart_data: PostPageAttachmentsRequestBody, + body: PostPageAttachmentsRequestBody, ) -> Response[Union[Any, PageAttachmentsListPostResponse]]: - r"""Creates a list of instances. + r"""Creates a list of Page Attachments. - Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. - Parameters - ---------- - project_id : str - space_id : str - page_name : str - multipart_data : PostPageAttachmentsRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, PageAttachmentsListPostResponse]] + Args: + project_id (str): + space_id (str): + page_name (str): + body (PostPageAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, PageAttachmentsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, space_id=space_id, page_name=page_name, - multipart_data=multipart_data, + body=body, ) response = client.get_httpx_client().request( @@ -148,31 +147,26 @@ def sync( page_name: str, *, client: Union[AuthenticatedClient, Client], - multipart_data: PostPageAttachmentsRequestBody, + body: PostPageAttachmentsRequestBody, ) -> Optional[Union[Any, PageAttachmentsListPostResponse]]: - r"""Creates a list of instances. + r"""Creates a list of Page Attachments. - Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. - Parameters - ---------- - project_id : str - space_id : str - page_name : str - multipart_data : PostPageAttachmentsRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, PageAttachmentsListPostResponse] + Args: + project_id (str): + space_id (str): + page_name (str): + body (PostPageAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, PageAttachmentsListPostResponse] """ return sync_detailed( @@ -180,7 +174,7 @@ def sync( space_id=space_id, page_name=page_name, client=client, - multipart_data=multipart_data, + body=body, ).parsed @@ -190,38 +184,33 @@ async def asyncio_detailed( page_name: str, *, client: Union[AuthenticatedClient, Client], - multipart_data: PostPageAttachmentsRequestBody, + body: PostPageAttachmentsRequestBody, ) -> Response[Union[Any, PageAttachmentsListPostResponse]]: - r"""Creates a list of instances. + r"""Creates a list of Page Attachments. - Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. - Parameters - ---------- - project_id : str - space_id : str - page_name : str - multipart_data : PostPageAttachmentsRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, PageAttachmentsListPostResponse]] + Args: + project_id (str): + space_id (str): + page_name (str): + body (PostPageAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, PageAttachmentsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, space_id=space_id, page_name=page_name, - multipart_data=multipart_data, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -235,31 +224,26 @@ async def asyncio( page_name: str, *, client: Union[AuthenticatedClient, Client], - multipart_data: PostPageAttachmentsRequestBody, + body: PostPageAttachmentsRequestBody, ) -> Optional[Union[Any, PageAttachmentsListPostResponse]]: - r"""Creates a list of instances. + r"""Creates a list of Page Attachments. - Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. - Parameters - ---------- - project_id : str - space_id : str - page_name : str - multipart_data : PostPageAttachmentsRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, PageAttachmentsListPostResponse] + Args: + project_id (str): + space_id (str): + page_name (str): + body (PostPageAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, PageAttachmentsListPostResponse] """ return ( @@ -268,6 +252,6 @@ async def asyncio( space_id=space_id, page_name=page_name, client=client, - multipart_data=multipart_data, + body=body, ) ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/pages/get_page.py b/polarion_rest_api_client/open_api_client/api/pages/get_page.py index fad7c387..1702b2dc 100644 --- a/polarion_rest_api_client/open_api_client/api/pages/get_page.py +++ b/polarion_rest_api_client/open_api_client/api/pages/get_page.py @@ -18,18 +18,16 @@ def _get_kwargs( space_id: str, page_name: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -40,7 +38,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/spaces/{spaceId}/pages/{pageName}".format( projectId=project_id, @@ -50,6 +48,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -102,31 +102,26 @@ def sync_detailed( page_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, PagesSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - page_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, PagesSingleGetResponse]] + """Returns the specified Page. + + Args: + project_id (str): + space_id (str): + page_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, PagesSingleGetResponse]] """ kwargs = _get_kwargs( @@ -151,31 +146,26 @@ def sync( page_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, PagesSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - page_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, PagesSingleGetResponse] + """Returns the specified Page. + + Args: + project_id (str): + space_id (str): + page_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, PagesSingleGetResponse] """ return sync_detailed( @@ -195,31 +185,26 @@ async def asyncio_detailed( page_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, PagesSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - page_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, PagesSingleGetResponse]] + """Returns the specified Page. + + Args: + project_id (str): + space_id (str): + page_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, PagesSingleGetResponse]] """ kwargs = _get_kwargs( @@ -242,31 +227,26 @@ async def asyncio( page_name: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, PagesSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - page_name : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, PagesSingleGetResponse] + """Returns the specified Page. + + Args: + project_id (str): + space_id (str): + page_name (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, PagesSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/pages/patch_rich_page.py b/polarion_rest_api_client/open_api_client/api/pages/patch_rich_page.py index 240e824e..f1ad46ac 100644 --- a/polarion_rest_api_client/open_api_client/api/pages/patch_rich_page.py +++ b/polarion_rest_api_client/open_api_client/api/pages/patch_rich_page.py @@ -17,22 +17,27 @@ def _get_kwargs( space_id: str, page_name: str, *, - json_body: PagesSinglePatchRequest, + body: PagesSinglePatchRequest, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "patch", "url": "/projects/{projectId}/spaces/{spaceId}/pages/{pageName}".format( projectId=project_id, spaceId=space_id, pageName=page_name, ), - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -80,34 +85,29 @@ def sync_detailed( page_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: PagesSinglePatchRequest, + body: PagesSinglePatchRequest, ) -> Response[Any]: - """Updates the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - page_name : str - json_body : PagesSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Updates the specified Page. + + Args: + project_id (str): + space_id (str): + page_name (str): + body (PagesSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( project_id=project_id, space_id=space_id, page_name=page_name, - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -123,34 +123,29 @@ async def asyncio_detailed( page_name: str, *, client: Union[AuthenticatedClient, Client], - json_body: PagesSinglePatchRequest, + body: PagesSinglePatchRequest, ) -> Response[Any]: - """Updates the specified instance. - - Parameters - ---------- - project_id : str - space_id : str - page_name : str - json_body : PagesSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Updates the specified Page. + + Args: + project_id (str): + space_id (str): + page_name (str): + body (PagesSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( project_id=project_id, space_id=space_id, page_name=page_name, - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) diff --git a/polarion_rest_api_client/open_api_client/api/plans/__init__.py b/polarion_rest_api_client/open_api_client/api/plans/__init__.py new file mode 100644 index 00000000..dd5d085d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/plans/__init__.py @@ -0,0 +1,2 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 diff --git a/polarion_rest_api_client/open_api_client/api/plans/delete_plan.py b/polarion_rest_api_client/open_api_client/api/plans/delete_plan.py new file mode 100644 index 00000000..a544dc5b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/plans/delete_plan.py @@ -0,0 +1,120 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + project_id: str, + plan_id: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/plans/{planId}".format( + projectId=project_id, + planId=plan_id, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + plan_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Plan. + + Args: + project_id (str): + plan_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + plan_id=plan_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + plan_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Plan. + + Args: + project_id (str): + plan_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + plan_id=plan_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/plans/delete_plan_relationship.py b/polarion_rest_api_client/open_api_client/api/plans/delete_plan_relationship.py new file mode 100644 index 00000000..e0775a66 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/plans/delete_plan_relationship.py @@ -0,0 +1,155 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.relationships_list_delete_request import ( + RelationshipsListDeleteRequest, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + plan_id: str, + relationship_id: str, + *, + body: RelationshipsListDeleteRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/plans/{planId}/relationships/{relationshipId}".format( + projectId=project_id, + planId=plan_id, + relationshipId=relationship_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.METHOD_NOT_ALLOWED: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + plan_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: RelationshipsListDeleteRequest, +) -> Response[Any]: + """Removes the specific Relationship from the Plan. + + Args: + project_id (str): + plan_id (str): + relationship_id (str): + body (RelationshipsListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + plan_id=plan_id, + relationship_id=relationship_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + plan_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: RelationshipsListDeleteRequest, +) -> Response[Any]: + """Removes the specific Relationship from the Plan. + + Args: + project_id (str): + plan_id (str): + relationship_id (str): + body (RelationshipsListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + plan_id=plan_id, + relationship_id=relationship_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/plans/delete_plans.py b/polarion_rest_api_client/open_api_client/api/plans/delete_plans.py new file mode 100644 index 00000000..0955a8c4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/plans/delete_plans.py @@ -0,0 +1,135 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.plans_list_delete_request import PlansListDeleteRequest +from ...types import Response + + +def _get_kwargs( + project_id: str, + *, + body: PlansListDeleteRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/plans".format( + projectId=project_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PlansListDeleteRequest, +) -> Response[Any]: + """Deletes a list of Plans. + + Args: + project_id (str): + body (PlansListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PlansListDeleteRequest, +) -> Response[Any]: + """Deletes a list of Plans. + + Args: + project_id (str): + body (PlansListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/plans/get_plan.py b/polarion_rest_api_client/open_api_client/api/plans/get_plan.py new file mode 100644 index 00000000..e327853c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/plans/get_plan.py @@ -0,0 +1,248 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.plans_single_get_response import PlansSingleGetResponse +from ...models.sparse_fields import SparseFields +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + plan_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["revision"] = revision + + 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": "/projects/{projectId}/plans/{planId}".format( + projectId=project_id, + planId=plan_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, PlansSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = PlansSingleGetResponse.from_dict(response.json()) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, PlansSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + plan_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, PlansSingleGetResponse]]: + """Returns the specified Plan. + + Args: + project_id (str): + plan_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, PlansSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + plan_id=plan_id, + fields=fields, + include=include, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + plan_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, PlansSingleGetResponse]]: + """Returns the specified Plan. + + Args: + project_id (str): + plan_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, PlansSingleGetResponse] + """ + + return sync_detailed( + project_id=project_id, + plan_id=plan_id, + client=client, + fields=fields, + include=include, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + plan_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, PlansSingleGetResponse]]: + """Returns the specified Plan. + + Args: + project_id (str): + plan_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, PlansSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + plan_id=plan_id, + fields=fields, + include=include, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + plan_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, PlansSingleGetResponse]]: + """Returns the specified Plan. + + Args: + project_id (str): + plan_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, PlansSingleGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + plan_id=plan_id, + client=client, + fields=fields, + include=include, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/plans/get_plan_relationship.py b/polarion_rest_api_client/open_api_client/api/plans/get_plan_relationship.py new file mode 100644 index 00000000..f8a0997f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/plans/get_plan_relationship.py @@ -0,0 +1,363 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.relationship_data_list_response import ( + RelationshipDataListResponse, +) +from ...models.relationship_data_single_response import ( + RelationshipDataSingleResponse, +) +from ...models.sparse_fields import SparseFields +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + plan_id: str, + relationship_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["revision"] = revision + + 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": "/projects/{projectId}/plans/{planId}/relationships/{relationshipId}".format( + projectId=project_id, + planId=plan_id, + relationshipId=relationship_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ + Union[ + Any, + Union[ + "RelationshipDataListResponse", "RelationshipDataSingleResponse" + ], + ] +]: + if response.status_code == HTTPStatus.OK: + + def _parse_response_200( + data: object, + ) -> Union[ + "RelationshipDataListResponse", "RelationshipDataSingleResponse" + ]: + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_relationship_response_body_type_0 = ( + RelationshipDataSingleResponse.from_dict(data) + ) + + return componentsschemas_relationship_response_body_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + componentsschemas_relationship_response_body_type_1 = ( + RelationshipDataListResponse.from_dict(data) + ) + + return componentsschemas_relationship_response_body_type_1 + + response_200 = _parse_response_200(response.json()) + + return response_200 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.NOT_IMPLEMENTED: + response_501 = cast(Any, None) + return response_501 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ + Union[ + Any, + Union[ + "RelationshipDataListResponse", "RelationshipDataSingleResponse" + ], + ] +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + plan_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[ + Union[ + Any, + Union[ + "RelationshipDataListResponse", "RelationshipDataSingleResponse" + ], + ] +]: + """Returns a list of Plan Relationships. + + Args: + project_id (str): + plan_id (str): + relationship_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, Union['RelationshipDataListResponse', 'RelationshipDataSingleResponse']]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + plan_id=plan_id, + relationship_id=relationship_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + plan_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[ + Union[ + Any, + Union[ + "RelationshipDataListResponse", "RelationshipDataSingleResponse" + ], + ] +]: + """Returns a list of Plan Relationships. + + Args: + project_id (str): + plan_id (str): + relationship_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, Union['RelationshipDataListResponse', 'RelationshipDataSingleResponse']] + """ + + return sync_detailed( + project_id=project_id, + plan_id=plan_id, + relationship_id=relationship_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + plan_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[ + Union[ + Any, + Union[ + "RelationshipDataListResponse", "RelationshipDataSingleResponse" + ], + ] +]: + """Returns a list of Plan Relationships. + + Args: + project_id (str): + plan_id (str): + relationship_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, Union['RelationshipDataListResponse', 'RelationshipDataSingleResponse']]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + plan_id=plan_id, + relationship_id=relationship_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + plan_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[ + Union[ + Any, + Union[ + "RelationshipDataListResponse", "RelationshipDataSingleResponse" + ], + ] +]: + """Returns a list of Plan Relationships. + + Args: + project_id (str): + plan_id (str): + relationship_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, Union['RelationshipDataListResponse', 'RelationshipDataSingleResponse']] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + plan_id=plan_id, + relationship_id=relationship_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/plans/get_plans.py b/polarion_rest_api_client/open_api_client/api/plans/get_plans.py new file mode 100644 index 00000000..3cc6ba6a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/plans/get_plans.py @@ -0,0 +1,294 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.plans_list_get_response import PlansListGetResponse +from ...models.sparse_fields import SparseFields +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, + templates: Union[Unset, bool] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["query"] = query + + params["sort"] = sort + + params["templates"] = templates + + 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": "/projects/{projectId}/plans".format( + projectId=project_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, PlansListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = PlansListGetResponse.from_dict(response.json()) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, PlansListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, + templates: Union[Unset, bool] = UNSET, +) -> Response[Union[Any, PlansListGetResponse]]: + """Returns a list of Plans. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + templates (Union[Unset, bool]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, PlansListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + query=query, + sort=sort, + templates=templates, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, + templates: Union[Unset, bool] = UNSET, +) -> Optional[Union[Any, PlansListGetResponse]]: + """Returns a list of Plans. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + templates (Union[Unset, bool]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, PlansListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + query=query, + sort=sort, + templates=templates, + ).parsed + + +async def asyncio_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, + templates: Union[Unset, bool] = UNSET, +) -> Response[Union[Any, PlansListGetResponse]]: + """Returns a list of Plans. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + templates (Union[Unset, bool]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, PlansListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + query=query, + sort=sort, + templates=templates, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, + templates: Union[Unset, bool] = UNSET, +) -> Optional[Union[Any, PlansListGetResponse]]: + """Returns a list of Plans. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + templates (Union[Unset, bool]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, PlansListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + query=query, + sort=sort, + templates=templates, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/plans/patch_plan.py b/polarion_rest_api_client/open_api_client/api/plans/patch_plan.py new file mode 100644 index 00000000..3bc981a4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/plans/patch_plan.py @@ -0,0 +1,145 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.plans_single_patch_request import PlansSinglePatchRequest +from ...types import Response + + +def _get_kwargs( + project_id: str, + plan_id: str, + *, + body: PlansSinglePatchRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "patch", + "url": "/projects/{projectId}/plans/{planId}".format( + projectId=project_id, + planId=plan_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.CONFLICT: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + plan_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PlansSinglePatchRequest, +) -> Response[Any]: + """Updates the specified Plan. + + Args: + project_id (str): + plan_id (str): + body (PlansSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + plan_id=plan_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + plan_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PlansSinglePatchRequest, +) -> Response[Any]: + """Updates the specified Plan. + + Args: + project_id (str): + plan_id (str): + body (PlansSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + plan_id=plan_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/plans/patch_plan_relationships.py b/polarion_rest_api_client/open_api_client/api/plans/patch_plan_relationships.py new file mode 100644 index 00000000..584d2c5d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/plans/patch_plan_relationships.py @@ -0,0 +1,168 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.relationship_data_list_request import ( + RelationshipDataListRequest, +) +from ...models.relationship_data_single_request import ( + RelationshipDataSingleRequest, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + plan_id: str, + relationship_id: str, + *, + body: Union[ + "RelationshipDataListRequest", "RelationshipDataSingleRequest" + ], +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "patch", + "url": "/projects/{projectId}/plans/{planId}/relationships/{relationshipId}".format( + projectId=project_id, + planId=plan_id, + relationshipId=relationship_id, + ), + } + + _body: Dict[str, Any] + if isinstance(body, RelationshipDataSingleRequest): + _body = body.to_dict() + else: + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + plan_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: Union[ + "RelationshipDataListRequest", "RelationshipDataSingleRequest" + ], +) -> Response[Any]: + """Updates a list of Plan Relationships. + + Args: + project_id (str): + plan_id (str): + relationship_id (str): + body (Union['RelationshipDataListRequest', 'RelationshipDataSingleRequest']): List of + generic contents Example: {'data': [{'type': 'plans', 'id': 'MyProjectId/MyResourceId'}]}. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + plan_id=plan_id, + relationship_id=relationship_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + plan_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: Union[ + "RelationshipDataListRequest", "RelationshipDataSingleRequest" + ], +) -> Response[Any]: + """Updates a list of Plan Relationships. + + Args: + project_id (str): + plan_id (str): + relationship_id (str): + body (Union['RelationshipDataListRequest', 'RelationshipDataSingleRequest']): List of + generic contents Example: {'data': [{'type': 'plans', 'id': 'MyProjectId/MyResourceId'}]}. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + plan_id=plan_id, + relationship_id=relationship_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/plans/post_plan_relationships.py b/polarion_rest_api_client/open_api_client/api/plans/post_plan_relationships.py new file mode 100644 index 00000000..a1ef9084 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/plans/post_plan_relationships.py @@ -0,0 +1,256 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.plans_list_post_response import PlansListPostResponse +from ...models.relationship_data_list_request import ( + RelationshipDataListRequest, +) +from ...models.relationship_data_single_request import ( + RelationshipDataSingleRequest, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + plan_id: str, + relationship_id: str, + *, + body: Union[ + "RelationshipDataListRequest", "RelationshipDataSingleRequest" + ], +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/plans/{planId}/relationships/{relationshipId}".format( + projectId=project_id, + planId=plan_id, + relationshipId=relationship_id, + ), + } + + _body: Dict[str, Any] + if isinstance(body, RelationshipDataSingleRequest): + _body = body.to_dict() + else: + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, PlansListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = PlansListPostResponse.from_dict(response.json()) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, PlansListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + plan_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: Union[ + "RelationshipDataListRequest", "RelationshipDataSingleRequest" + ], +) -> Response[Union[Any, PlansListPostResponse]]: + """Creates the specific Relationships for the Plan. + + Args: + project_id (str): + plan_id (str): + relationship_id (str): + body (Union['RelationshipDataListRequest', 'RelationshipDataSingleRequest']): List of + generic contents Example: {'data': [{'type': 'plans', 'id': 'MyProjectId/MyResourceId'}]}. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, PlansListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + plan_id=plan_id, + relationship_id=relationship_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + plan_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: Union[ + "RelationshipDataListRequest", "RelationshipDataSingleRequest" + ], +) -> Optional[Union[Any, PlansListPostResponse]]: + """Creates the specific Relationships for the Plan. + + Args: + project_id (str): + plan_id (str): + relationship_id (str): + body (Union['RelationshipDataListRequest', 'RelationshipDataSingleRequest']): List of + generic contents Example: {'data': [{'type': 'plans', 'id': 'MyProjectId/MyResourceId'}]}. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, PlansListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + plan_id=plan_id, + relationship_id=relationship_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + plan_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: Union[ + "RelationshipDataListRequest", "RelationshipDataSingleRequest" + ], +) -> Response[Union[Any, PlansListPostResponse]]: + """Creates the specific Relationships for the Plan. + + Args: + project_id (str): + plan_id (str): + relationship_id (str): + body (Union['RelationshipDataListRequest', 'RelationshipDataSingleRequest']): List of + generic contents Example: {'data': [{'type': 'plans', 'id': 'MyProjectId/MyResourceId'}]}. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, PlansListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + plan_id=plan_id, + relationship_id=relationship_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + plan_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: Union[ + "RelationshipDataListRequest", "RelationshipDataSingleRequest" + ], +) -> Optional[Union[Any, PlansListPostResponse]]: + """Creates the specific Relationships for the Plan. + + Args: + project_id (str): + plan_id (str): + relationship_id (str): + body (Union['RelationshipDataListRequest', 'RelationshipDataSingleRequest']): List of + generic contents Example: {'data': [{'type': 'plans', 'id': 'MyProjectId/MyResourceId'}]}. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, PlansListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + plan_id=plan_id, + relationship_id=relationship_id, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/plans/post_plans.py b/polarion_rest_api_client/open_api_client/api/plans/post_plans.py new file mode 100644 index 00000000..e32b1c85 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/plans/post_plans.py @@ -0,0 +1,208 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.plans_list_post_request import PlansListPostRequest +from ...models.plans_list_post_response import PlansListPostResponse +from ...types import Response + + +def _get_kwargs( + project_id: str, + *, + body: PlansListPostRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/plans".format( + projectId=project_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, PlansListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = PlansListPostResponse.from_dict(response.json()) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, PlansListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PlansListPostRequest, +) -> Response[Union[Any, PlansListPostResponse]]: + """Creates a list of Plans. + + Args: + project_id (str): + body (PlansListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, PlansListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PlansListPostRequest, +) -> Optional[Union[Any, PlansListPostResponse]]: + """Creates a list of Plans. + + Args: + project_id (str): + body (PlansListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, PlansListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PlansListPostRequest, +) -> Response[Union[Any, PlansListPostResponse]]: + """Creates a list of Plans. + + Args: + project_id (str): + body (PlansListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, PlansListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PlansListPostRequest, +) -> Optional[Union[Any, PlansListPostResponse]]: + """Creates a list of Plans. + + Args: + project_id (str): + body (PlansListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, PlansListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/project_templates/__init__.py b/polarion_rest_api_client/open_api_client/api/project_templates/__init__.py new file mode 100644 index 00000000..dd5d085d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/project_templates/__init__.py @@ -0,0 +1,2 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 diff --git a/polarion_rest_api_client/open_api_client/api/project_templates/get_project_templates.py b/polarion_rest_api_client/open_api_client/api/project_templates/get_project_templates.py new file mode 100644 index 00000000..6001328c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/project_templates/get_project_templates.py @@ -0,0 +1,238 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.projecttemplates_list_get_response import ( + ProjecttemplatesListGetResponse, +) +from ...models.sparse_fields import SparseFields +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + 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": "/projecttemplates", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, ProjecttemplatesListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = ProjecttemplatesListGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, ProjecttemplatesListGetResponse]]: + 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: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, +) -> Response[Union[Any, ProjecttemplatesListGetResponse]]: + """Returns a list of Project Templates. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ProjecttemplatesListGetResponse]] + """ + + kwargs = _get_kwargs( + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, +) -> Optional[Union[Any, ProjecttemplatesListGetResponse]]: + """Returns a list of Project Templates. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ProjecttemplatesListGetResponse] + """ + + return sync_detailed( + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + ).parsed + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, +) -> Response[Union[Any, ProjecttemplatesListGetResponse]]: + """Returns a list of Project Templates. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ProjecttemplatesListGetResponse]] + """ + + kwargs = _get_kwargs( + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, +) -> Optional[Union[Any, ProjecttemplatesListGetResponse]]: + """Returns a list of Project Templates. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ProjecttemplatesListGetResponse] + """ + + return ( + await asyncio_detailed( + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/projects/create_project.py b/polarion_rest_api_client/open_api_client/api/projects/create_project.py new file mode 100644 index 00000000..ddee456e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/projects/create_project.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.create_project_request_body import CreateProjectRequestBody +from ...types import Response + + +def _get_kwargs( + *, + body: CreateProjectRequestBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/actions/createProject", + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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: Union[AuthenticatedClient, Client], + body: CreateProjectRequestBody, +) -> Response[Any]: + """Creates a new Project. + + Args: + body (CreateProjectRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], + body: CreateProjectRequestBody, +) -> Response[Any]: + """Creates a new Project. + + Args: + body (CreateProjectRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/projects/delete_project.py b/polarion_rest_api_client/open_api_client/api/projects/delete_project.py new file mode 100644 index 00000000..61478991 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/projects/delete_project.py @@ -0,0 +1,106 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + project_id: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}".format( + projectId=project_id, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Project. + + Args: + project_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Project. + + Args: + project_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/projects/delete_project_test_parameter_definition.py b/polarion_rest_api_client/open_api_client/api/projects/delete_project_test_parameter_definition.py new file mode 100644 index 00000000..7cb1eef9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/projects/delete_project_test_parameter_definition.py @@ -0,0 +1,122 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_param_id: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/testparameterdefinitions/{testParamId}".format( + projectId=project_id, + testParamId=test_param_id, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Test Parameter Definition for the specified + Project. + + Args: + project_id (str): + test_param_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_param_id=test_param_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Test Parameter Definition for the specified + Project. + + Args: + project_id (str): + test_param_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_param_id=test_param_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/projects/get_project.py b/polarion_rest_api_client/open_api_client/api/projects/get_project.py index e3e02bf5..25300964 100644 --- a/polarion_rest_api_client/open_api_client/api/projects/get_project.py +++ b/polarion_rest_api_client/open_api_client/api/projects/get_project.py @@ -16,18 +16,16 @@ def _get_kwargs( project_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -38,7 +36,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}".format( projectId=project_id, @@ -46,6 +44,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -96,29 +96,24 @@ def sync_detailed( project_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, ProjectsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, ProjectsSingleGetResponse]] + """Returns the specified Project. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ProjectsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -139,29 +134,24 @@ def sync( project_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, ProjectsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, ProjectsSingleGetResponse] + """Returns the specified Project. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ProjectsSingleGetResponse] """ return sync_detailed( @@ -177,29 +167,24 @@ async def asyncio_detailed( project_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, ProjectsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, ProjectsSingleGetResponse]] + """Returns the specified Project. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ProjectsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -218,29 +203,24 @@ async def asyncio( project_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, ProjectsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, ProjectsSingleGetResponse] + """Returns the specified Project. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ProjectsSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/projects/get_project_test_parameter_definition.py b/polarion_rest_api_client/open_api_client/api/projects/get_project_test_parameter_definition.py new file mode 100644 index 00000000..9f280b8e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/projects/get_project_test_parameter_definition.py @@ -0,0 +1,241 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testparameter_definitions_single_get_response import ( + TestparameterDefinitionsSingleGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_param_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + 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": "/projects/{projectId}/testparameterdefinitions/{testParamId}".format( + projectId=project_id, + testParamId=test_param_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestparameterDefinitionsSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestparameterDefinitionsSingleGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestparameterDefinitionsSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestparameterDefinitionsSingleGetResponse]]: + """Returns the specified Test Parameter Definition for the specified + Project. + + Args: + project_id (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparameterDefinitionsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_param_id=test_param_id, + fields=fields, + include=include, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestparameterDefinitionsSingleGetResponse]]: + """Returns the specified Test Parameter Definition for the specified + Project. + + Args: + project_id (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparameterDefinitionsSingleGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_param_id=test_param_id, + client=client, + fields=fields, + include=include, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestparameterDefinitionsSingleGetResponse]]: + """Returns the specified Test Parameter Definition for the specified + Project. + + Args: + project_id (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparameterDefinitionsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_param_id=test_param_id, + fields=fields, + include=include, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestparameterDefinitionsSingleGetResponse]]: + """Returns the specified Test Parameter Definition for the specified + Project. + + Args: + project_id (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparameterDefinitionsSingleGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_param_id=test_param_id, + client=client, + fields=fields, + include=include, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/projects/get_project_test_parameter_definitions.py b/polarion_rest_api_client/open_api_client/api/projects/get_project_test_parameter_definitions.py new file mode 100644 index 00000000..16465a8a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/projects/get_project_test_parameter_definitions.py @@ -0,0 +1,253 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testparameter_definitions_list_get_response import ( + TestparameterDefinitionsListGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + 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": "/projects/{projectId}/testparameterdefinitions".format( + projectId=project_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestparameterDefinitionsListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestparameterDefinitionsListGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestparameterDefinitionsListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, +) -> Response[Union[Any, TestparameterDefinitionsListGetResponse]]: + """Returns a list of Test Parameter Definitions for the specified Project. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparameterDefinitionsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, +) -> Optional[Union[Any, TestparameterDefinitionsListGetResponse]]: + """Returns a list of Test Parameter Definitions for the specified Project. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparameterDefinitionsListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + ).parsed + + +async def asyncio_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, +) -> Response[Union[Any, TestparameterDefinitionsListGetResponse]]: + """Returns a list of Test Parameter Definitions for the specified Project. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparameterDefinitionsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, +) -> Optional[Union[Any, TestparameterDefinitionsListGetResponse]]: + """Returns a list of Test Parameter Definitions for the specified Project. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparameterDefinitionsListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/projects/get_projects.py b/polarion_rest_api_client/open_api_client/api/projects/get_projects.py index ff56b7ab..7ae3e134 100644 --- a/polarion_rest_api_client/open_api_client/api/projects/get_projects.py +++ b/polarion_rest_api_client/open_api_client/api/projects/get_projects.py @@ -15,21 +15,19 @@ def _get_kwargs( *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -46,12 +44,14 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects", "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -101,34 +101,29 @@ def _build_response( def sync_detailed( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Response[Union[Any, ProjectsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - query : Union[Unset, None, str] - sort : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, ProjectsListGetResponse]] + """Returns a list of Projects. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ProjectsListGetResponse]] """ kwargs = _get_kwargs( @@ -150,34 +145,29 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, ProjectsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - query : Union[Unset, None, str] - sort : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, ProjectsListGetResponse] + """Returns a list of Projects. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ProjectsListGetResponse] """ return sync_detailed( @@ -194,34 +184,29 @@ def sync( async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Response[Union[Any, ProjectsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - query : Union[Unset, None, str] - sort : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, ProjectsListGetResponse]] + """Returns a list of Projects. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, ProjectsListGetResponse]] """ kwargs = _get_kwargs( @@ -241,34 +226,29 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, ProjectsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - query : Union[Unset, None, str] - sort : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, ProjectsListGetResponse] + """Returns a list of Projects. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, ProjectsListGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/projects/mark_project.py b/polarion_rest_api_client/open_api_client/api/projects/mark_project.py new file mode 100644 index 00000000..538c43fe --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/projects/mark_project.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.create_project_request_body import CreateProjectRequestBody +from ...types import Response + + +def _get_kwargs( + *, + body: CreateProjectRequestBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/actions/markProject", + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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: Union[AuthenticatedClient, Client], + body: CreateProjectRequestBody, +) -> Response[Any]: + """Marks the Project. + + Args: + body (CreateProjectRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], + body: CreateProjectRequestBody, +) -> Response[Any]: + """Marks the Project. + + Args: + body (CreateProjectRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/projects/move_project_action.py b/polarion_rest_api_client/open_api_client/api/projects/move_project_action.py new file mode 100644 index 00000000..6de12213 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/projects/move_project_action.py @@ -0,0 +1,125 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.move_project_request_body import MoveProjectRequestBody +from ...types import Response + + +def _get_kwargs( + project_id: str, + *, + body: MoveProjectRequestBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/actions/moveProject".format( + projectId=project_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: MoveProjectRequestBody, +) -> Response[Any]: + """Moves project to a different location. + + Args: + project_id (str): + body (MoveProjectRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: MoveProjectRequestBody, +) -> Response[Any]: + """Moves project to a different location. + + Args: + project_id (str): + body (MoveProjectRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/projects/patch_project.py b/polarion_rest_api_client/open_api_client/api/projects/patch_project.py new file mode 100644 index 00000000..a4943f55 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/projects/patch_project.py @@ -0,0 +1,137 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.projects_single_patch_request import ProjectsSinglePatchRequest +from ...types import Response + + +def _get_kwargs( + project_id: str, + *, + body: ProjectsSinglePatchRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "patch", + "url": "/projects/{projectId}".format( + projectId=project_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.CONFLICT: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: ProjectsSinglePatchRequest, +) -> Response[Any]: + """Updates the specified Project. + + Args: + project_id (str): + body (ProjectsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: ProjectsSinglePatchRequest, +) -> Response[Any]: + """Updates the specified Project. + + Args: + project_id (str): + body (ProjectsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/projects/post_project_test_parameter_definitions.py b/polarion_rest_api_client/open_api_client/api/projects/post_project_test_parameter_definitions.py new file mode 100644 index 00000000..f0f374c7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/projects/post_project_test_parameter_definitions.py @@ -0,0 +1,214 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.testparameter_definitions_list_post_request import ( + TestparameterDefinitionsListPostRequest, +) +from ...models.testparameter_definitions_list_post_response import ( + TestparameterDefinitionsListPostResponse, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + *, + body: TestparameterDefinitionsListPostRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/testparameterdefinitions".format( + projectId=project_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestparameterDefinitionsListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = TestparameterDefinitionsListPostResponse.from_dict( + response.json() + ) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestparameterDefinitionsListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestparameterDefinitionsListPostRequest, +) -> Response[Union[Any, TestparameterDefinitionsListPostResponse]]: + """Creates a list of Test Parameter Definitions for the specified Project. + + Args: + project_id (str): + body (TestparameterDefinitionsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparameterDefinitionsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestparameterDefinitionsListPostRequest, +) -> Optional[Union[Any, TestparameterDefinitionsListPostResponse]]: + """Creates a list of Test Parameter Definitions for the specified Project. + + Args: + project_id (str): + body (TestparameterDefinitionsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparameterDefinitionsListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestparameterDefinitionsListPostRequest, +) -> Response[Union[Any, TestparameterDefinitionsListPostResponse]]: + """Creates a list of Test Parameter Definitions for the specified Project. + + Args: + project_id (str): + body (TestparameterDefinitionsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparameterDefinitionsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestparameterDefinitionsListPostRequest, +) -> Optional[Union[Any, TestparameterDefinitionsListPostResponse]]: + """Creates a list of Test Parameter Definitions for the specified Project. + + Args: + project_id (str): + body (TestparameterDefinitionsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparameterDefinitionsListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/projects/unmark_project.py b/polarion_rest_api_client/open_api_client/api/projects/unmark_project.py new file mode 100644 index 00000000..ad3f98bd --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/projects/unmark_project.py @@ -0,0 +1,106 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + project_id: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/actions/unmarkProject".format( + projectId=project_id, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Unmarks the Project. + + Args: + project_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Unmarks the Project. + + Args: + project_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/revisions/__init__.py b/polarion_rest_api_client/open_api_client/api/revisions/__init__.py new file mode 100644 index 00000000..dd5d085d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/revisions/__init__.py @@ -0,0 +1,2 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 diff --git a/polarion_rest_api_client/open_api_client/api/revisions/get_revision.py b/polarion_rest_api_client/open_api_client/api/revisions/get_revision.py new file mode 100644 index 00000000..2b9ffebe --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/revisions/get_revision.py @@ -0,0 +1,233 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.revisions_single_get_response import RevisionsSingleGetResponse +from ...models.sparse_fields import SparseFields +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + repository_name: str, + revision: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + 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": "/revisions/{repositoryName}/{revision}".format( + repositoryName=repository_name, + revision=revision, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, RevisionsSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = RevisionsSingleGetResponse.from_dict(response.json()) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, RevisionsSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + repository_name: str, + revision: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, +) -> Response[Union[Any, RevisionsSingleGetResponse]]: + """Returns the specified instance. + + Args: + repository_name (str): + revision (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, RevisionsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + repository_name=repository_name, + revision=revision, + fields=fields, + include=include, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + repository_name: str, + revision: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, RevisionsSingleGetResponse]]: + """Returns the specified instance. + + Args: + repository_name (str): + revision (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, RevisionsSingleGetResponse] + """ + + return sync_detailed( + repository_name=repository_name, + revision=revision, + client=client, + fields=fields, + include=include, + ).parsed + + +async def asyncio_detailed( + repository_name: str, + revision: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, +) -> Response[Union[Any, RevisionsSingleGetResponse]]: + """Returns the specified instance. + + Args: + repository_name (str): + revision (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, RevisionsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + repository_name=repository_name, + revision=revision, + fields=fields, + include=include, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + repository_name: str, + revision: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, RevisionsSingleGetResponse]]: + """Returns the specified instance. + + Args: + repository_name (str): + revision (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, RevisionsSingleGetResponse] + """ + + return ( + await asyncio_detailed( + repository_name=repository_name, + revision=revision, + client=client, + fields=fields, + include=include, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/revisions/get_revisions.py b/polarion_rest_api_client/open_api_client/api/revisions/get_revisions.py new file mode 100644 index 00000000..0d35b04b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/revisions/get_revisions.py @@ -0,0 +1,264 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.revisions_list_get_response import RevisionsListGetResponse +from ...models.sparse_fields import SparseFields +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["query"] = query + + params["sort"] = sort + + 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": "/revisions", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, RevisionsListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = RevisionsListGetResponse.from_dict(response.json()) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, RevisionsListGetResponse]]: + 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: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, +) -> Response[Union[Any, RevisionsListGetResponse]]: + """Returns a list of instances. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, RevisionsListGetResponse]] + """ + + kwargs = _get_kwargs( + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + query=query, + sort=sort, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, RevisionsListGetResponse]]: + """Returns a list of instances. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, RevisionsListGetResponse] + """ + + return sync_detailed( + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + query=query, + sort=sort, + ).parsed + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, +) -> Response[Union[Any, RevisionsListGetResponse]]: + """Returns a list of instances. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, RevisionsListGetResponse]] + """ + + kwargs = _get_kwargs( + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + query=query, + sort=sort, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, RevisionsListGetResponse]]: + """Returns a list of instances. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, RevisionsListGetResponse] + """ + + return ( + await asyncio_detailed( + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + query=query, + sort=sort, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/roles/get_role.py b/polarion_rest_api_client/open_api_client/api/roles/get_role.py index 402dcc43..660505a7 100644 --- a/polarion_rest_api_client/open_api_client/api/roles/get_role.py +++ b/polarion_rest_api_client/open_api_client/api/roles/get_role.py @@ -18,17 +18,15 @@ def _get_kwargs( role_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -37,7 +35,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/roles/{roleId}".format( roleId=role_id, @@ -45,6 +43,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -95,27 +95,22 @@ def sync_detailed( role_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, ) -> Response[Union[Any, GlobalrolesSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - role_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, GlobalrolesSingleGetResponse]] + """Returns the specified Role. + + Args: + role_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, GlobalrolesSingleGetResponse]] """ kwargs = _get_kwargs( @@ -135,27 +130,22 @@ def sync( role_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, GlobalrolesSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - role_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, GlobalrolesSingleGetResponse] + """Returns the specified Role. + + Args: + role_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, GlobalrolesSingleGetResponse] """ return sync_detailed( @@ -170,27 +160,22 @@ async def asyncio_detailed( role_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, ) -> Response[Union[Any, GlobalrolesSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - role_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, GlobalrolesSingleGetResponse]] + """Returns the specified Role. + + Args: + role_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, GlobalrolesSingleGetResponse]] """ kwargs = _get_kwargs( @@ -208,27 +193,22 @@ async def asyncio( role_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, GlobalrolesSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - role_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, GlobalrolesSingleGetResponse] + """Returns the specified Role. + + Args: + role_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, GlobalrolesSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/test_record_attachments/__init__.py b/polarion_rest_api_client/open_api_client/api/test_record_attachments/__init__.py new file mode 100644 index 00000000..dd5d085d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_record_attachments/__init__.py @@ -0,0 +1,2 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 diff --git a/polarion_rest_api_client/open_api_client/api/test_record_attachments/get_test_record_attachment.py b/polarion_rest_api_client/open_api_client/api/test_record_attachments/get_test_record_attachment.py new file mode 100644 index 00000000..28592a86 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_record_attachments/get_test_record_attachment.py @@ -0,0 +1,308 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testrecord_attachments_single_get_response import ( + TestrecordAttachmentsSingleGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + attachment_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/testrecords/{testCaseProjectId}/{testCaseId}/{iteration}/attachments/{attachmentId}".format( + projectId=project_id, + testRunId=test_run_id, + testCaseProjectId=test_case_project_id, + testCaseId=test_case_id, + iteration=iteration, + attachmentId=attachment_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestrecordAttachmentsSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestrecordAttachmentsSingleGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestrecordAttachmentsSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestrecordAttachmentsSingleGetResponse]]: + """Returns the specified Test Record Attachment. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrecordAttachmentsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + attachment_id=attachment_id, + fields=fields, + include=include, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestrecordAttachmentsSingleGetResponse]]: + """Returns the specified Test Record Attachment. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrecordAttachmentsSingleGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + attachment_id=attachment_id, + client=client, + fields=fields, + include=include, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestrecordAttachmentsSingleGetResponse]]: + """Returns the specified Test Record Attachment. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrecordAttachmentsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + attachment_id=attachment_id, + fields=fields, + include=include, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestrecordAttachmentsSingleGetResponse]]: + """Returns the specified Test Record Attachment. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrecordAttachmentsSingleGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + attachment_id=attachment_id, + client=client, + fields=fields, + include=include, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_record_attachments/get_test_record_attachment_content.py b/polarion_rest_api_client/open_api_client/api/test_record_attachments/get_test_record_attachment_content.py new file mode 100644 index 00000000..9e035e57 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_record_attachments/get_test_record_attachment_content.py @@ -0,0 +1,173 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + attachment_id: str, + *, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/testrecords/{testCaseProjectId}/{testCaseId}/{iteration}/attachments/{attachmentId}/content".format( + projectId=project_id, + testRunId=test_run_id, + testCaseProjectId=test_case_project_id, + testCaseId=test_case_id, + iteration=iteration, + attachmentId=attachment_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.OK: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + revision: Union[Unset, str] = UNSET, +) -> Response[Any]: + """Downloads the file content for a specified Test Record Attachment. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + attachment_id (str): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + attachment_id=attachment_id, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + revision: Union[Unset, str] = UNSET, +) -> Response[Any]: + """Downloads the file content for a specified Test Record Attachment. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + attachment_id (str): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + attachment_id=attachment_id, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_record_attachments/get_test_record_attachments.py b/polarion_rest_api_client/open_api_client/api/test_record_attachments/get_test_record_attachments.py new file mode 100644 index 00000000..93aaf99b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_record_attachments/get_test_record_attachments.py @@ -0,0 +1,324 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testrecord_attachments_list_get_response import ( + TestrecordAttachmentsListGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/testrecords/{testCaseProjectId}/{testCaseId}/{iteration}/attachments".format( + projectId=project_id, + testRunId=test_run_id, + testCaseProjectId=test_case_project_id, + testCaseId=test_case_id, + iteration=iteration, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestrecordAttachmentsListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestrecordAttachmentsListGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestrecordAttachmentsListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestrecordAttachmentsListGetResponse]]: + """Returns a list of Test Record Attachments. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrecordAttachmentsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestrecordAttachmentsListGetResponse]]: + """Returns a list of Test Record Attachments. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrecordAttachmentsListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestrecordAttachmentsListGetResponse]]: + """Returns a list of Test Record Attachments. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrecordAttachmentsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestrecordAttachmentsListGetResponse]]: + """Returns a list of Test Record Attachments. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrecordAttachmentsListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_record_attachments/post_test_record_attachments.py b/polarion_rest_api_client/open_api_client/api/test_record_attachments/post_test_record_attachments.py new file mode 100644 index 00000000..b9ebc5fc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_record_attachments/post_test_record_attachments.py @@ -0,0 +1,285 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.post_test_record_attachments_request_body import ( + PostTestRecordAttachmentsRequestBody, +) +from ...models.testrecord_attachments_list_post_response import ( + TestrecordAttachmentsListPostResponse, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + body: PostTestRecordAttachmentsRequestBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/testruns/{testRunId}/testrecords/{testCaseProjectId}/{testCaseId}/{iteration}/attachments".format( + projectId=project_id, + testRunId=test_run_id, + testCaseProjectId=test_case_project_id, + testCaseId=test_case_id, + iteration=iteration, + ), + } + + _body = body.to_multipart() + + _kwargs["files"] = _body + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestrecordAttachmentsListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = TestrecordAttachmentsListPostResponse.from_dict( + response.json() + ) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestrecordAttachmentsListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + body: PostTestRecordAttachmentsRequestBody, +) -> Response[Union[Any, TestrecordAttachmentsListPostResponse]]: + r"""Creates a list of Test Record Attachments. + + Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + body (PostTestRecordAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrecordAttachmentsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + body: PostTestRecordAttachmentsRequestBody, +) -> Optional[Union[Any, TestrecordAttachmentsListPostResponse]]: + r"""Creates a list of Test Record Attachments. + + Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + body (PostTestRecordAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrecordAttachmentsListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + body: PostTestRecordAttachmentsRequestBody, +) -> Response[Union[Any, TestrecordAttachmentsListPostResponse]]: + r"""Creates a list of Test Record Attachments. + + Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + body (PostTestRecordAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrecordAttachmentsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + body: PostTestRecordAttachmentsRequestBody, +) -> Optional[Union[Any, TestrecordAttachmentsListPostResponse]]: + r"""Creates a list of Test Record Attachments. + + Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + body (PostTestRecordAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrecordAttachmentsListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_records/__init__.py b/polarion_rest_api_client/open_api_client/api/test_records/__init__.py new file mode 100644 index 00000000..dd5d085d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_records/__init__.py @@ -0,0 +1,2 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 diff --git a/polarion_rest_api_client/open_api_client/api/test_records/delete_test_record_test_parameter.py b/polarion_rest_api_client/open_api_client/api/test_records/delete_test_record_test_parameter.py new file mode 100644 index 00000000..e9966cd9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_records/delete_test_record_test_parameter.py @@ -0,0 +1,152 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_param_id: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/testruns/{testRunId}/testrecords/{testCaseProjectId}/{testCaseId}/{iteration}/testparameters/{testParamId}".format( + projectId=project_id, + testRunId=test_run_id, + testCaseProjectId=test_case_project_id, + testCaseId=test_case_id, + iteration=iteration, + testParamId=test_param_id, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Test Parameter for the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_param_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_param_id=test_param_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Test Parameter for the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_param_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_param_id=test_param_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_records/get_test_record.py b/polarion_rest_api_client/open_api_client/api/test_records/get_test_record.py new file mode 100644 index 00000000..78009161 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_records/get_test_record.py @@ -0,0 +1,292 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testrecords_single_get_response import ( + TestrecordsSingleGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/testrecords/{testCaseProjectId}/{testCaseId}/{iteration}".format( + projectId=project_id, + testRunId=test_run_id, + testCaseProjectId=test_case_project_id, + testCaseId=test_case_id, + iteration=iteration, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestrecordsSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestrecordsSingleGetResponse.from_dict(response.json()) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestrecordsSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestrecordsSingleGetResponse]]: + """Returns the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrecordsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + fields=fields, + include=include, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestrecordsSingleGetResponse]]: + """Returns the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrecordsSingleGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + client=client, + fields=fields, + include=include, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestrecordsSingleGetResponse]]: + """Returns the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrecordsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + fields=fields, + include=include, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestrecordsSingleGetResponse]]: + """Returns the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrecordsSingleGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + client=client, + fields=fields, + include=include, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_records/get_test_record_test_parameter.py b/polarion_rest_api_client/open_api_client/api/test_records/get_test_record_test_parameter.py new file mode 100644 index 00000000..615742e2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_records/get_test_record_test_parameter.py @@ -0,0 +1,308 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testparameters_single_get_response import ( + TestparametersSingleGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_param_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/testrecords/{testCaseProjectId}/{testCaseId}/{iteration}/testparameters/{testParamId}".format( + projectId=project_id, + testRunId=test_run_id, + testCaseProjectId=test_case_project_id, + testCaseId=test_case_id, + iteration=iteration, + testParamId=test_param_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestparametersSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestparametersSingleGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestparametersSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestparametersSingleGetResponse]]: + """Returns the specified Test Parameter for the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparametersSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_param_id=test_param_id, + fields=fields, + include=include, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestparametersSingleGetResponse]]: + """Returns the specified Test Parameter for the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparametersSingleGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_param_id=test_param_id, + client=client, + fields=fields, + include=include, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestparametersSingleGetResponse]]: + """Returns the specified Test Parameter for the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparametersSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_param_id=test_param_id, + fields=fields, + include=include, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestparametersSingleGetResponse]]: + """Returns the specified Test Parameter for the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparametersSingleGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_param_id=test_param_id, + client=client, + fields=fields, + include=include, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_records/get_test_record_test_parameters.py b/polarion_rest_api_client/open_api_client/api/test_records/get_test_record_test_parameters.py new file mode 100644 index 00000000..62f9d36a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_records/get_test_record_test_parameters.py @@ -0,0 +1,322 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testparameters_list_get_response import ( + TestparametersListGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/testrecords/{testCaseProjectId}/{testCaseId}/{iteration}/testparameters".format( + projectId=project_id, + testRunId=test_run_id, + testCaseProjectId=test_case_project_id, + testCaseId=test_case_id, + iteration=iteration, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestparametersListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestparametersListGetResponse.from_dict(response.json()) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestparametersListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestparametersListGetResponse]]: + """Returns a list of Test Parameters for the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparametersListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestparametersListGetResponse]]: + """Returns a list of Test Parameters for the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparametersListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestparametersListGetResponse]]: + """Returns a list of Test Parameters for the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparametersListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestparametersListGetResponse]]: + """Returns a list of Test Parameters for the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparametersListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_records/get_test_records.py b/polarion_rest_api_client/open_api_client/api/test_records/get_test_records.py new file mode 100644 index 00000000..f726f54f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_records/get_test_records.py @@ -0,0 +1,323 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testrecords_list_get_response import TestrecordsListGetResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, + test_case_project_id: Union[Unset, str] = UNSET, + test_case_id: Union[Unset, str] = UNSET, + test_result_id: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["revision"] = revision + + params["testCaseProjectId"] = test_case_project_id + + params["testCaseId"] = test_case_id + + params["testResultId"] = test_result_id + + 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": "/projects/{projectId}/testruns/{testRunId}/testrecords".format( + projectId=project_id, + testRunId=test_run_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestrecordsListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestrecordsListGetResponse.from_dict(response.json()) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestrecordsListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, + test_case_project_id: Union[Unset, str] = UNSET, + test_case_id: Union[Unset, str] = UNSET, + test_result_id: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestrecordsListGetResponse]]: + """Returns a list of Test Records. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + test_case_project_id (Union[Unset, str]): + test_case_id (Union[Unset, str]): + test_result_id (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrecordsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + test_result_id=test_result_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, + test_case_project_id: Union[Unset, str] = UNSET, + test_case_id: Union[Unset, str] = UNSET, + test_result_id: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestrecordsListGetResponse]]: + """Returns a list of Test Records. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + test_case_project_id (Union[Unset, str]): + test_case_id (Union[Unset, str]): + test_result_id (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrecordsListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + test_result_id=test_result_id, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, + test_case_project_id: Union[Unset, str] = UNSET, + test_case_id: Union[Unset, str] = UNSET, + test_result_id: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestrecordsListGetResponse]]: + """Returns a list of Test Records. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + test_case_project_id (Union[Unset, str]): + test_case_id (Union[Unset, str]): + test_result_id (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrecordsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + test_result_id=test_result_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, + test_case_project_id: Union[Unset, str] = UNSET, + test_case_id: Union[Unset, str] = UNSET, + test_result_id: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestrecordsListGetResponse]]: + """Returns a list of Test Records. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + test_case_project_id (Union[Unset, str]): + test_case_id (Union[Unset, str]): + test_result_id (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrecordsListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + test_result_id=test_result_id, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_records/patch_test_record.py b/polarion_rest_api_client/open_api_client/api/test_records/patch_test_record.py new file mode 100644 index 00000000..0010aa51 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_records/patch_test_record.py @@ -0,0 +1,171 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.testrecords_single_patch_request import ( + TestrecordsSinglePatchRequest, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + body: TestrecordsSinglePatchRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "patch", + "url": "/projects/{projectId}/testruns/{testRunId}/testrecords/{testCaseProjectId}/{testCaseId}/{iteration}".format( + projectId=project_id, + testRunId=test_run_id, + testCaseProjectId=test_case_project_id, + testCaseId=test_case_id, + iteration=iteration, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.CONFLICT: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestrecordsSinglePatchRequest, +) -> Response[Any]: + """Updates the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + body (TestrecordsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestrecordsSinglePatchRequest, +) -> Response[Any]: + """Updates the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + body (TestrecordsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_records/post_test_record_test_parameters.py b/polarion_rest_api_client/open_api_client/api/test_records/post_test_record_test_parameters.py new file mode 100644 index 00000000..7f9d87f4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_records/post_test_record_test_parameters.py @@ -0,0 +1,270 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.testparameters_list_post_request import ( + TestparametersListPostRequest, +) +from ...models.testparameters_list_post_response import ( + TestparametersListPostResponse, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + body: TestparametersListPostRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/testruns/{testRunId}/testrecords/{testCaseProjectId}/{testCaseId}/{iteration}/testparameters".format( + projectId=project_id, + testRunId=test_run_id, + testCaseProjectId=test_case_project_id, + testCaseId=test_case_id, + iteration=iteration, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestparametersListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = TestparametersListPostResponse.from_dict( + response.json() + ) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestparametersListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestparametersListPostRequest, +) -> Response[Union[Any, TestparametersListPostResponse]]: + """Creates a list of Test Parameters for the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + body (TestparametersListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparametersListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestparametersListPostRequest, +) -> Optional[Union[Any, TestparametersListPostResponse]]: + """Creates a list of Test Parameters for the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + body (TestparametersListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparametersListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestparametersListPostRequest, +) -> Response[Union[Any, TestparametersListPostResponse]]: + """Creates a list of Test Parameters for the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + body (TestparametersListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparametersListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestparametersListPostRequest, +) -> Optional[Union[Any, TestparametersListPostResponse]]: + """Creates a list of Test Parameters for the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + body (TestparametersListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparametersListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_records/post_test_records.py b/polarion_rest_api_client/open_api_client/api/test_records/post_test_records.py new file mode 100644 index 00000000..7da3b923 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_records/post_test_records.py @@ -0,0 +1,224 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.testrecords_list_post_request import TestrecordsListPostRequest +from ...models.testrecords_list_post_response import ( + TestrecordsListPostResponse, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + *, + body: TestrecordsListPostRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/testruns/{testRunId}/testrecords".format( + projectId=project_id, + testRunId=test_run_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestrecordsListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = TestrecordsListPostResponse.from_dict(response.json()) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestrecordsListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestrecordsListPostRequest, +) -> Response[Union[Any, TestrecordsListPostResponse]]: + """Creates a list of Test Records. + + Args: + project_id (str): + test_run_id (str): + body (TestrecordsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrecordsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestrecordsListPostRequest, +) -> Optional[Union[Any, TestrecordsListPostResponse]]: + """Creates a list of Test Records. + + Args: + project_id (str): + test_run_id (str): + body (TestrecordsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrecordsListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestrecordsListPostRequest, +) -> Response[Union[Any, TestrecordsListPostResponse]]: + """Creates a list of Test Records. + + Args: + project_id (str): + test_run_id (str): + body (TestrecordsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrecordsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestrecordsListPostRequest, +) -> Optional[Union[Any, TestrecordsListPostResponse]]: + """Creates a list of Test Records. + + Args: + project_id (str): + test_run_id (str): + body (TestrecordsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrecordsListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_run_attachments/__init__.py b/polarion_rest_api_client/open_api_client/api/test_run_attachments/__init__.py new file mode 100644 index 00000000..dd5d085d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_run_attachments/__init__.py @@ -0,0 +1,2 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 diff --git a/polarion_rest_api_client/open_api_client/api/test_run_attachments/delete_test_run_attachment.py b/polarion_rest_api_client/open_api_client/api/test_run_attachments/delete_test_run_attachment.py new file mode 100644 index 00000000..71c090a0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_run_attachments/delete_test_run_attachment.py @@ -0,0 +1,132 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + attachment_id: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/testruns/{testRunId}/attachments/{attachmentId}".format( + projectId=project_id, + testRunId=test_run_id, + attachmentId=attachment_id, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + test_run_id: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Test Run Attachment. + + Args: + project_id (str): + test_run_id (str): + attachment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + attachment_id=attachment_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Test Run Attachment. + + Args: + project_id (str): + test_run_id (str): + attachment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + attachment_id=attachment_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_run_attachments/get_test_run_attachment.py b/polarion_rest_api_client/open_api_client/api/test_run_attachments/get_test_run_attachment.py new file mode 100644 index 00000000..7c8b7c38 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_run_attachments/get_test_run_attachment.py @@ -0,0 +1,266 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testrun_attachments_single_get_response import ( + TestrunAttachmentsSingleGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + attachment_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/attachments/{attachmentId}".format( + projectId=project_id, + testRunId=test_run_id, + attachmentId=attachment_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestrunAttachmentsSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestrunAttachmentsSingleGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestrunAttachmentsSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestrunAttachmentsSingleGetResponse]]: + """Returns the specified Test Run Attachment. + + Args: + project_id (str): + test_run_id (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrunAttachmentsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + attachment_id=attachment_id, + fields=fields, + include=include, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestrunAttachmentsSingleGetResponse]]: + """Returns the specified Test Run Attachment. + + Args: + project_id (str): + test_run_id (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrunAttachmentsSingleGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + attachment_id=attachment_id, + client=client, + fields=fields, + include=include, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestrunAttachmentsSingleGetResponse]]: + """Returns the specified Test Run Attachment. + + Args: + project_id (str): + test_run_id (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrunAttachmentsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + attachment_id=attachment_id, + fields=fields, + include=include, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestrunAttachmentsSingleGetResponse]]: + """Returns the specified Test Run Attachment. + + Args: + project_id (str): + test_run_id (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrunAttachmentsSingleGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + attachment_id=attachment_id, + client=client, + fields=fields, + include=include, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_run_attachments/get_test_run_attachment_content.py b/polarion_rest_api_client/open_api_client/api/test_run_attachments/get_test_run_attachment_content.py new file mode 100644 index 00000000..82426259 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_run_attachments/get_test_run_attachment_content.py @@ -0,0 +1,149 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + attachment_id: str, + *, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/attachments/{attachmentId}/content".format( + projectId=project_id, + testRunId=test_run_id, + attachmentId=attachment_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.OK: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + test_run_id: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + revision: Union[Unset, str] = UNSET, +) -> Response[Any]: + """Downloads the file content for a specified Test Run Attachment. + + Args: + project_id (str): + test_run_id (str): + attachment_id (str): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + attachment_id=attachment_id, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + revision: Union[Unset, str] = UNSET, +) -> Response[Any]: + """Downloads the file content for a specified Test Run Attachment. + + Args: + project_id (str): + test_run_id (str): + attachment_id (str): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + attachment_id=attachment_id, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_run_attachments/get_test_run_attachments.py b/polarion_rest_api_client/open_api_client/api/test_run_attachments/get_test_run_attachments.py new file mode 100644 index 00000000..80621768 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_run_attachments/get_test_run_attachments.py @@ -0,0 +1,282 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testrun_attachments_list_get_response import ( + TestrunAttachmentsListGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/attachments".format( + projectId=project_id, + testRunId=test_run_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestrunAttachmentsListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestrunAttachmentsListGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestrunAttachmentsListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestrunAttachmentsListGetResponse]]: + """Returns a list of Test Run Attachments. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrunAttachmentsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestrunAttachmentsListGetResponse]]: + """Returns a list of Test Run Attachments. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrunAttachmentsListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestrunAttachmentsListGetResponse]]: + """Returns a list of Test Run Attachments. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrunAttachmentsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestrunAttachmentsListGetResponse]]: + """Returns a list of Test Run Attachments. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrunAttachmentsListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_run_attachments/patch_test_run_attachment.py b/polarion_rest_api_client/open_api_client/api/test_run_attachments/patch_test_run_attachment.py new file mode 100644 index 00000000..9cebd356 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_run_attachments/patch_test_run_attachment.py @@ -0,0 +1,160 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.patch_test_run_attachments_request_body import ( + PatchTestRunAttachmentsRequestBody, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + attachment_id: str, + *, + body: PatchTestRunAttachmentsRequestBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "patch", + "url": "/projects/{projectId}/testruns/{testRunId}/attachments/{attachmentId}".format( + projectId=project_id, + testRunId=test_run_id, + attachmentId=attachment_id, + ), + } + + _body = body.to_multipart() + + _kwargs["files"] = _body + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.CONFLICT: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + test_run_id: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PatchTestRunAttachmentsRequestBody, +) -> Response[Any]: + r"""Updates the specified Test Run Attachment. + + See more in the Rest API User Guide. + + Args: + project_id (str): + test_run_id (str): + attachment_id (str): + body (PatchTestRunAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + attachment_id=attachment_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PatchTestRunAttachmentsRequestBody, +) -> Response[Any]: + r"""Updates the specified Test Run Attachment. + + See more in the Rest API User Guide. + + Args: + project_id (str): + test_run_id (str): + attachment_id (str): + body (PatchTestRunAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + attachment_id=attachment_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_run_attachments/post_test_run_attachments.py b/polarion_rest_api_client/open_api_client/api/test_run_attachments/post_test_run_attachments.py new file mode 100644 index 00000000..ea549e7d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_run_attachments/post_test_run_attachments.py @@ -0,0 +1,243 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.post_test_run_attachments_request_body import ( + PostTestRunAttachmentsRequestBody, +) +from ...models.testrun_attachments_list_post_response import ( + TestrunAttachmentsListPostResponse, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + *, + body: PostTestRunAttachmentsRequestBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/testruns/{testRunId}/attachments".format( + projectId=project_id, + testRunId=test_run_id, + ), + } + + _body = body.to_multipart() + + _kwargs["files"] = _body + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestrunAttachmentsListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = TestrunAttachmentsListPostResponse.from_dict( + response.json() + ) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestrunAttachmentsListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PostTestRunAttachmentsRequestBody, +) -> Response[Union[Any, TestrunAttachmentsListPostResponse]]: + r"""Creates a list of Test Run Attachments. + + Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. + + Args: + project_id (str): + test_run_id (str): + body (PostTestRunAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrunAttachmentsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PostTestRunAttachmentsRequestBody, +) -> Optional[Union[Any, TestrunAttachmentsListPostResponse]]: + r"""Creates a list of Test Run Attachments. + + Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. + + Args: + project_id (str): + test_run_id (str): + body (PostTestRunAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrunAttachmentsListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PostTestRunAttachmentsRequestBody, +) -> Response[Union[Any, TestrunAttachmentsListPostResponse]]: + r"""Creates a list of Test Run Attachments. + + Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. + + Args: + project_id (str): + test_run_id (str): + body (PostTestRunAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrunAttachmentsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PostTestRunAttachmentsRequestBody, +) -> Optional[Union[Any, TestrunAttachmentsListPostResponse]]: + r"""Creates a list of Test Run Attachments. + + Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. + + Args: + project_id (str): + test_run_id (str): + body (PostTestRunAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrunAttachmentsListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_run_comments/__init__.py b/polarion_rest_api_client/open_api_client/api/test_run_comments/__init__.py new file mode 100644 index 00000000..dd5d085d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_run_comments/__init__.py @@ -0,0 +1,2 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 diff --git a/polarion_rest_api_client/open_api_client/api/test_run_comments/get_test_run_comment.py b/polarion_rest_api_client/open_api_client/api/test_run_comments/get_test_run_comment.py new file mode 100644 index 00000000..ba74705c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_run_comments/get_test_run_comment.py @@ -0,0 +1,266 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testrun_comments_single_get_response import ( + TestrunCommentsSingleGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + comment_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/comments/{commentId}".format( + projectId=project_id, + testRunId=test_run_id, + commentId=comment_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestrunCommentsSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestrunCommentsSingleGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestrunCommentsSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + comment_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestrunCommentsSingleGetResponse]]: + """Returns the specified Test Run Comment. + + Args: + project_id (str): + test_run_id (str): + comment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrunCommentsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + comment_id=comment_id, + fields=fields, + include=include, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + comment_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestrunCommentsSingleGetResponse]]: + """Returns the specified Test Run Comment. + + Args: + project_id (str): + test_run_id (str): + comment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrunCommentsSingleGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + comment_id=comment_id, + client=client, + fields=fields, + include=include, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + comment_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestrunCommentsSingleGetResponse]]: + """Returns the specified Test Run Comment. + + Args: + project_id (str): + test_run_id (str): + comment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrunCommentsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + comment_id=comment_id, + fields=fields, + include=include, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + comment_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestrunCommentsSingleGetResponse]]: + """Returns the specified Test Run Comment. + + Args: + project_id (str): + test_run_id (str): + comment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrunCommentsSingleGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + comment_id=comment_id, + client=client, + fields=fields, + include=include, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_run_comments/get_test_run_comments.py b/polarion_rest_api_client/open_api_client/api/test_run_comments/get_test_run_comments.py new file mode 100644 index 00000000..fcc707a8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_run_comments/get_test_run_comments.py @@ -0,0 +1,282 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testrun_comments_list_get_response import ( + TestrunCommentsListGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/comments".format( + projectId=project_id, + testRunId=test_run_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestrunCommentsListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestrunCommentsListGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestrunCommentsListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestrunCommentsListGetResponse]]: + """Returns a list of Test Run Comments. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrunCommentsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestrunCommentsListGetResponse]]: + """Returns a list of Test Run Comments. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrunCommentsListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestrunCommentsListGetResponse]]: + """Returns a list of Test Run Comments. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrunCommentsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestrunCommentsListGetResponse]]: + """Returns a list of Test Run Comments. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrunCommentsListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_run_comments/patch_test_run_comment.py b/polarion_rest_api_client/open_api_client/api/test_run_comments/patch_test_run_comment.py new file mode 100644 index 00000000..4cc3bc9f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_run_comments/patch_test_run_comment.py @@ -0,0 +1,155 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.testrun_comments_single_patch_request import ( + TestrunCommentsSinglePatchRequest, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + comment_id: str, + *, + body: TestrunCommentsSinglePatchRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "patch", + "url": "/projects/{projectId}/testruns/{testRunId}/comments/{commentId}".format( + projectId=project_id, + testRunId=test_run_id, + commentId=comment_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.CONFLICT: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + test_run_id: str, + comment_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestrunCommentsSinglePatchRequest, +) -> Response[Any]: + """Updates the specified Test Run Comment. + + Args: + project_id (str): + test_run_id (str): + comment_id (str): + body (TestrunCommentsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + comment_id=comment_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + comment_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestrunCommentsSinglePatchRequest, +) -> Response[Any]: + """Updates the specified Test Run Comment. + + Args: + project_id (str): + test_run_id (str): + comment_id (str): + body (TestrunCommentsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + comment_id=comment_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_run_comments/post_test_run_comments.py b/polarion_rest_api_client/open_api_client/api/test_run_comments/post_test_run_comments.py new file mode 100644 index 00000000..b5bab06b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_run_comments/post_test_run_comments.py @@ -0,0 +1,228 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.testrun_comments_list_post_request import ( + TestrunCommentsListPostRequest, +) +from ...models.testrun_comments_list_post_response import ( + TestrunCommentsListPostResponse, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + *, + body: TestrunCommentsListPostRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/testruns/{testRunId}/comments".format( + projectId=project_id, + testRunId=test_run_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestrunCommentsListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = TestrunCommentsListPostResponse.from_dict( + response.json() + ) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestrunCommentsListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestrunCommentsListPostRequest, +) -> Response[Union[Any, TestrunCommentsListPostResponse]]: + """Creates a list of Test Run Comments. + + Args: + project_id (str): + test_run_id (str): + body (TestrunCommentsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrunCommentsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestrunCommentsListPostRequest, +) -> Optional[Union[Any, TestrunCommentsListPostResponse]]: + """Creates a list of Test Run Comments. + + Args: + project_id (str): + test_run_id (str): + body (TestrunCommentsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrunCommentsListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestrunCommentsListPostRequest, +) -> Response[Union[Any, TestrunCommentsListPostResponse]]: + """Creates a list of Test Run Comments. + + Args: + project_id (str): + test_run_id (str): + body (TestrunCommentsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrunCommentsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestrunCommentsListPostRequest, +) -> Optional[Union[Any, TestrunCommentsListPostResponse]]: + """Creates a list of Test Run Comments. + + Args: + project_id (str): + test_run_id (str): + body (TestrunCommentsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrunCommentsListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_runs/__init__.py b/polarion_rest_api_client/open_api_client/api/test_runs/__init__.py new file mode 100644 index 00000000..dd5d085d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_runs/__init__.py @@ -0,0 +1,2 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 diff --git a/polarion_rest_api_client/open_api_client/api/test_runs/delete_test_run.py b/polarion_rest_api_client/open_api_client/api/test_runs/delete_test_run.py new file mode 100644 index 00000000..7d8433c5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_runs/delete_test_run.py @@ -0,0 +1,120 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/testruns/{testRunId}".format( + projectId=project_id, + testRunId=test_run_id, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_runs/delete_test_run_test_parameter.py b/polarion_rest_api_client/open_api_client/api/test_runs/delete_test_run_test_parameter.py new file mode 100644 index 00000000..c7db356c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_runs/delete_test_run_test_parameter.py @@ -0,0 +1,128 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_param_id: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/testruns/{testRunId}/testparameters/{testParamId}".format( + projectId=project_id, + testRunId=test_run_id, + testParamId=test_param_id, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + test_run_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Test Parameter for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + test_param_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_param_id=test_param_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Test Parameter for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + test_param_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_param_id=test_param_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_runs/delete_test_run_test_parameter_definition.py b/polarion_rest_api_client/open_api_client/api/test_runs/delete_test_run_test_parameter_definition.py new file mode 100644 index 00000000..167fedbf --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_runs/delete_test_run_test_parameter_definition.py @@ -0,0 +1,130 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_param_id: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/testruns/{testRunId}/testparameterdefinitions/{testParamId}".format( + projectId=project_id, + testRunId=test_run_id, + testParamId=test_param_id, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + test_run_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Test Parameter Definition for the specified Test + Run. + + Args: + project_id (str): + test_run_id (str): + test_param_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_param_id=test_param_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Test Parameter Definition for the specified Test + Run. + + Args: + project_id (str): + test_run_id (str): + test_param_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_param_id=test_param_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_runs/export_excel_tests.py b/polarion_rest_api_client/open_api_client/api/test_runs/export_excel_tests.py new file mode 100644 index 00000000..2e3eca37 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_runs/export_excel_tests.py @@ -0,0 +1,137 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.export_test_cases_request_body import ExportTestCasesRequestBody +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + *, + body: ExportTestCasesRequestBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/testruns/{testRunId}/actions/exportTestsToExcel".format( + projectId=project_id, + testRunId=test_run_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: ExportTestCasesRequestBody, +) -> Response[Any]: + """Exports tests to Excel. + + Args: + project_id (str): + test_run_id (str): + body (ExportTestCasesRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: ExportTestCasesRequestBody, +) -> Response[Any]: + """Exports tests to Excel. + + Args: + project_id (str): + test_run_id (str): + body (ExportTestCasesRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_runs/get_test_run.py b/polarion_rest_api_client/open_api_client/api/test_runs/get_test_run.py new file mode 100644 index 00000000..23f417ac --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_runs/get_test_run.py @@ -0,0 +1,248 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testruns_single_get_response import TestrunsSingleGetResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}".format( + projectId=project_id, + testRunId=test_run_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestrunsSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestrunsSingleGetResponse.from_dict(response.json()) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestrunsSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestrunsSingleGetResponse]]: + """Returns the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrunsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + fields=fields, + include=include, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestrunsSingleGetResponse]]: + """Returns the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrunsSingleGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + fields=fields, + include=include, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestrunsSingleGetResponse]]: + """Returns the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrunsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + fields=fields, + include=include, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestrunsSingleGetResponse]]: + """Returns the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrunsSingleGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + fields=fields, + include=include, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_runs/get_test_run_test_parameter.py b/polarion_rest_api_client/open_api_client/api/test_runs/get_test_run_test_parameter.py new file mode 100644 index 00000000..8fca10ab --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_runs/get_test_run_test_parameter.py @@ -0,0 +1,266 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testparameters_single_get_response import ( + TestparametersSingleGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_param_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/testparameters/{testParamId}".format( + projectId=project_id, + testRunId=test_run_id, + testParamId=test_param_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestparametersSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestparametersSingleGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestparametersSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestparametersSingleGetResponse]]: + """Returns the specified Test Parameter for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparametersSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_param_id=test_param_id, + fields=fields, + include=include, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestparametersSingleGetResponse]]: + """Returns the specified Test Parameter for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparametersSingleGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_param_id=test_param_id, + client=client, + fields=fields, + include=include, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestparametersSingleGetResponse]]: + """Returns the specified Test Parameter for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparametersSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_param_id=test_param_id, + fields=fields, + include=include, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestparametersSingleGetResponse]]: + """Returns the specified Test Parameter for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparametersSingleGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_param_id=test_param_id, + client=client, + fields=fields, + include=include, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_runs/get_test_run_test_parameter_definition.py b/polarion_rest_api_client/open_api_client/api/test_runs/get_test_run_test_parameter_definition.py new file mode 100644 index 00000000..37ab84b6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_runs/get_test_run_test_parameter_definition.py @@ -0,0 +1,270 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testparameter_definitions_single_get_response import ( + TestparameterDefinitionsSingleGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_param_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/testparameterdefinitions/{testParamId}".format( + projectId=project_id, + testRunId=test_run_id, + testParamId=test_param_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestparameterDefinitionsSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestparameterDefinitionsSingleGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestparameterDefinitionsSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestparameterDefinitionsSingleGetResponse]]: + """Returns the specified Test Parameter Definition for the specified Test + Run. + + Args: + project_id (str): + test_run_id (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparameterDefinitionsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_param_id=test_param_id, + fields=fields, + include=include, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestparameterDefinitionsSingleGetResponse]]: + """Returns the specified Test Parameter Definition for the specified Test + Run. + + Args: + project_id (str): + test_run_id (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparameterDefinitionsSingleGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_param_id=test_param_id, + client=client, + fields=fields, + include=include, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestparameterDefinitionsSingleGetResponse]]: + """Returns the specified Test Parameter Definition for the specified Test + Run. + + Args: + project_id (str): + test_run_id (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparameterDefinitionsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_param_id=test_param_id, + fields=fields, + include=include, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestparameterDefinitionsSingleGetResponse]]: + """Returns the specified Test Parameter Definition for the specified Test + Run. + + Args: + project_id (str): + test_run_id (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparameterDefinitionsSingleGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_param_id=test_param_id, + client=client, + fields=fields, + include=include, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_runs/get_test_run_test_parameter_definitions.py b/polarion_rest_api_client/open_api_client/api/test_runs/get_test_run_test_parameter_definitions.py new file mode 100644 index 00000000..c64b12f1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_runs/get_test_run_test_parameter_definitions.py @@ -0,0 +1,282 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testparameter_definitions_list_get_response import ( + TestparameterDefinitionsListGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/testparameterdefinitions".format( + projectId=project_id, + testRunId=test_run_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestparameterDefinitionsListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestparameterDefinitionsListGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestparameterDefinitionsListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestparameterDefinitionsListGetResponse]]: + """Returns a list of Test Parameter Definitions for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparameterDefinitionsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestparameterDefinitionsListGetResponse]]: + """Returns a list of Test Parameter Definitions for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparameterDefinitionsListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestparameterDefinitionsListGetResponse]]: + """Returns a list of Test Parameter Definitions for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparameterDefinitionsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestparameterDefinitionsListGetResponse]]: + """Returns a list of Test Parameter Definitions for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparameterDefinitionsListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_runs/get_test_run_test_parameters.py b/polarion_rest_api_client/open_api_client/api/test_runs/get_test_run_test_parameters.py new file mode 100644 index 00000000..543c9a40 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_runs/get_test_run_test_parameters.py @@ -0,0 +1,280 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testparameters_list_get_response import ( + TestparametersListGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/testparameters".format( + projectId=project_id, + testRunId=test_run_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestparametersListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestparametersListGetResponse.from_dict(response.json()) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestparametersListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestparametersListGetResponse]]: + """Returns a list of Test Parameters for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparametersListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestparametersListGetResponse]]: + """Returns a list of Test Parameters for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparametersListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestparametersListGetResponse]]: + """Returns a list of Test Parameters for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparametersListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestparametersListGetResponse]]: + """Returns a list of Test Parameters for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparametersListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_runs/get_test_runs.py b/polarion_rest_api_client/open_api_client/api/test_runs/get_test_runs.py new file mode 100644 index 00000000..99ed4176 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_runs/get_test_runs.py @@ -0,0 +1,294 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testruns_list_get_response import TestrunsListGetResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, + templates: Union[Unset, bool] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["query"] = query + + params["sort"] = sort + + params["templates"] = templates + + 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": "/projects/{projectId}/testruns".format( + projectId=project_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestrunsListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestrunsListGetResponse.from_dict(response.json()) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestrunsListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, + templates: Union[Unset, bool] = UNSET, +) -> Response[Union[Any, TestrunsListGetResponse]]: + """Returns a list of Test Runs. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + templates (Union[Unset, bool]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrunsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + query=query, + sort=sort, + templates=templates, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, + templates: Union[Unset, bool] = UNSET, +) -> Optional[Union[Any, TestrunsListGetResponse]]: + """Returns a list of Test Runs. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + templates (Union[Unset, bool]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrunsListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + query=query, + sort=sort, + templates=templates, + ).parsed + + +async def asyncio_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, + templates: Union[Unset, bool] = UNSET, +) -> Response[Union[Any, TestrunsListGetResponse]]: + """Returns a list of Test Runs. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + templates (Union[Unset, bool]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrunsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + query=query, + sort=sort, + templates=templates, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, + templates: Union[Unset, bool] = UNSET, +) -> Optional[Union[Any, TestrunsListGetResponse]]: + """Returns a list of Test Runs. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + templates (Union[Unset, bool]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrunsListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + query=query, + sort=sort, + templates=templates, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_runs/import_excel_test_results.py b/polarion_rest_api_client/open_api_client/api/test_runs/import_excel_test_results.py new file mode 100644 index 00000000..bba308d4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_runs/import_excel_test_results.py @@ -0,0 +1,138 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.post_import_action_request_body import ( + PostImportActionRequestBody, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + *, + body: PostImportActionRequestBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/testruns/{testRunId}/actions/importExcelTestResults".format( + projectId=project_id, + testRunId=test_run_id, + ), + } + + _body = body.to_multipart() + + _kwargs["files"] = _body + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PostImportActionRequestBody, +) -> Response[Any]: + """Imports Excel test results. + + Args: + project_id (str): + test_run_id (str): + body (PostImportActionRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: PostImportActionRequestBody, +) -> Response[Any]: + """Imports Excel test results. + + Args: + project_id (str): + test_run_id (str): + body (PostImportActionRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_runs/import_x_unit_test_results.py b/polarion_rest_api_client/open_api_client/api/test_runs/import_x_unit_test_results.py new file mode 100644 index 00000000..baad3602 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_runs/import_x_unit_test_results.py @@ -0,0 +1,138 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import File, Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + *, + body: File, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/testruns/{testRunId}/actions/importXUnitTestResults".format( + projectId=project_id, + testRunId=test_run_id, + ), + } + + _body = body.payload + + _kwargs["content"] = _body + headers["Content-Type"] = "application/octet-stream" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: File, +) -> Response[Any]: + """Imports XUnit test results. + + Args: + project_id (str): + test_run_id (str): + body (File): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: File, +) -> Response[Any]: + """Imports XUnit test results. + + Args: + project_id (str): + test_run_id (str): + body (File): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_runs/patch_test_run.py b/polarion_rest_api_client/open_api_client/api/test_runs/patch_test_run.py new file mode 100644 index 00000000..ea92f136 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_runs/patch_test_run.py @@ -0,0 +1,145 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.testruns_single_patch_request import TestrunsSinglePatchRequest +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + *, + body: TestrunsSinglePatchRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "patch", + "url": "/projects/{projectId}/testruns/{testRunId}".format( + projectId=project_id, + testRunId=test_run_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.CONFLICT: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestrunsSinglePatchRequest, +) -> Response[Any]: + """Updates the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + body (TestrunsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestrunsSinglePatchRequest, +) -> Response[Any]: + """Updates the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + body (TestrunsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_runs/post_test_run_parameter_definitions.py b/polarion_rest_api_client/open_api_client/api/test_runs/post_test_run_parameter_definitions.py new file mode 100644 index 00000000..bfcbb839 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_runs/post_test_run_parameter_definitions.py @@ -0,0 +1,228 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.testparameter_definitions_list_post_request import ( + TestparameterDefinitionsListPostRequest, +) +from ...models.testparameter_definitions_list_post_response import ( + TestparameterDefinitionsListPostResponse, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + *, + body: TestparameterDefinitionsListPostRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/testruns/{testRunId}/testparameterdefinitions".format( + projectId=project_id, + testRunId=test_run_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestparameterDefinitionsListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = TestparameterDefinitionsListPostResponse.from_dict( + response.json() + ) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestparameterDefinitionsListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestparameterDefinitionsListPostRequest, +) -> Response[Union[Any, TestparameterDefinitionsListPostResponse]]: + """Creates a list of Test Parameter Definitions for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + body (TestparameterDefinitionsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparameterDefinitionsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestparameterDefinitionsListPostRequest, +) -> Optional[Union[Any, TestparameterDefinitionsListPostResponse]]: + """Creates a list of Test Parameter Definitions for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + body (TestparameterDefinitionsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparameterDefinitionsListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestparameterDefinitionsListPostRequest, +) -> Response[Union[Any, TestparameterDefinitionsListPostResponse]]: + """Creates a list of Test Parameter Definitions for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + body (TestparameterDefinitionsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparameterDefinitionsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestparameterDefinitionsListPostRequest, +) -> Optional[Union[Any, TestparameterDefinitionsListPostResponse]]: + """Creates a list of Test Parameter Definitions for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + body (TestparameterDefinitionsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparameterDefinitionsListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_runs/post_test_run_test_parameters.py b/polarion_rest_api_client/open_api_client/api/test_runs/post_test_run_test_parameters.py new file mode 100644 index 00000000..002e17f2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_runs/post_test_run_test_parameters.py @@ -0,0 +1,228 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.testparameters_list_post_request import ( + TestparametersListPostRequest, +) +from ...models.testparameters_list_post_response import ( + TestparametersListPostResponse, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + *, + body: TestparametersListPostRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/testruns/{testRunId}/testparameters".format( + projectId=project_id, + testRunId=test_run_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestparametersListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = TestparametersListPostResponse.from_dict( + response.json() + ) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestparametersListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestparametersListPostRequest, +) -> Response[Union[Any, TestparametersListPostResponse]]: + """Creates a list of Test Parameters for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + body (TestparametersListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparametersListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestparametersListPostRequest, +) -> Optional[Union[Any, TestparametersListPostResponse]]: + """Creates a list of Test Parameters for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + body (TestparametersListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparametersListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestparametersListPostRequest, +) -> Response[Union[Any, TestparametersListPostResponse]]: + """Creates a list of Test Parameters for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + body (TestparametersListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparametersListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestparametersListPostRequest, +) -> Optional[Union[Any, TestparametersListPostResponse]]: + """Creates a list of Test Parameters for the specified Test Run. + + Args: + project_id (str): + test_run_id (str): + body (TestparametersListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparametersListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_runs/post_test_runs.py b/polarion_rest_api_client/open_api_client/api/test_runs/post_test_runs.py new file mode 100644 index 00000000..f8fd702d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_runs/post_test_runs.py @@ -0,0 +1,208 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.testruns_list_post_request import TestrunsListPostRequest +from ...models.testruns_list_post_response import TestrunsListPostResponse +from ...types import Response + + +def _get_kwargs( + project_id: str, + *, + body: TestrunsListPostRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/testruns".format( + projectId=project_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestrunsListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = TestrunsListPostResponse.from_dict(response.json()) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestrunsListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestrunsListPostRequest, +) -> Response[Union[Any, TestrunsListPostResponse]]: + """Creates a list of Test Runs. + + Args: + project_id (str): + body (TestrunsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrunsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestrunsListPostRequest, +) -> Optional[Union[Any, TestrunsListPostResponse]]: + """Creates a list of Test Runs. + + Args: + project_id (str): + body (TestrunsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrunsListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestrunsListPostRequest, +) -> Response[Union[Any, TestrunsListPostResponse]]: + """Creates a list of Test Runs. + + Args: + project_id (str): + body (TestrunsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestrunsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TestrunsListPostRequest, +) -> Optional[Union[Any, TestrunsListPostResponse]]: + """Creates a list of Test Runs. + + Args: + project_id (str): + body (TestrunsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestrunsListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_step_result_attachments/__init__.py b/polarion_rest_api_client/open_api_client/api/test_step_result_attachments/__init__.py new file mode 100644 index 00000000..dd5d085d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_step_result_attachments/__init__.py @@ -0,0 +1,2 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 diff --git a/polarion_rest_api_client/open_api_client/api/test_step_result_attachments/get_test_step_result_attachment.py b/polarion_rest_api_client/open_api_client/api/test_step_result_attachments/get_test_step_result_attachment.py new file mode 100644 index 00000000..fd6b6f2b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_step_result_attachments/get_test_step_result_attachment.py @@ -0,0 +1,326 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.teststepresult_attachments_single_get_response import ( + TeststepresultAttachmentsSingleGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + attachment_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/testrecords/{testCaseProjectId}/{testCaseId}/{iteration}/teststepresults/{testStepIndex}/attachments/{attachmentId}".format( + projectId=project_id, + testRunId=test_run_id, + testCaseProjectId=test_case_project_id, + testCaseId=test_case_id, + iteration=iteration, + testStepIndex=test_step_index, + attachmentId=attachment_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TeststepresultAttachmentsSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TeststepresultAttachmentsSingleGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TeststepresultAttachmentsSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TeststepresultAttachmentsSingleGetResponse]]: + """Returns the specified Test Step Result Attachment for the specified Test + Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_step_index (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TeststepresultAttachmentsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_step_index=test_step_index, + attachment_id=attachment_id, + fields=fields, + include=include, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TeststepresultAttachmentsSingleGetResponse]]: + """Returns the specified Test Step Result Attachment for the specified Test + Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_step_index (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TeststepresultAttachmentsSingleGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_step_index=test_step_index, + attachment_id=attachment_id, + client=client, + fields=fields, + include=include, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TeststepresultAttachmentsSingleGetResponse]]: + """Returns the specified Test Step Result Attachment for the specified Test + Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_step_index (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TeststepresultAttachmentsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_step_index=test_step_index, + attachment_id=attachment_id, + fields=fields, + include=include, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TeststepresultAttachmentsSingleGetResponse]]: + """Returns the specified Test Step Result Attachment for the specified Test + Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_step_index (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TeststepresultAttachmentsSingleGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_step_index=test_step_index, + attachment_id=attachment_id, + client=client, + fields=fields, + include=include, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_step_result_attachments/get_test_step_result_attachment_content.py b/polarion_rest_api_client/open_api_client/api/test_step_result_attachments/get_test_step_result_attachment_content.py new file mode 100644 index 00000000..9e8962e8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_step_result_attachments/get_test_step_result_attachment_content.py @@ -0,0 +1,183 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + attachment_id: str, + *, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/testrecords/{testCaseProjectId}/{testCaseId}/{iteration}/teststepresults/{testStepIndex}/attachments/{attachmentId}/content".format( + projectId=project_id, + testRunId=test_run_id, + testCaseProjectId=test_case_project_id, + testCaseId=test_case_id, + iteration=iteration, + testStepIndex=test_step_index, + attachmentId=attachment_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.OK: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + revision: Union[Unset, str] = UNSET, +) -> Response[Any]: + """Downloads the file content for a specified Test Step Result Attachment + for the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_step_index (str): + attachment_id (str): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_step_index=test_step_index, + attachment_id=attachment_id, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + attachment_id: str, + *, + client: Union[AuthenticatedClient, Client], + revision: Union[Unset, str] = UNSET, +) -> Response[Any]: + """Downloads the file content for a specified Test Step Result Attachment + for the specified Test Record. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_step_index (str): + attachment_id (str): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_step_index=test_step_index, + attachment_id=attachment_id, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_step_result_attachments/get_test_step_result_attachments.py b/polarion_rest_api_client/open_api_client/api/test_step_result_attachments/get_test_step_result_attachments.py new file mode 100644 index 00000000..c840a36e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_step_result_attachments/get_test_step_result_attachments.py @@ -0,0 +1,338 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.teststepresult_attachments_list_get_response import ( + TeststepresultAttachmentsListGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/testrecords/{testCaseProjectId}/{testCaseId}/{iteration}/teststepresults/{testStepIndex}/attachments".format( + projectId=project_id, + testRunId=test_run_id, + testCaseProjectId=test_case_project_id, + testCaseId=test_case_id, + iteration=iteration, + testStepIndex=test_step_index, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TeststepresultAttachmentsListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TeststepresultAttachmentsListGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TeststepresultAttachmentsListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TeststepresultAttachmentsListGetResponse]]: + """Returns a list of Attachments for the specified Test Step Result. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_step_index (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TeststepresultAttachmentsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_step_index=test_step_index, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TeststepresultAttachmentsListGetResponse]]: + """Returns a list of Attachments for the specified Test Step Result. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_step_index (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TeststepresultAttachmentsListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_step_index=test_step_index, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TeststepresultAttachmentsListGetResponse]]: + """Returns a list of Attachments for the specified Test Step Result. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_step_index (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TeststepresultAttachmentsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_step_index=test_step_index, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TeststepresultAttachmentsListGetResponse]]: + """Returns a list of Attachments for the specified Test Step Result. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_step_index (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TeststepresultAttachmentsListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_step_index=test_step_index, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_step_result_attachments/post_test_step_result_attachments.py b/polarion_rest_api_client/open_api_client/api/test_step_result_attachments/post_test_step_result_attachments.py new file mode 100644 index 00000000..e1cfb89c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_step_result_attachments/post_test_step_result_attachments.py @@ -0,0 +1,299 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.post_test_step_result_attachments_request_body import ( + PostTestStepResultAttachmentsRequestBody, +) +from ...models.teststepresult_attachments_list_post_response import ( + TeststepresultAttachmentsListPostResponse, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + *, + body: PostTestStepResultAttachmentsRequestBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/testruns/{testRunId}/testrecords/{testCaseProjectId}/{testCaseId}/{iteration}/teststepresults/{testStepIndex}/attachments".format( + projectId=project_id, + testRunId=test_run_id, + testCaseProjectId=test_case_project_id, + testCaseId=test_case_id, + iteration=iteration, + testStepIndex=test_step_index, + ), + } + + _body = body.to_multipart() + + _kwargs["files"] = _body + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TeststepresultAttachmentsListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = TeststepresultAttachmentsListPostResponse.from_dict( + response.json() + ) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TeststepresultAttachmentsListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], + body: PostTestStepResultAttachmentsRequestBody, +) -> Response[Union[Any, TeststepresultAttachmentsListPostResponse]]: + r"""Creates a list of Test Step Result Attachments. + + Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_step_index (str): + body (PostTestStepResultAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TeststepresultAttachmentsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_step_index=test_step_index, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], + body: PostTestStepResultAttachmentsRequestBody, +) -> Optional[Union[Any, TeststepresultAttachmentsListPostResponse]]: + r"""Creates a list of Test Step Result Attachments. + + Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_step_index (str): + body (PostTestStepResultAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TeststepresultAttachmentsListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_step_index=test_step_index, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], + body: PostTestStepResultAttachmentsRequestBody, +) -> Response[Union[Any, TeststepresultAttachmentsListPostResponse]]: + r"""Creates a list of Test Step Result Attachments. + + Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_step_index (str): + body (PostTestStepResultAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TeststepresultAttachmentsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_step_index=test_step_index, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], + body: PostTestStepResultAttachmentsRequestBody, +) -> Optional[Union[Any, TeststepresultAttachmentsListPostResponse]]: + r"""Creates a list of Test Step Result Attachments. + + Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_step_index (str): + body (PostTestStepResultAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TeststepresultAttachmentsListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_step_index=test_step_index, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_step_results/__init__.py b/polarion_rest_api_client/open_api_client/api/test_step_results/__init__.py new file mode 100644 index 00000000..dd5d085d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_step_results/__init__.py @@ -0,0 +1,2 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 diff --git a/polarion_rest_api_client/open_api_client/api/test_step_results/get_test_step_result.py b/polarion_rest_api_client/open_api_client/api/test_step_results/get_test_step_result.py new file mode 100644 index 00000000..2b9637be --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_step_results/get_test_step_result.py @@ -0,0 +1,308 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.teststep_results_single_get_response import ( + TeststepResultsSingleGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/testrecords/{testCaseProjectId}/{testCaseId}/{iteration}/teststepresults/{testStepIndex}".format( + projectId=project_id, + testRunId=test_run_id, + testCaseProjectId=test_case_project_id, + testCaseId=test_case_id, + iteration=iteration, + testStepIndex=test_step_index, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TeststepResultsSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TeststepResultsSingleGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TeststepResultsSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TeststepResultsSingleGetResponse]]: + """Returns the specified Test Step Result. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_step_index (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TeststepResultsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_step_index=test_step_index, + fields=fields, + include=include, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TeststepResultsSingleGetResponse]]: + """Returns the specified Test Step Result. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_step_index (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TeststepResultsSingleGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_step_index=test_step_index, + client=client, + fields=fields, + include=include, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TeststepResultsSingleGetResponse]]: + """Returns the specified Test Step Result. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_step_index (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TeststepResultsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_step_index=test_step_index, + fields=fields, + include=include, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TeststepResultsSingleGetResponse]]: + """Returns the specified Test Step Result. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + test_step_index (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TeststepResultsSingleGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + test_step_index=test_step_index, + client=client, + fields=fields, + include=include, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_step_results/get_test_step_results.py b/polarion_rest_api_client/open_api_client/api/test_step_results/get_test_step_results.py new file mode 100644 index 00000000..f97f9a10 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_step_results/get_test_step_results.py @@ -0,0 +1,324 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.teststep_results_list_get_response import ( + TeststepResultsListGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["revision"] = revision + + 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": "/projects/{projectId}/testruns/{testRunId}/testrecords/{testCaseProjectId}/{testCaseId}/{iteration}/teststepresults".format( + projectId=project_id, + testRunId=test_run_id, + testCaseProjectId=test_case_project_id, + testCaseId=test_case_id, + iteration=iteration, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TeststepResultsListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TeststepResultsListGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TeststepResultsListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TeststepResultsListGetResponse]]: + """Returns a list of Test Step Results. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TeststepResultsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TeststepResultsListGetResponse]]: + """Returns a list of Test Step Results. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TeststepResultsListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TeststepResultsListGetResponse]]: + """Returns a list of Test Step Results. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TeststepResultsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TeststepResultsListGetResponse]]: + """Returns a list of Test Step Results. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TeststepResultsListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_step_results/post_test_step_results.py b/polarion_rest_api_client/open_api_client/api/test_step_results/post_test_step_results.py new file mode 100644 index 00000000..d01ee15d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_step_results/post_test_step_results.py @@ -0,0 +1,270 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.teststep_results_list_post_request import ( + TeststepResultsListPostRequest, +) +from ...models.teststep_results_list_post_response import ( + TeststepResultsListPostResponse, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + body: TeststepResultsListPostRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/testruns/{testRunId}/testrecords/{testCaseProjectId}/{testCaseId}/{iteration}/teststepresults".format( + projectId=project_id, + testRunId=test_run_id, + testCaseProjectId=test_case_project_id, + testCaseId=test_case_id, + iteration=iteration, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TeststepResultsListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = TeststepResultsListPostResponse.from_dict( + response.json() + ) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TeststepResultsListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + body: TeststepResultsListPostRequest, +) -> Response[Union[Any, TeststepResultsListPostResponse]]: + """Creates a list of Test Step Results. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + body (TeststepResultsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TeststepResultsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + body: TeststepResultsListPostRequest, +) -> Optional[Union[Any, TeststepResultsListPostResponse]]: + """Creates a list of Test Step Results. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + body (TeststepResultsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TeststepResultsListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + body: TeststepResultsListPostRequest, +) -> Response[Union[Any, TeststepResultsListPostResponse]]: + """Creates a list of Test Step Results. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + body (TeststepResultsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TeststepResultsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + test_run_id: str, + test_case_project_id: str, + test_case_id: str, + iteration: str, + *, + client: Union[AuthenticatedClient, Client], + body: TeststepResultsListPostRequest, +) -> Optional[Union[Any, TeststepResultsListPostResponse]]: + """Creates a list of Test Step Results. + + Args: + project_id (str): + test_run_id (str): + test_case_project_id (str): + test_case_id (str): + iteration (str): + body (TeststepResultsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TeststepResultsListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + test_run_id=test_run_id, + test_case_project_id=test_case_project_id, + test_case_id=test_case_id, + iteration=iteration, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_steps/__init__.py b/polarion_rest_api_client/open_api_client/api/test_steps/__init__.py new file mode 100644 index 00000000..dd5d085d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_steps/__init__.py @@ -0,0 +1,2 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 diff --git a/polarion_rest_api_client/open_api_client/api/test_steps/delete_test_step.py b/polarion_rest_api_client/open_api_client/api/test_steps/delete_test_step.py new file mode 100644 index 00000000..28c09558 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_steps/delete_test_step.py @@ -0,0 +1,136 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + test_step_index: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/workitems/{workItemId}/teststeps/{testStepIndex}".format( + projectId=project_id, + workItemId=work_item_id, + testStepIndex=test_step_index, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.METHOD_NOT_ALLOWED: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + work_item_id: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Test Step. + + Args: + project_id (str): + work_item_id (str): + test_step_index (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + test_step_index=test_step_index, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Test Step. + + Args: + project_id (str): + work_item_id (str): + test_step_index (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + test_step_index=test_step_index, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_steps/delete_test_steps.py b/polarion_rest_api_client/open_api_client/api/test_steps/delete_test_steps.py new file mode 100644 index 00000000..0d5cdf0d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_steps/delete_test_steps.py @@ -0,0 +1,143 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.teststeps_list_delete_request import TeststepsListDeleteRequest +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + body: TeststepsListDeleteRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/workitems/{workItemId}/teststeps".format( + projectId=project_id, + workItemId=work_item_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TeststepsListDeleteRequest, +) -> Response[Any]: + """Deletes a list of Test Steps. + + Args: + project_id (str): + work_item_id (str): + body (TeststepsListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TeststepsListDeleteRequest, +) -> Response[Any]: + """Deletes a list of Test Steps. + + Args: + project_id (str): + work_item_id (str): + body (TeststepsListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_steps/get_test_step.py b/polarion_rest_api_client/open_api_client/api/test_steps/get_test_step.py new file mode 100644 index 00000000..a3babe4d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_steps/get_test_step.py @@ -0,0 +1,262 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.teststeps_single_get_response import TeststepsSingleGetResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + work_item_id: str, + test_step_index: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["revision"] = revision + + 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": "/projects/{projectId}/workitems/{workItemId}/teststeps/{testStepIndex}".format( + projectId=project_id, + workItemId=work_item_id, + testStepIndex=test_step_index, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TeststepsSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TeststepsSingleGetResponse.from_dict(response.json()) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TeststepsSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TeststepsSingleGetResponse]]: + """Returns the specified Test Step. + + Args: + project_id (str): + work_item_id (str): + test_step_index (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TeststepsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + test_step_index=test_step_index, + fields=fields, + include=include, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TeststepsSingleGetResponse]]: + """Returns the specified Test Step. + + Args: + project_id (str): + work_item_id (str): + test_step_index (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TeststepsSingleGetResponse] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + test_step_index=test_step_index, + client=client, + fields=fields, + include=include, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TeststepsSingleGetResponse]]: + """Returns the specified Test Step. + + Args: + project_id (str): + work_item_id (str): + test_step_index (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TeststepsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + test_step_index=test_step_index, + fields=fields, + include=include, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TeststepsSingleGetResponse]]: + """Returns the specified Test Step. + + Args: + project_id (str): + work_item_id (str): + test_step_index (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TeststepsSingleGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + test_step_index=test_step_index, + client=client, + fields=fields, + include=include, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_steps/get_test_steps.py b/polarion_rest_api_client/open_api_client/api/test_steps/get_test_steps.py new file mode 100644 index 00000000..8ca594ff --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_steps/get_test_steps.py @@ -0,0 +1,278 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.teststeps_list_get_response import TeststepsListGetResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["revision"] = revision + + 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": "/projects/{projectId}/workitems/{workItemId}/teststeps".format( + projectId=project_id, + workItemId=work_item_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TeststepsListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TeststepsListGetResponse.from_dict(response.json()) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TeststepsListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TeststepsListGetResponse]]: + """Returns a list of Test Steps. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TeststepsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TeststepsListGetResponse]]: + """Returns a list of Test Steps. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TeststepsListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TeststepsListGetResponse]]: + """Returns a list of Test Steps. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TeststepsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TeststepsListGetResponse]]: + """Returns a list of Test Steps. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TeststepsListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/test_steps/patch_test_step.py b/polarion_rest_api_client/open_api_client/api/test_steps/patch_test_step.py new file mode 100644 index 00000000..53a7cfd5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_steps/patch_test_step.py @@ -0,0 +1,155 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.teststeps_single_patch_request import ( + TeststepsSinglePatchRequest, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + test_step_index: str, + *, + body: TeststepsSinglePatchRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "patch", + "url": "/projects/{projectId}/workitems/{workItemId}/teststeps/{testStepIndex}".format( + projectId=project_id, + workItemId=work_item_id, + testStepIndex=test_step_index, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.CONFLICT: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + work_item_id: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], + body: TeststepsSinglePatchRequest, +) -> Response[Any]: + """Updates the specified Test Step. + + Args: + project_id (str): + work_item_id (str): + test_step_index (str): + body (TeststepsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + test_step_index=test_step_index, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + test_step_index: str, + *, + client: Union[AuthenticatedClient, Client], + body: TeststepsSinglePatchRequest, +) -> Response[Any]: + """Updates the specified Test Step. + + Args: + project_id (str): + work_item_id (str): + test_step_index (str): + body (TeststepsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + test_step_index=test_step_index, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_steps/patch_test_steps.py b/polarion_rest_api_client/open_api_client/api/test_steps/patch_test_steps.py new file mode 100644 index 00000000..f34f634a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_steps/patch_test_steps.py @@ -0,0 +1,145 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.teststeps_list_patch_request import TeststepsListPatchRequest +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + body: TeststepsListPatchRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "patch", + "url": "/projects/{projectId}/workitems/{workItemId}/teststeps".format( + projectId=project_id, + workItemId=work_item_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.CONFLICT: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TeststepsListPatchRequest, +) -> Response[Any]: + """Updates a list of Test Steps. + + Args: + project_id (str): + work_item_id (str): + body (TeststepsListPatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TeststepsListPatchRequest, +) -> Response[Any]: + """Updates a list of Test Steps. + + Args: + project_id (str): + work_item_id (str): + body (TeststepsListPatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/test_steps/post_test_steps.py b/polarion_rest_api_client/open_api_client/api/test_steps/post_test_steps.py new file mode 100644 index 00000000..b214ed64 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/test_steps/post_test_steps.py @@ -0,0 +1,222 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.teststeps_list_post_request import TeststepsListPostRequest +from ...models.teststeps_list_post_response import TeststepsListPostResponse +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + body: TeststepsListPostRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/workitems/{workItemId}/teststeps".format( + projectId=project_id, + workItemId=work_item_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TeststepsListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = TeststepsListPostResponse.from_dict(response.json()) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TeststepsListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TeststepsListPostRequest, +) -> Response[Union[Any, TeststepsListPostResponse]]: + """Creates a list of Test Steps. + + Args: + project_id (str): + work_item_id (str): + body (TeststepsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TeststepsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TeststepsListPostRequest, +) -> Optional[Union[Any, TeststepsListPostResponse]]: + """Creates a list of Test Steps. + + Args: + project_id (str): + work_item_id (str): + body (TeststepsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TeststepsListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TeststepsListPostRequest, +) -> Response[Union[Any, TeststepsListPostResponse]]: + """Creates a list of Test Steps. + + Args: + project_id (str): + work_item_id (str): + body (TeststepsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TeststepsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: TeststepsListPostRequest, +) -> Optional[Union[Any, TeststepsListPostResponse]]: + """Creates a list of Test Steps. + + Args: + project_id (str): + work_item_id (str): + body (TeststepsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TeststepsListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/user_groups/get_user_group.py b/polarion_rest_api_client/open_api_client/api/user_groups/get_user_group.py index 5c0ff120..f5338ec1 100644 --- a/polarion_rest_api_client/open_api_client/api/user_groups/get_user_group.py +++ b/polarion_rest_api_client/open_api_client/api/user_groups/get_user_group.py @@ -18,18 +18,16 @@ def _get_kwargs( group_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -40,7 +38,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/usergroups/{groupId}".format( groupId=group_id, @@ -48,6 +46,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -98,29 +98,24 @@ def sync_detailed( group_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, UsergroupsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - group_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, UsergroupsSingleGetResponse]] + """Returns the specified User Group. + + Args: + group_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, UsergroupsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -141,29 +136,24 @@ def sync( group_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, UsergroupsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - group_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, UsergroupsSingleGetResponse] + """Returns the specified User Group. + + Args: + group_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, UsergroupsSingleGetResponse] """ return sync_detailed( @@ -179,29 +169,24 @@ async def asyncio_detailed( group_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, UsergroupsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - group_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, UsergroupsSingleGetResponse]] + """Returns the specified User Group. + + Args: + group_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, UsergroupsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -220,29 +205,24 @@ async def asyncio( group_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, UsergroupsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - group_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, UsergroupsSingleGetResponse] + """Returns the specified User Group. + + Args: + group_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, UsergroupsSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/users/get_avatar.py b/polarion_rest_api_client/open_api_client/api/users/get_avatar.py new file mode 100644 index 00000000..8d963d19 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/users/get_avatar.py @@ -0,0 +1,114 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + user_id: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "get", + "url": "/users/{userId}/actions/getAvatar".format( + userId=user_id, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.OK: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + user_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Returns the specified User Avatar. + + Args: + user_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + user_id=user_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + user_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Returns the specified User Avatar. + + Args: + user_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + user_id=user_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/users/get_user.py b/polarion_rest_api_client/open_api_client/api/users/get_user.py index 0fc5cae6..0924d8f3 100644 --- a/polarion_rest_api_client/open_api_client/api/users/get_user.py +++ b/polarion_rest_api_client/open_api_client/api/users/get_user.py @@ -16,18 +16,16 @@ def _get_kwargs( user_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -38,7 +36,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/users/{userId}".format( userId=user_id, @@ -46,6 +44,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -96,29 +96,24 @@ def sync_detailed( user_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, UsersSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - user_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, UsersSingleGetResponse]] + """Returns the specified User. + + Args: + user_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, UsersSingleGetResponse]] """ kwargs = _get_kwargs( @@ -139,29 +134,24 @@ def sync( user_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, UsersSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - user_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, UsersSingleGetResponse] + """Returns the specified User. + + Args: + user_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, UsersSingleGetResponse] """ return sync_detailed( @@ -177,29 +167,24 @@ async def asyncio_detailed( user_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, UsersSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - user_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, UsersSingleGetResponse]] + """Returns the specified User. + + Args: + user_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, UsersSingleGetResponse]] """ kwargs = _get_kwargs( @@ -218,29 +203,24 @@ async def asyncio( user_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, UsersSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - user_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, UsersSingleGetResponse] + """Returns the specified User. + + Args: + user_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, UsersSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/users/get_users.py b/polarion_rest_api_client/open_api_client/api/users/get_users.py index 0be390bc..7c6d4430 100644 --- a/polarion_rest_api_client/open_api_client/api/users/get_users.py +++ b/polarion_rest_api_client/open_api_client/api/users/get_users.py @@ -15,21 +15,19 @@ def _get_kwargs( *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -46,12 +44,14 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/users", "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -101,34 +101,29 @@ def _build_response( def sync_detailed( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Response[Union[Any, UsersListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - query : Union[Unset, None, str] - sort : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, UsersListGetResponse]] + """Returns a list of Users. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, UsersListGetResponse]] """ kwargs = _get_kwargs( @@ -150,34 +145,29 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, UsersListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - query : Union[Unset, None, str] - sort : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, UsersListGetResponse] + """Returns a list of Users. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, UsersListGetResponse] """ return sync_detailed( @@ -194,34 +184,29 @@ def sync( async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Response[Union[Any, UsersListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - query : Union[Unset, None, str] - sort : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, UsersListGetResponse]] + """Returns a list of Users. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, UsersListGetResponse]] """ kwargs = _get_kwargs( @@ -241,34 +226,29 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, UsersListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - query : Union[Unset, None, str] - sort : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, UsersListGetResponse] + """Returns a list of Users. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, UsersListGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/users/patch_user.py b/polarion_rest_api_client/open_api_client/api/users/patch_user.py index 48200efd..2c236836 100644 --- a/polarion_rest_api_client/open_api_client/api/users/patch_user.py +++ b/polarion_rest_api_client/open_api_client/api/users/patch_user.py @@ -15,20 +15,25 @@ def _get_kwargs( user_id: str, *, - json_body: UsersSinglePatchRequest, + body: UsersSinglePatchRequest, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "patch", "url": "/users/{userId}".format( userId=user_id, ), - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -74,30 +79,25 @@ def sync_detailed( user_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: UsersSinglePatchRequest, + body: UsersSinglePatchRequest, ) -> Response[Any]: - """Updates the specified instance. - - Parameters - ---------- - user_id : str - json_body : UsersSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Updates the specified User. + + Args: + user_id (str): + body (UsersSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( user_id=user_id, - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -111,30 +111,25 @@ async def asyncio_detailed( user_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: UsersSinglePatchRequest, + body: UsersSinglePatchRequest, ) -> Response[Any]: - """Updates the specified instance. - - Parameters - ---------- - user_id : str - json_body : UsersSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Updates the specified User. + + Args: + user_id (str): + body (UsersSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( user_id=user_id, - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) diff --git a/polarion_rest_api_client/open_api_client/api/users/post_users.py b/polarion_rest_api_client/open_api_client/api/users/post_users.py index 2ff2e854..11e5d5a4 100644 --- a/polarion_rest_api_client/open_api_client/api/users/post_users.py +++ b/polarion_rest_api_client/open_api_client/api/users/post_users.py @@ -15,18 +15,23 @@ def _get_kwargs( *, - json_body: UsersListPostRequest, + body: UsersListPostRequest, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/users", - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -85,28 +90,23 @@ def _build_response( def sync_detailed( *, client: Union[AuthenticatedClient, Client], - json_body: UsersListPostRequest, + body: UsersListPostRequest, ) -> Response[Union[Any, UsersListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - json_body : UsersListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, UsersListPostResponse]] + """Creates a list of Users. + + Args: + body (UsersListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, UsersListPostResponse]] """ kwargs = _get_kwargs( - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -119,57 +119,47 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], - json_body: UsersListPostRequest, + body: UsersListPostRequest, ) -> Optional[Union[Any, UsersListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - json_body : UsersListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, UsersListPostResponse] + """Creates a list of Users. + + Args: + body (UsersListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, UsersListPostResponse] """ return sync_detailed( client=client, - json_body=json_body, + body=body, ).parsed async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], - json_body: UsersListPostRequest, + body: UsersListPostRequest, ) -> Response[Union[Any, UsersListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - json_body : UsersListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, UsersListPostResponse]] + """Creates a list of Users. + + Args: + body (UsersListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, UsersListPostResponse]] """ kwargs = _get_kwargs( - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -180,29 +170,24 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], - json_body: UsersListPostRequest, + body: UsersListPostRequest, ) -> Optional[Union[Any, UsersListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - json_body : UsersListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, UsersListPostResponse] + """Creates a list of Users. + + Args: + body (UsersListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, UsersListPostResponse] """ return ( await asyncio_detailed( client=client, - json_body=json_body, + body=body, ) ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/users/set_license.py b/polarion_rest_api_client/open_api_client/api/users/set_license.py index a9041e06..1a45f018 100644 --- a/polarion_rest_api_client/open_api_client/api/users/set_license.py +++ b/polarion_rest_api_client/open_api_client/api/users/set_license.py @@ -15,20 +15,25 @@ def _get_kwargs( user_id: str, *, - json_body: SetLicenseRequestBody, + body: SetLicenseRequestBody, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/users/{userId}/actions/setLicense".format( userId=user_id, ), - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -74,30 +79,25 @@ def sync_detailed( user_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: SetLicenseRequestBody, + body: SetLicenseRequestBody, ) -> Response[Any]: - """Sets the user's license. - - Parameters - ---------- - user_id : str - json_body : SetLicenseRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Sets the User's license. + + Args: + user_id (str): + body (SetLicenseRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( user_id=user_id, - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -111,30 +111,25 @@ async def asyncio_detailed( user_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: SetLicenseRequestBody, + body: SetLicenseRequestBody, ) -> Response[Any]: - """Sets the user's license. - - Parameters - ---------- - user_id : str - json_body : SetLicenseRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Sets the User's license. + + Args: + user_id (str): + body (SetLicenseRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( user_id=user_id, - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) diff --git a/polarion_rest_api_client/open_api_client/api/users/update_avatar.py b/polarion_rest_api_client/open_api_client/api/users/update_avatar.py new file mode 100644 index 00000000..dae8fad6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/users/update_avatar.py @@ -0,0 +1,136 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.update_avatar_request_body import UpdateAvatarRequestBody +from ...types import Response + + +def _get_kwargs( + user_id: str, + *, + body: UpdateAvatarRequestBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/users/{userId}/actions/updateAvatar".format( + userId=user_id, + ), + } + + _body = body.to_multipart() + + _kwargs["files"] = _body + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.CONFLICT: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + user_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: UpdateAvatarRequestBody, +) -> Response[Any]: + """Updates the specified User Avatar. + + Args: + user_id (str): + body (UpdateAvatarRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + user_id=user_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + user_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: UpdateAvatarRequestBody, +) -> Response[Any]: + """Updates the specified User Avatar. + + Args: + user_id (str): + body (UpdateAvatarRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + user_id=user_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/work_item_approvals/__init__.py b/polarion_rest_api_client/open_api_client/api/work_item_approvals/__init__.py new file mode 100644 index 00000000..dd5d085d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_item_approvals/__init__.py @@ -0,0 +1,2 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 diff --git a/polarion_rest_api_client/open_api_client/api/work_item_approvals/delete_approval.py b/polarion_rest_api_client/open_api_client/api/work_item_approvals/delete_approval.py new file mode 100644 index 00000000..9cd91d02 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_item_approvals/delete_approval.py @@ -0,0 +1,128 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + user_id: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/workitems/{workItemId}/approvals/{userId}".format( + projectId=project_id, + workItemId=work_item_id, + userId=user_id, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + work_item_id: str, + user_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Work Item Approval. + + Args: + project_id (str): + work_item_id (str): + user_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + user_id=user_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + user_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Work Item Approval. + + Args: + project_id (str): + work_item_id (str): + user_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + user_id=user_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/work_item_approvals/delete_approvals.py b/polarion_rest_api_client/open_api_client/api/work_item_approvals/delete_approvals.py new file mode 100644 index 00000000..0768c623 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_item_approvals/delete_approvals.py @@ -0,0 +1,145 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.workitem_approvals_list_delete_request import ( + WorkitemApprovalsListDeleteRequest, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + body: WorkitemApprovalsListDeleteRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/workitems/{workItemId}/approvals".format( + projectId=project_id, + workItemId=work_item_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: WorkitemApprovalsListDeleteRequest, +) -> Response[Any]: + """Deletes a list of Work Item Approvals. + + Args: + project_id (str): + work_item_id (str): + body (WorkitemApprovalsListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: WorkitemApprovalsListDeleteRequest, +) -> Response[Any]: + """Deletes a list of Work Item Approvals. + + Args: + project_id (str): + work_item_id (str): + body (WorkitemApprovalsListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/work_item_approvals/get_work_item_approval.py b/polarion_rest_api_client/open_api_client/api/work_item_approvals/get_work_item_approval.py new file mode 100644 index 00000000..38046f7a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_item_approvals/get_work_item_approval.py @@ -0,0 +1,266 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.workitem_approvals_single_get_response import ( + WorkitemApprovalsSingleGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + work_item_id: str, + user_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["revision"] = revision + + 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": "/projects/{projectId}/workitems/{workItemId}/approvals/{userId}".format( + projectId=project_id, + workItemId=work_item_id, + userId=user_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, WorkitemApprovalsSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = WorkitemApprovalsSingleGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, WorkitemApprovalsSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + user_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, WorkitemApprovalsSingleGetResponse]]: + """Returns the specified instance. + + Args: + project_id (str): + work_item_id (str): + user_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemApprovalsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + user_id=user_id, + fields=fields, + include=include, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + user_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, WorkitemApprovalsSingleGetResponse]]: + """Returns the specified instance. + + Args: + project_id (str): + work_item_id (str): + user_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemApprovalsSingleGetResponse] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + user_id=user_id, + client=client, + fields=fields, + include=include, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + user_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, WorkitemApprovalsSingleGetResponse]]: + """Returns the specified instance. + + Args: + project_id (str): + work_item_id (str): + user_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemApprovalsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + user_id=user_id, + fields=fields, + include=include, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + user_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, WorkitemApprovalsSingleGetResponse]]: + """Returns the specified instance. + + Args: + project_id (str): + work_item_id (str): + user_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemApprovalsSingleGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + user_id=user_id, + client=client, + fields=fields, + include=include, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/work_item_approvals/get_work_item_approvals.py b/polarion_rest_api_client/open_api_client/api/work_item_approvals/get_work_item_approvals.py new file mode 100644 index 00000000..bb7e83be --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_item_approvals/get_work_item_approvals.py @@ -0,0 +1,282 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.workitem_approvals_list_get_response import ( + WorkitemApprovalsListGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["revision"] = revision + + 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": "/projects/{projectId}/workitems/{workItemId}/approvals".format( + projectId=project_id, + workItemId=work_item_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, WorkitemApprovalsListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = WorkitemApprovalsListGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, WorkitemApprovalsListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, WorkitemApprovalsListGetResponse]]: + """Returns a list of instances. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemApprovalsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, WorkitemApprovalsListGetResponse]]: + """Returns a list of instances. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemApprovalsListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, WorkitemApprovalsListGetResponse]]: + """Returns a list of instances. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemApprovalsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, WorkitemApprovalsListGetResponse]]: + """Returns a list of instances. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemApprovalsListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/work_item_approvals/patch_work_item_approval.py b/polarion_rest_api_client/open_api_client/api/work_item_approvals/patch_work_item_approval.py new file mode 100644 index 00000000..2145b1d6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_item_approvals/patch_work_item_approval.py @@ -0,0 +1,155 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.workitem_approvals_single_patch_request import ( + WorkitemApprovalsSinglePatchRequest, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + user_id: str, + *, + body: WorkitemApprovalsSinglePatchRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "patch", + "url": "/projects/{projectId}/workitems/{workItemId}/approvals/{userId}".format( + projectId=project_id, + workItemId=work_item_id, + userId=user_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.CONFLICT: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + work_item_id: str, + user_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: WorkitemApprovalsSinglePatchRequest, +) -> Response[Any]: + """Updates the specified instance. + + Args: + project_id (str): + work_item_id (str): + user_id (str): + body (WorkitemApprovalsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + user_id=user_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + user_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: WorkitemApprovalsSinglePatchRequest, +) -> Response[Any]: + """Updates the specified instance. + + Args: + project_id (str): + work_item_id (str): + user_id (str): + body (WorkitemApprovalsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + user_id=user_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/work_item_approvals/patch_work_item_approvals.py b/polarion_rest_api_client/open_api_client/api/work_item_approvals/patch_work_item_approvals.py new file mode 100644 index 00000000..fe11e92a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_item_approvals/patch_work_item_approvals.py @@ -0,0 +1,147 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.workitem_approvals_list_patch_request import ( + WorkitemApprovalsListPatchRequest, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + body: WorkitemApprovalsListPatchRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "patch", + "url": "/projects/{projectId}/workitems/{workItemId}/approvals".format( + projectId=project_id, + workItemId=work_item_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.CONFLICT: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: WorkitemApprovalsListPatchRequest, +) -> Response[Any]: + """Updates a list of instances. + + Args: + project_id (str): + work_item_id (str): + body (WorkitemApprovalsListPatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: WorkitemApprovalsListPatchRequest, +) -> Response[Any]: + """Updates a list of instances. + + Args: + project_id (str): + work_item_id (str): + body (WorkitemApprovalsListPatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/work_item_approvals/post_work_item_approvals.py b/polarion_rest_api_client/open_api_client/api/work_item_approvals/post_work_item_approvals.py new file mode 100644 index 00000000..e616099f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_item_approvals/post_work_item_approvals.py @@ -0,0 +1,228 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.workitem_approvals_list_post_request import ( + WorkitemApprovalsListPostRequest, +) +from ...models.workitem_approvals_list_post_response import ( + WorkitemApprovalsListPostResponse, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + body: WorkitemApprovalsListPostRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/workitems/{workItemId}/approvals".format( + projectId=project_id, + workItemId=work_item_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, WorkitemApprovalsListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = WorkitemApprovalsListPostResponse.from_dict( + response.json() + ) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, WorkitemApprovalsListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: WorkitemApprovalsListPostRequest, +) -> Response[Union[Any, WorkitemApprovalsListPostResponse]]: + """Creates a list of WorkItem Approvals. + + Args: + project_id (str): + work_item_id (str): + body (WorkitemApprovalsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemApprovalsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: WorkitemApprovalsListPostRequest, +) -> Optional[Union[Any, WorkitemApprovalsListPostResponse]]: + """Creates a list of WorkItem Approvals. + + Args: + project_id (str): + work_item_id (str): + body (WorkitemApprovalsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemApprovalsListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: WorkitemApprovalsListPostRequest, +) -> Response[Union[Any, WorkitemApprovalsListPostResponse]]: + """Creates a list of WorkItem Approvals. + + Args: + project_id (str): + work_item_id (str): + body (WorkitemApprovalsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemApprovalsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: WorkitemApprovalsListPostRequest, +) -> Optional[Union[Any, WorkitemApprovalsListPostResponse]]: + """Creates a list of WorkItem Approvals. + + Args: + project_id (str): + work_item_id (str): + body (WorkitemApprovalsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemApprovalsListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/work_item_attachments/delete_work_item_attachment.py b/polarion_rest_api_client/open_api_client/api/work_item_attachments/delete_work_item_attachment.py index 99c4b2a6..eabb14b4 100644 --- a/polarion_rest_api_client/open_api_client/api/work_item_attachments/delete_work_item_attachment.py +++ b/polarion_rest_api_client/open_api_client/api/work_item_attachments/delete_work_item_attachment.py @@ -16,9 +16,7 @@ def _get_kwargs( work_item_id: str, attachment_id: str, ) -> Dict[str, Any]: - pass - - return { + _kwargs: Dict[str, Any] = { "method": "delete", "url": "/projects/{projectId}/workitems/{workItemId}/attachments/{attachmentId}".format( projectId=project_id, @@ -27,6 +25,8 @@ def _get_kwargs( ), } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -71,24 +71,19 @@ def sync_detailed( *, client: Union[AuthenticatedClient, Client], ) -> Response[Any]: - """Deletes the specified instance. - - Parameters - ---------- - project_id : str - work_item_id : str - attachment_id : str - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Deletes the specified Work Item Attachment. + + Args: + project_id (str): + work_item_id (str): + attachment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( @@ -111,24 +106,19 @@ async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], ) -> Response[Any]: - """Deletes the specified instance. - - Parameters - ---------- - project_id : str - work_item_id : str - attachment_id : str - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Deletes the specified Work Item Attachment. + + Args: + project_id (str): + work_item_id (str): + attachment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( diff --git a/polarion_rest_api_client/open_api_client/api/work_item_attachments/get_work_item_attachment.py b/polarion_rest_api_client/open_api_client/api/work_item_attachments/get_work_item_attachment.py index afc98dab..995034b5 100644 --- a/polarion_rest_api_client/open_api_client/api/work_item_attachments/get_work_item_attachment.py +++ b/polarion_rest_api_client/open_api_client/api/work_item_attachments/get_work_item_attachment.py @@ -20,18 +20,16 @@ def _get_kwargs( work_item_id: str, attachment_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -42,7 +40,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/workitems/{workItemId}/attachments/{attachmentId}".format( projectId=project_id, @@ -52,6 +50,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -106,31 +106,26 @@ def sync_detailed( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, WorkitemAttachmentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - work_item_id : str - attachment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemAttachmentsSingleGetResponse]] + """Returns the specified Work Item Attachment. + + Args: + project_id (str): + work_item_id (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemAttachmentsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -155,31 +150,26 @@ def sync( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, WorkitemAttachmentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - work_item_id : str - attachment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemAttachmentsSingleGetResponse] + """Returns the specified Work Item Attachment. + + Args: + project_id (str): + work_item_id (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemAttachmentsSingleGetResponse] """ return sync_detailed( @@ -199,31 +189,26 @@ async def asyncio_detailed( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, WorkitemAttachmentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - work_item_id : str - attachment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemAttachmentsSingleGetResponse]] + """Returns the specified Work Item Attachment. + + Args: + project_id (str): + work_item_id (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemAttachmentsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -246,31 +231,26 @@ async def asyncio( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, WorkitemAttachmentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - work_item_id : str - attachment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemAttachmentsSingleGetResponse] + """Returns the specified Work Item Attachment. + + Args: + project_id (str): + work_item_id (str): + attachment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemAttachmentsSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/work_item_attachments/get_work_item_attachment_content.py b/polarion_rest_api_client/open_api_client/api/work_item_attachments/get_work_item_attachment_content.py index ea285f5b..4aa33f5b 100644 --- a/polarion_rest_api_client/open_api_client/api/work_item_attachments/get_work_item_attachment_content.py +++ b/polarion_rest_api_client/open_api_client/api/work_item_attachments/get_work_item_attachment_content.py @@ -16,18 +16,17 @@ def _get_kwargs( work_item_id: str, attachment_id: str, *, - revision: Union[Unset, None, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} + params["revision"] = revision params = { k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/workitems/{workItemId}/attachments/{attachmentId}/content".format( projectId=project_id, @@ -37,6 +36,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -80,27 +81,22 @@ def sync_detailed( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - revision: Union[Unset, None, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Any]: - """Downloads the file content for a specified attachment. - - Parameters - ---------- - project_id : str - work_item_id : str - attachment_id : str - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Downloads the file content for a specified Work Item Attachment. + + Args: + project_id (str): + work_item_id (str): + attachment_id (str): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( @@ -123,27 +119,22 @@ async def asyncio_detailed( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - revision: Union[Unset, None, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Any]: - """Downloads the file content for a specified attachment. - - Parameters - ---------- - project_id : str - work_item_id : str - attachment_id : str - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Downloads the file content for a specified Work Item Attachment. + + Args: + project_id (str): + work_item_id (str): + attachment_id (str): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( diff --git a/polarion_rest_api_client/open_api_client/api/work_item_attachments/get_work_item_attachments.py b/polarion_rest_api_client/open_api_client/api/work_item_attachments/get_work_item_attachments.py index e2d98e0f..e39f4267 100644 --- a/polarion_rest_api_client/open_api_client/api/work_item_attachments/get_work_item_attachments.py +++ b/polarion_rest_api_client/open_api_client/api/work_item_attachments/get_work_item_attachments.py @@ -19,20 +19,18 @@ def _get_kwargs( project_id: str, work_item_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -47,7 +45,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/workitems/{workItemId}/attachments".format( projectId=project_id, @@ -56,6 +54,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -109,34 +109,29 @@ def sync_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, WorkitemAttachmentsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemAttachmentsListGetResponse]] + """Returns a list of Work Item Attachments. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemAttachmentsListGetResponse]] """ kwargs = _get_kwargs( @@ -161,34 +156,29 @@ def sync( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, WorkitemAttachmentsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemAttachmentsListGetResponse] + """Returns a list of Work Item Attachments. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemAttachmentsListGetResponse] """ return sync_detailed( @@ -208,34 +198,29 @@ async def asyncio_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, WorkitemAttachmentsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemAttachmentsListGetResponse]] + """Returns a list of Work Item Attachments. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemAttachmentsListGetResponse]] """ kwargs = _get_kwargs( @@ -258,34 +243,29 @@ async def asyncio( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, WorkitemAttachmentsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemAttachmentsListGetResponse] + """Returns a list of Work Item Attachments. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemAttachmentsListGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/work_item_attachments/patch_work_item_attachment.py b/polarion_rest_api_client/open_api_client/api/work_item_attachments/patch_work_item_attachment.py index c9cdeb72..18a7c98b 100644 --- a/polarion_rest_api_client/open_api_client/api/work_item_attachments/patch_work_item_attachment.py +++ b/polarion_rest_api_client/open_api_client/api/work_item_attachments/patch_work_item_attachment.py @@ -19,22 +19,26 @@ def _get_kwargs( work_item_id: str, attachment_id: str, *, - multipart_data: PatchWorkItemAttachmentsRequestBody, + body: PatchWorkItemAttachmentsRequestBody, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - multipart_multipart_data = multipart_data.to_multipart() - - return { + _kwargs: Dict[str, Any] = { "method": "patch", "url": "/projects/{projectId}/workitems/{workItemId}/attachments/{attachmentId}".format( projectId=project_id, workItemId=work_item_id, attachmentId=attachment_id, ), - "files": multipart_multipart_data, } + _body = body.to_multipart() + + _kwargs["files"] = _body + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -82,37 +86,32 @@ def sync_detailed( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - multipart_data: PatchWorkItemAttachmentsRequestBody, + body: PatchWorkItemAttachmentsRequestBody, ) -> Response[Any]: - r"""Updates the specified instance. + r"""Updates the specified Work Item Attachment. - See more in the Rest API User Guide. - Parameters - ---------- - project_id : str - work_item_id : str - attachment_id : str - multipart_data : PatchWorkItemAttachmentsRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + Args: + project_id (str): + work_item_id (str): + attachment_id (str): + body (PatchWorkItemAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( project_id=project_id, work_item_id=work_item_id, attachment_id=attachment_id, - multipart_data=multipart_data, + body=body, ) response = client.get_httpx_client().request( @@ -128,37 +127,32 @@ async def asyncio_detailed( attachment_id: str, *, client: Union[AuthenticatedClient, Client], - multipart_data: PatchWorkItemAttachmentsRequestBody, + body: PatchWorkItemAttachmentsRequestBody, ) -> Response[Any]: - r"""Updates the specified instance. + r"""Updates the specified Work Item Attachment. - See more in the Rest API User Guide. - Parameters - ---------- - project_id : str - work_item_id : str - attachment_id : str - multipart_data : PatchWorkItemAttachmentsRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + Args: + project_id (str): + work_item_id (str): + attachment_id (str): + body (PatchWorkItemAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( project_id=project_id, work_item_id=work_item_id, attachment_id=attachment_id, - multipart_data=multipart_data, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) diff --git a/polarion_rest_api_client/open_api_client/api/work_item_attachments/post_work_item_attachments.py b/polarion_rest_api_client/open_api_client/api/work_item_attachments/post_work_item_attachments.py index 1fba8189..51927016 100644 --- a/polarion_rest_api_client/open_api_client/api/work_item_attachments/post_work_item_attachments.py +++ b/polarion_rest_api_client/open_api_client/api/work_item_attachments/post_work_item_attachments.py @@ -21,21 +21,25 @@ def _get_kwargs( project_id: str, work_item_id: str, *, - multipart_data: PostWorkItemAttachmentsRequestBody, + body: PostWorkItemAttachmentsRequestBody, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - multipart_multipart_data = multipart_data.to_multipart() - - return { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/projects/{projectId}/workitems/{workItemId}/attachments".format( projectId=project_id, workItemId=work_item_id, ), - "files": multipart_multipart_data, } + _body = body.to_multipart() + + _kwargs["files"] = _body + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -98,36 +102,31 @@ def sync_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - multipart_data: PostWorkItemAttachmentsRequestBody, + body: PostWorkItemAttachmentsRequestBody, ) -> Response[Union[Any, WorkitemAttachmentsListPostResponse]]: - r"""Creates a list of instances. + r"""Creates a list of Work Item Attachments. - Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. - Parameters - ---------- - project_id : str - work_item_id : str - multipart_data : PostWorkItemAttachmentsRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemAttachmentsListPostResponse]] + Args: + project_id (str): + work_item_id (str): + body (PostWorkItemAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemAttachmentsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, work_item_id=work_item_id, - multipart_data=multipart_data, + body=body, ) response = client.get_httpx_client().request( @@ -142,37 +141,32 @@ def sync( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - multipart_data: PostWorkItemAttachmentsRequestBody, + body: PostWorkItemAttachmentsRequestBody, ) -> Optional[Union[Any, WorkitemAttachmentsListPostResponse]]: - r"""Creates a list of instances. + r"""Creates a list of Work Item Attachments. - Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. - Parameters - ---------- - project_id : str - work_item_id : str - multipart_data : PostWorkItemAttachmentsRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemAttachmentsListPostResponse] + Args: + project_id (str): + work_item_id (str): + body (PostWorkItemAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemAttachmentsListPostResponse] """ return sync_detailed( project_id=project_id, work_item_id=work_item_id, client=client, - multipart_data=multipart_data, + body=body, ).parsed @@ -181,36 +175,31 @@ async def asyncio_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - multipart_data: PostWorkItemAttachmentsRequestBody, + body: PostWorkItemAttachmentsRequestBody, ) -> Response[Union[Any, WorkitemAttachmentsListPostResponse]]: - r"""Creates a list of instances. + r"""Creates a list of Work Item Attachments. - Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. - Parameters - ---------- - project_id : str - work_item_id : str - multipart_data : PostWorkItemAttachmentsRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemAttachmentsListPostResponse]] + Args: + project_id (str): + work_item_id (str): + body (PostWorkItemAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemAttachmentsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, work_item_id=work_item_id, - multipart_data=multipart_data, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -223,30 +212,25 @@ async def asyncio( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - multipart_data: PostWorkItemAttachmentsRequestBody, + body: PostWorkItemAttachmentsRequestBody, ) -> Optional[Union[Any, WorkitemAttachmentsListPostResponse]]: - r"""Creates a list of instances. + r"""Creates a list of Work Item Attachments. - Files are identified by order or optionally by the 'lid' attribute. See more in the Rest API User Guide. - Parameters - ---------- - project_id : str - work_item_id : str - multipart_data : PostWorkItemAttachmentsRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemAttachmentsListPostResponse] + Args: + project_id (str): + work_item_id (str): + body (PostWorkItemAttachmentsRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemAttachmentsListPostResponse] """ return ( @@ -254,6 +238,6 @@ async def asyncio( project_id=project_id, work_item_id=work_item_id, client=client, - multipart_data=multipart_data, + body=body, ) ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/work_item_comments/get_comment.py b/polarion_rest_api_client/open_api_client/api/work_item_comments/get_comment.py index fa4f3b4e..848bf5a4 100644 --- a/polarion_rest_api_client/open_api_client/api/work_item_comments/get_comment.py +++ b/polarion_rest_api_client/open_api_client/api/work_item_comments/get_comment.py @@ -20,18 +20,16 @@ def _get_kwargs( work_item_id: str, comment_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -42,7 +40,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/workitems/{workItemId}/comments/{commentId}".format( projectId=project_id, @@ -52,6 +50,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -106,31 +106,26 @@ def sync_detailed( comment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, WorkitemCommentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - work_item_id : str - comment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemCommentsSingleGetResponse]] + """Returns the specified Work Item Comment. + + Args: + project_id (str): + work_item_id (str): + comment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemCommentsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -155,31 +150,26 @@ def sync( comment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, WorkitemCommentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - work_item_id : str - comment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemCommentsSingleGetResponse] + """Returns the specified Work Item Comment. + + Args: + project_id (str): + work_item_id (str): + comment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemCommentsSingleGetResponse] """ return sync_detailed( @@ -199,31 +189,26 @@ async def asyncio_detailed( comment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, WorkitemCommentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - work_item_id : str - comment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemCommentsSingleGetResponse]] + """Returns the specified Work Item Comment. + + Args: + project_id (str): + work_item_id (str): + comment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemCommentsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -246,31 +231,26 @@ async def asyncio( comment_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, WorkitemCommentsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - work_item_id : str - comment_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemCommentsSingleGetResponse] + """Returns the specified Work Item Comment. + + Args: + project_id (str): + work_item_id (str): + comment_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemCommentsSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/work_item_comments/get_comments.py b/polarion_rest_api_client/open_api_client/api/work_item_comments/get_comments.py index 79673daa..511a1464 100644 --- a/polarion_rest_api_client/open_api_client/api/work_item_comments/get_comments.py +++ b/polarion_rest_api_client/open_api_client/api/work_item_comments/get_comments.py @@ -19,20 +19,18 @@ def _get_kwargs( project_id: str, work_item_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -47,7 +45,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/workitems/{workItemId}/comments".format( projectId=project_id, @@ -56,6 +54,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -109,34 +109,29 @@ def sync_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, WorkitemCommentsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemCommentsListGetResponse]] + """Returns a list of Work Item Comments. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemCommentsListGetResponse]] """ kwargs = _get_kwargs( @@ -161,34 +156,29 @@ def sync( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, WorkitemCommentsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemCommentsListGetResponse] + """Returns a list of Work Item Comments. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemCommentsListGetResponse] """ return sync_detailed( @@ -208,34 +198,29 @@ async def asyncio_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, WorkitemCommentsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemCommentsListGetResponse]] + """Returns a list of Work Item Comments. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemCommentsListGetResponse]] """ kwargs = _get_kwargs( @@ -258,34 +243,29 @@ async def asyncio( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, WorkitemCommentsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemCommentsListGetResponse] + """Returns a list of Work Item Comments. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemCommentsListGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/work_item_comments/patch_comment.py b/polarion_rest_api_client/open_api_client/api/work_item_comments/patch_comment.py index 25756bed..cc8b5311 100644 --- a/polarion_rest_api_client/open_api_client/api/work_item_comments/patch_comment.py +++ b/polarion_rest_api_client/open_api_client/api/work_item_comments/patch_comment.py @@ -19,22 +19,27 @@ def _get_kwargs( work_item_id: str, comment_id: str, *, - json_body: WorkitemCommentsSinglePatchRequest, + body: WorkitemCommentsSinglePatchRequest, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "patch", "url": "/projects/{projectId}/workitems/{workItemId}/comments/{commentId}".format( projectId=project_id, workItemId=work_item_id, commentId=comment_id, ), - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -82,34 +87,29 @@ def sync_detailed( comment_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: WorkitemCommentsSinglePatchRequest, + body: WorkitemCommentsSinglePatchRequest, ) -> Response[Any]: - """Updates the specified instance. - - Parameters - ---------- - project_id : str - work_item_id : str - comment_id : str - json_body : WorkitemCommentsSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Updates the specified Work Item Comment. + + Args: + project_id (str): + work_item_id (str): + comment_id (str): + body (WorkitemCommentsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( project_id=project_id, work_item_id=work_item_id, comment_id=comment_id, - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -125,34 +125,29 @@ async def asyncio_detailed( comment_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: WorkitemCommentsSinglePatchRequest, + body: WorkitemCommentsSinglePatchRequest, ) -> Response[Any]: - """Updates the specified instance. - - Parameters - ---------- - project_id : str - work_item_id : str - comment_id : str - json_body : WorkitemCommentsSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Updates the specified Work Item Comment. + + Args: + project_id (str): + work_item_id (str): + comment_id (str): + body (WorkitemCommentsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( project_id=project_id, work_item_id=work_item_id, comment_id=comment_id, - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) diff --git a/polarion_rest_api_client/open_api_client/api/work_item_comments/post_comments.py b/polarion_rest_api_client/open_api_client/api/work_item_comments/post_comments.py index 00a880c6..b31c8a9e 100644 --- a/polarion_rest_api_client/open_api_client/api/work_item_comments/post_comments.py +++ b/polarion_rest_api_client/open_api_client/api/work_item_comments/post_comments.py @@ -21,21 +21,26 @@ def _get_kwargs( project_id: str, work_item_id: str, *, - json_body: WorkitemCommentsListPostRequest, + body: WorkitemCommentsListPostRequest, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/projects/{projectId}/workitems/{workItemId}/comments".format( projectId=project_id, workItemId=work_item_id, ), - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -98,32 +103,27 @@ def sync_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: WorkitemCommentsListPostRequest, + body: WorkitemCommentsListPostRequest, ) -> Response[Union[Any, WorkitemCommentsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - json_body : WorkitemCommentsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemCommentsListPostResponse]] + """Creates a list of Work Item Comments. + + Args: + project_id (str): + work_item_id (str): + body (WorkitemCommentsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemCommentsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, work_item_id=work_item_id, - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -138,33 +138,28 @@ def sync( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: WorkitemCommentsListPostRequest, + body: WorkitemCommentsListPostRequest, ) -> Optional[Union[Any, WorkitemCommentsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - json_body : WorkitemCommentsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemCommentsListPostResponse] + """Creates a list of Work Item Comments. + + Args: + project_id (str): + work_item_id (str): + body (WorkitemCommentsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemCommentsListPostResponse] """ return sync_detailed( project_id=project_id, work_item_id=work_item_id, client=client, - json_body=json_body, + body=body, ).parsed @@ -173,32 +168,27 @@ async def asyncio_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: WorkitemCommentsListPostRequest, + body: WorkitemCommentsListPostRequest, ) -> Response[Union[Any, WorkitemCommentsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - json_body : WorkitemCommentsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemCommentsListPostResponse]] + """Creates a list of Work Item Comments. + + Args: + project_id (str): + work_item_id (str): + body (WorkitemCommentsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemCommentsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, work_item_id=work_item_id, - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -211,26 +201,21 @@ async def asyncio( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: WorkitemCommentsListPostRequest, + body: WorkitemCommentsListPostRequest, ) -> Optional[Union[Any, WorkitemCommentsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - json_body : WorkitemCommentsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemCommentsListPostResponse] + """Creates a list of Work Item Comments. + + Args: + project_id (str): + work_item_id (str): + body (WorkitemCommentsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemCommentsListPostResponse] """ return ( @@ -238,6 +223,6 @@ async def asyncio( project_id=project_id, work_item_id=work_item_id, client=client, - json_body=json_body, + body=body, ) ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/work_item_work_records/__init__.py b/polarion_rest_api_client/open_api_client/api/work_item_work_records/__init__.py new file mode 100644 index 00000000..dd5d085d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_item_work_records/__init__.py @@ -0,0 +1,2 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 diff --git a/polarion_rest_api_client/open_api_client/api/work_item_work_records/delete_work_record.py b/polarion_rest_api_client/open_api_client/api/work_item_work_records/delete_work_record.py new file mode 100644 index 00000000..b591bda6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_item_work_records/delete_work_record.py @@ -0,0 +1,128 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + work_record_id: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/workitems/{workItemId}/workrecords/{workRecordId}".format( + projectId=project_id, + workItemId=work_item_id, + workRecordId=work_record_id, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + work_item_id: str, + work_record_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Work Record. + + Args: + project_id (str): + work_item_id (str): + work_record_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + work_record_id=work_record_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + work_record_id: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Deletes the specified Work Record. + + Args: + project_id (str): + work_item_id (str): + work_record_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + work_record_id=work_record_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/work_item_work_records/delete_work_records.py b/polarion_rest_api_client/open_api_client/api/work_item_work_records/delete_work_records.py new file mode 100644 index 00000000..7e8c6a72 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_item_work_records/delete_work_records.py @@ -0,0 +1,145 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.workrecords_list_delete_request import ( + WorkrecordsListDeleteRequest, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + body: WorkrecordsListDeleteRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/workitems/{workItemId}/workrecords".format( + projectId=project_id, + workItemId=work_item_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: WorkrecordsListDeleteRequest, +) -> Response[Any]: + """Deletes a list of Work Records. + + Args: + project_id (str): + work_item_id (str): + body (WorkrecordsListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: WorkrecordsListDeleteRequest, +) -> Response[Any]: + """Deletes a list of Work Records. + + Args: + project_id (str): + work_item_id (str): + body (WorkrecordsListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/work_item_work_records/get_work_record.py b/polarion_rest_api_client/open_api_client/api/work_item_work_records/get_work_record.py new file mode 100644 index 00000000..257bf584 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_item_work_records/get_work_record.py @@ -0,0 +1,264 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.workrecords_single_get_response import ( + WorkrecordsSingleGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + work_item_id: str, + work_record_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["revision"] = revision + + 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": "/projects/{projectId}/workitems/{workItemId}/workrecords/{workRecordId}".format( + projectId=project_id, + workItemId=work_item_id, + workRecordId=work_record_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, WorkrecordsSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = WorkrecordsSingleGetResponse.from_dict(response.json()) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, WorkrecordsSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + work_record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, WorkrecordsSingleGetResponse]]: + """Returns the specified instance. + + Args: + project_id (str): + work_item_id (str): + work_record_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkrecordsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + work_record_id=work_record_id, + fields=fields, + include=include, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + work_record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, WorkrecordsSingleGetResponse]]: + """Returns the specified instance. + + Args: + project_id (str): + work_item_id (str): + work_record_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkrecordsSingleGetResponse] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + work_record_id=work_record_id, + client=client, + fields=fields, + include=include, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + work_record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, WorkrecordsSingleGetResponse]]: + """Returns the specified instance. + + Args: + project_id (str): + work_item_id (str): + work_record_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkrecordsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + work_record_id=work_record_id, + fields=fields, + include=include, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + work_record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, WorkrecordsSingleGetResponse]]: + """Returns the specified instance. + + Args: + project_id (str): + work_item_id (str): + work_record_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkrecordsSingleGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + work_record_id=work_record_id, + client=client, + fields=fields, + include=include, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/work_item_work_records/get_work_records.py b/polarion_rest_api_client/open_api_client/api/work_item_work_records/get_work_records.py new file mode 100644 index 00000000..5009895f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_item_work_records/get_work_records.py @@ -0,0 +1,278 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.workrecords_list_get_response import WorkrecordsListGetResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["revision"] = revision + + 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": "/projects/{projectId}/workitems/{workItemId}/workrecords".format( + projectId=project_id, + workItemId=work_item_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, WorkrecordsListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = WorkrecordsListGetResponse.from_dict(response.json()) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, WorkrecordsListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, WorkrecordsListGetResponse]]: + """Returns a list of instances. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkrecordsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, WorkrecordsListGetResponse]]: + """Returns a list of instances. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkrecordsListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, WorkrecordsListGetResponse]]: + """Returns a list of instances. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkrecordsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, WorkrecordsListGetResponse]]: + """Returns a list of instances. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkrecordsListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/work_item_work_records/post_work_records.py b/polarion_rest_api_client/open_api_client/api/work_item_work_records/post_work_records.py new file mode 100644 index 00000000..8ddfcfcb --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_item_work_records/post_work_records.py @@ -0,0 +1,224 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.workrecords_list_post_request import WorkrecordsListPostRequest +from ...models.workrecords_list_post_response import ( + WorkrecordsListPostResponse, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + body: WorkrecordsListPostRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/workitems/{workItemId}/workrecords".format( + projectId=project_id, + workItemId=work_item_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, WorkrecordsListPostResponse]]: + if response.status_code == HTTPStatus.CREATED: + response_201 = WorkrecordsListPostResponse.from_dict(response.json()) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.CONFLICT: + response_409 = cast(Any, None) + return response_409 + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + response_413 = cast(Any, None) + return response_413 + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + response_415 = cast(Any, None) + return response_415 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, WorkrecordsListPostResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: WorkrecordsListPostRequest, +) -> Response[Union[Any, WorkrecordsListPostResponse]]: + """Creates a list of Work Records. + + Args: + project_id (str): + work_item_id (str): + body (WorkrecordsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkrecordsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: WorkrecordsListPostRequest, +) -> Optional[Union[Any, WorkrecordsListPostResponse]]: + """Creates a list of Work Records. + + Args: + project_id (str): + work_item_id (str): + body (WorkrecordsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkrecordsListPostResponse] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: WorkrecordsListPostRequest, +) -> Response[Union[Any, WorkrecordsListPostResponse]]: + """Creates a list of Work Records. + + Args: + project_id (str): + work_item_id (str): + body (WorkrecordsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkrecordsListPostResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: WorkrecordsListPostRequest, +) -> Optional[Union[Any, WorkrecordsListPostResponse]]: + """Creates a list of Work Records. + + Args: + project_id (str): + work_item_id (str): + body (WorkrecordsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkrecordsListPostResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + body=body, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/work_items/delete_all_work_items.py b/polarion_rest_api_client/open_api_client/api/work_items/delete_all_work_items.py new file mode 100644 index 00000000..a9b488ef --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_items/delete_all_work_items.py @@ -0,0 +1,124 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.workitems_list_delete_request import WorkitemsListDeleteRequest +from ...types import Response + + +def _get_kwargs( + *, + body: WorkitemsListDeleteRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/all/workitems", + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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: Union[AuthenticatedClient, Client], + body: WorkitemsListDeleteRequest, +) -> Response[Any]: + """Deletes a list of Work Items from the Global context. + + Args: + body (WorkitemsListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], + body: WorkitemsListDeleteRequest, +) -> Response[Any]: + """Deletes a list of Work Items from the Global context. + + Args: + body (WorkitemsListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/work_items/delete_work_items.py b/polarion_rest_api_client/open_api_client/api/work_items/delete_work_items.py index d0ce4b2b..a86430eb 100644 --- a/polarion_rest_api_client/open_api_client/api/work_items/delete_work_items.py +++ b/polarion_rest_api_client/open_api_client/api/work_items/delete_work_items.py @@ -15,20 +15,25 @@ def _get_kwargs( project_id: str, *, - json_body: WorkitemsListDeleteRequest, + body: WorkitemsListDeleteRequest, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "delete", "url": "/projects/{projectId}/workitems".format( projectId=project_id, ), - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -72,30 +77,25 @@ def sync_detailed( project_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: WorkitemsListDeleteRequest, + body: WorkitemsListDeleteRequest, ) -> Response[Any]: - """Deletes a list of instances. - - Parameters - ---------- - project_id : str - json_body : WorkitemsListDeleteRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Deletes a list of Work Items. + + Args: + project_id (str): + body (WorkitemsListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( project_id=project_id, - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -109,30 +109,25 @@ async def asyncio_detailed( project_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: WorkitemsListDeleteRequest, + body: WorkitemsListDeleteRequest, ) -> Response[Any]: - """Deletes a list of instances. - - Parameters - ---------- - project_id : str - json_body : WorkitemsListDeleteRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Deletes a list of Work Items. + + Args: + project_id (str): + body (WorkitemsListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( project_id=project_id, - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) diff --git a/polarion_rest_api_client/open_api_client/api/work_items/delete_work_items_relationship.py b/polarion_rest_api_client/open_api_client/api/work_items/delete_work_items_relationship.py new file mode 100644 index 00000000..e064bb18 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_items/delete_work_items_relationship.py @@ -0,0 +1,155 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.relationships_list_delete_request import ( + RelationshipsListDeleteRequest, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + relationship_id: str, + *, + body: RelationshipsListDeleteRequest, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/projects/{projectId}/workitems/{workItemId}/relationships/{relationshipId}".format( + projectId=project_id, + workItemId=work_item_id, + relationshipId=relationship_id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.METHOD_NOT_ALLOWED: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + work_item_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: RelationshipsListDeleteRequest, +) -> Response[Any]: + """Deletes a list of Work Item Relationships. + + Args: + project_id (str): + work_item_id (str): + relationship_id (str): + body (RelationshipsListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + relationship_id=relationship_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: RelationshipsListDeleteRequest, +) -> Response[Any]: + """Deletes a list of Work Item Relationships. + + Args: + project_id (str): + work_item_id (str): + relationship_id (str): + body (RelationshipsListDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + relationship_id=relationship_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/work_items/get_all_work_items.py b/polarion_rest_api_client/open_api_client/api/work_items/get_all_work_items.py index 88cc9d95..2af9d40f 100644 --- a/polarion_rest_api_client/open_api_client/api/work_items/get_all_work_items.py +++ b/polarion_rest_api_client/open_api_client/api/work_items/get_all_work_items.py @@ -15,21 +15,19 @@ def _get_kwargs( *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -46,12 +44,14 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/all/workitems", "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -95,34 +95,29 @@ def _build_response( def sync_detailed( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Response[Union[Any, WorkitemsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - query : Union[Unset, None, str] - sort : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemsListGetResponse]] + """Returns a list of Work Items from the Global context. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemsListGetResponse]] """ kwargs = _get_kwargs( @@ -144,34 +139,29 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, WorkitemsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - query : Union[Unset, None, str] - sort : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemsListGetResponse] + """Returns a list of Work Items from the Global context. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemsListGetResponse] """ return sync_detailed( @@ -188,34 +178,29 @@ def sync( async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Response[Union[Any, WorkitemsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - query : Union[Unset, None, str] - sort : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemsListGetResponse]] + """Returns a list of Work Items from the Global context. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemsListGetResponse]] """ kwargs = _get_kwargs( @@ -235,34 +220,29 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, WorkitemsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - query : Union[Unset, None, str] - sort : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemsListGetResponse] + """Returns a list of Work Items from the Global context. + + Args: + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemsListGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/work_items/get_available_enum_options_for_work_item.py b/polarion_rest_api_client/open_api_client/api/work_items/get_available_enum_options_for_work_item.py index b1613a06..1188e4b7 100644 --- a/polarion_rest_api_client/open_api_client/api/work_items/get_available_enum_options_for_work_item.py +++ b/polarion_rest_api_client/open_api_client/api/work_items/get_available_enum_options_for_work_item.py @@ -19,12 +19,11 @@ def _get_kwargs( work_item_id: str, field_id: str, *, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} + params["page[size]"] = pagesize params["page[number]"] = pagenumber @@ -33,7 +32,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/workitems/{workItemId}/fields/{fieldId}/actions/getAvailableOptions".format( projectId=project_id, @@ -43,6 +42,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -95,29 +96,25 @@ def sync_detailed( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Response[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumOptionsActionResponseBody]] + """Returns a list of available options for the requested field for the + specified Work Item. + + Args: + project_id (str): + work_item_id (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumOptionsActionResponseBody]] """ kwargs = _get_kwargs( @@ -141,29 +138,25 @@ def sync( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Optional[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumOptionsActionResponseBody] + """Returns a list of available options for the requested field for the + specified Work Item. + + Args: + project_id (str): + work_item_id (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumOptionsActionResponseBody] """ return sync_detailed( @@ -182,29 +175,25 @@ async def asyncio_detailed( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Response[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumOptionsActionResponseBody]] + """Returns a list of available options for the requested field for the + specified Work Item. + + Args: + project_id (str): + work_item_id (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumOptionsActionResponseBody]] """ kwargs = _get_kwargs( @@ -226,29 +215,25 @@ async def asyncio( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, ) -> Optional[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumOptionsActionResponseBody] + """Returns a list of available options for the requested field for the + specified Work Item. + + Args: + project_id (str): + work_item_id (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumOptionsActionResponseBody] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/work_items/get_available_enum_options_for_work_item_type.py b/polarion_rest_api_client/open_api_client/api/work_items/get_available_enum_options_for_work_item_type.py index df93d8c1..63df5bea 100644 --- a/polarion_rest_api_client/open_api_client/api/work_items/get_available_enum_options_for_work_item_type.py +++ b/polarion_rest_api_client/open_api_client/api/work_items/get_available_enum_options_for_work_item_type.py @@ -18,13 +18,12 @@ def _get_kwargs( project_id: str, field_id: str, *, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - type: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + type: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} + params["page[size]"] = pagesize params["page[number]"] = pagenumber @@ -35,7 +34,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/workitems/fields/{fieldId}/actions/getAvailableOptions".format( projectId=project_id, @@ -44,6 +43,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -95,30 +96,26 @@ def sync_detailed( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - type: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + type: Union[Unset, str] = UNSET, ) -> Response[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - type : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumOptionsActionResponseBody]] + """Returns a list of available options for the requested field for the + specified Work Item Type. + + Args: + project_id (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + type (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumOptionsActionResponseBody]] """ kwargs = _get_kwargs( @@ -141,30 +138,26 @@ def sync( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - type: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + type: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - type : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumOptionsActionResponseBody] + """Returns a list of available options for the requested field for the + specified Work Item Type. + + Args: + project_id (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + type (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumOptionsActionResponseBody] """ return sync_detailed( @@ -182,30 +175,26 @@ async def asyncio_detailed( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - type: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + type: Union[Unset, str] = UNSET, ) -> Response[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - type : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumOptionsActionResponseBody]] + """Returns a list of available options for the requested field for the + specified Work Item Type. + + Args: + project_id (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + type (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumOptionsActionResponseBody]] """ kwargs = _get_kwargs( @@ -226,30 +215,26 @@ async def asyncio( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - type: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + type: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - type : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumOptionsActionResponseBody] + """Returns a list of available options for the requested field for the + specified Work Item Type. + + Args: + project_id (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + type (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumOptionsActionResponseBody] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/work_items/get_current_enum_options_for_work_item.py b/polarion_rest_api_client/open_api_client/api/work_items/get_current_enum_options_for_work_item.py index d2bb248c..f831bd46 100644 --- a/polarion_rest_api_client/open_api_client/api/work_items/get_current_enum_options_for_work_item.py +++ b/polarion_rest_api_client/open_api_client/api/work_items/get_current_enum_options_for_work_item.py @@ -19,13 +19,12 @@ def _get_kwargs( work_item_id: str, field_id: str, *, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} + params["page[size]"] = pagesize params["page[number]"] = pagenumber @@ -36,7 +35,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/workitems/{workItemId}/fields/{fieldId}/actions/getCurrentOptions".format( projectId=project_id, @@ -46,6 +45,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -98,31 +99,27 @@ def sync_detailed( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumOptionsActionResponseBody]] + """Returns a list of selected options for the requested field for specific + Work Item. + + Args: + project_id (str): + work_item_id (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumOptionsActionResponseBody]] """ kwargs = _get_kwargs( @@ -147,31 +144,27 @@ def sync( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumOptionsActionResponseBody] + """Returns a list of selected options for the requested field for specific + Work Item. + + Args: + project_id (str): + work_item_id (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumOptionsActionResponseBody] """ return sync_detailed( @@ -191,31 +184,27 @@ async def asyncio_detailed( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, EnumOptionsActionResponseBody]] + """Returns a list of selected options for the requested field for specific + Work Item. + + Args: + project_id (str): + work_item_id (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, EnumOptionsActionResponseBody]] """ kwargs = _get_kwargs( @@ -238,31 +227,27 @@ async def asyncio( field_id: str, *, client: Union[AuthenticatedClient, Client], - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - revision: Union[Unset, None, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, EnumOptionsActionResponseBody]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - work_item_id : str - field_id : str - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, EnumOptionsActionResponseBody] + """Returns a list of selected options for the requested field for specific + Work Item. + + Args: + project_id (str): + work_item_id (str): + field_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, EnumOptionsActionResponseBody] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/work_items/get_work_item.py b/polarion_rest_api_client/open_api_client/api/work_items/get_work_item.py index 30dcc872..0dde11b3 100644 --- a/polarion_rest_api_client/open_api_client/api/work_items/get_work_item.py +++ b/polarion_rest_api_client/open_api_client/api/work_items/get_work_item.py @@ -17,18 +17,16 @@ def _get_kwargs( project_id: str, work_item_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -39,7 +37,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/workitems/{workItemId}".format( projectId=project_id, @@ -48,6 +46,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -99,30 +99,25 @@ def sync_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, WorkitemsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemsSingleGetResponse]] + """Returns the specified Work Item. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -145,30 +140,25 @@ def sync( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, WorkitemsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemsSingleGetResponse] + """Returns the specified Work Item. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemsSingleGetResponse] """ return sync_detailed( @@ -186,30 +176,25 @@ async def asyncio_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Response[Union[Any, WorkitemsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemsSingleGetResponse]] + """Returns the specified Work Item. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemsSingleGetResponse]] """ kwargs = _get_kwargs( @@ -230,30 +215,25 @@ async def asyncio( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - revision: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, WorkitemsSingleGetResponse]]: - """Returns the specified instance. - - Parameters - ---------- - project_id : str - work_item_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - revision : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemsSingleGetResponse] + """Returns the specified Work Item. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemsSingleGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/work_items/get_work_item_test_parameter_definition.py b/polarion_rest_api_client/open_api_client/api/work_items/get_work_item_test_parameter_definition.py new file mode 100644 index 00000000..074049a0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_items/get_work_item_test_parameter_definition.py @@ -0,0 +1,270 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testparameter_definitions_single_get_response import ( + TestparameterDefinitionsSingleGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + work_item_id: str, + test_param_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["revision"] = revision + + 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": "/projects/{projectId}/workitems/{workItemId}/testparameterdefinitions/{testParamId}".format( + projectId=project_id, + workItemId=work_item_id, + testParamId=test_param_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestparameterDefinitionsSingleGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestparameterDefinitionsSingleGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestparameterDefinitionsSingleGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestparameterDefinitionsSingleGetResponse]]: + """Returns the specified Test Parameter Definition for the specified Work + Item. + + Args: + project_id (str): + work_item_id (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparameterDefinitionsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + test_param_id=test_param_id, + fields=fields, + include=include, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestparameterDefinitionsSingleGetResponse]]: + """Returns the specified Test Parameter Definition for the specified Work + Item. + + Args: + project_id (str): + work_item_id (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparameterDefinitionsSingleGetResponse] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + test_param_id=test_param_id, + client=client, + fields=fields, + include=include, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestparameterDefinitionsSingleGetResponse]]: + """Returns the specified Test Parameter Definition for the specified Work + Item. + + Args: + project_id (str): + work_item_id (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparameterDefinitionsSingleGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + test_param_id=test_param_id, + fields=fields, + include=include, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + test_param_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestparameterDefinitionsSingleGetResponse]]: + """Returns the specified Test Parameter Definition for the specified Work + Item. + + Args: + project_id (str): + work_item_id (str): + test_param_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparameterDefinitionsSingleGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + test_param_id=test_param_id, + client=client, + fields=fields, + include=include, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/work_items/get_work_item_test_parameter_definitions.py b/polarion_rest_api_client/open_api_client/api/work_items/get_work_item_test_parameter_definitions.py new file mode 100644 index 00000000..f79cce3b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_items/get_work_item_test_parameter_definitions.py @@ -0,0 +1,286 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sparse_fields import SparseFields +from ...models.testparameter_definitions_list_get_response import ( + TestparameterDefinitionsListGetResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["revision"] = revision + + 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": "/projects/{projectId}/workitems/{workItemId}/testparameterdefinitions".format( + projectId=project_id, + workItemId=work_item_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, TestparameterDefinitionsListGetResponse]]: + if response.status_code == HTTPStatus.OK: + response_200 = TestparameterDefinitionsListGetResponse.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, TestparameterDefinitionsListGetResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestparameterDefinitionsListGetResponse]]: + """Returns a list of Test Parameter Definitions for the specified Work + Item. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparameterDefinitionsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestparameterDefinitionsListGetResponse]]: + """Returns a list of Test Parameter Definitions for the specified Work + Item. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparameterDefinitionsListGetResponse] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, TestparameterDefinitionsListGetResponse]]: + """Returns a list of Test Parameter Definitions for the specified Work + Item. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, TestparameterDefinitionsListGetResponse]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, TestparameterDefinitionsListGetResponse]]: + """Returns a list of Test Parameter Definitions for the specified Work + Item. + + Args: + project_id (str): + work_item_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, TestparameterDefinitionsListGetResponse] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/work_items/get_work_items.py b/polarion_rest_api_client/open_api_client/api/work_items/get_work_items.py index be1bc586..ca570798 100644 --- a/polarion_rest_api_client/open_api_client/api/work_items/get_work_items.py +++ b/polarion_rest_api_client/open_api_client/api/work_items/get_work_items.py @@ -16,21 +16,19 @@ def _get_kwargs( project_id: str, *, - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass - params: Dict[str, Any] = {} - json_fields: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(fields, Unset): - json_fields = fields.to_dict() if fields else None - if not isinstance(json_fields, Unset) and json_fields is not None: + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): params.update(json_fields) params["include"] = include @@ -47,7 +45,7 @@ def _get_kwargs( k: v for k, v in params.items() if v is not UNSET and v is not None } - return { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/{projectId}/workitems".format( projectId=project_id, @@ -55,6 +53,8 @@ def _get_kwargs( "params": params, } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -105,35 +105,30 @@ def sync_detailed( project_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Response[Union[Any, WorkitemsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - query : Union[Unset, None, str] - sort : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemsListGetResponse]] + """Returns a list of Work Items. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemsListGetResponse]] """ kwargs = _get_kwargs( @@ -157,35 +152,30 @@ def sync( project_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, WorkitemsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - query : Union[Unset, None, str] - sort : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemsListGetResponse] + """Returns a list of Work Items. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemsListGetResponse] """ return sync_detailed( @@ -204,35 +194,30 @@ async def asyncio_detailed( project_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Response[Union[Any, WorkitemsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - query : Union[Unset, None, str] - sort : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemsListGetResponse]] + """Returns a list of Work Items. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemsListGetResponse]] """ kwargs = _get_kwargs( @@ -254,35 +239,30 @@ async def asyncio( project_id: str, *, client: Union[AuthenticatedClient, Client], - fields: Union[Unset, None, "SparseFields"] = UNSET, - include: Union[Unset, None, str] = UNSET, - pagesize: Union[Unset, None, int] = UNSET, - pagenumber: Union[Unset, None, int] = UNSET, - query: Union[Unset, None, str] = UNSET, - sort: Union[Unset, None, str] = UNSET, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + query: Union[Unset, str] = UNSET, + sort: Union[Unset, str] = UNSET, ) -> Optional[Union[Any, WorkitemsListGetResponse]]: - """Returns a list of instances. - - Parameters - ---------- - project_id : str - fields : Union[Unset, None, SparseFields] - include : Union[Unset, None, str] - pagesize : Union[Unset, None, int] - pagenumber : Union[Unset, None, int] - query : Union[Unset, None, str] - sort : Union[Unset, None, str] - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemsListGetResponse] + """Returns a list of Work Items. + + Args: + project_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + query (Union[Unset, str]): + sort (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemsListGetResponse] """ return ( diff --git a/polarion_rest_api_client/open_api_client/api/work_items/get_work_items_relationships.py b/polarion_rest_api_client/open_api_client/api/work_items/get_work_items_relationships.py new file mode 100644 index 00000000..c311b421 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_items/get_work_items_relationships.py @@ -0,0 +1,363 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.relationship_data_list_response import ( + RelationshipDataListResponse, +) +from ...models.relationship_data_single_response import ( + RelationshipDataSingleResponse, +) +from ...models.sparse_fields import SparseFields +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + work_item_id: str, + relationship_id: str, + *, + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(fields, Unset): + json_fields = fields.to_dict() + if not isinstance(json_fields, Unset): + params.update(json_fields) + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["revision"] = revision + + 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": "/projects/{projectId}/workitems/{workItemId}/relationships/{relationshipId}".format( + projectId=project_id, + workItemId=work_item_id, + relationshipId=relationship_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ + Union[ + Any, + Union[ + "RelationshipDataListResponse", "RelationshipDataSingleResponse" + ], + ] +]: + if response.status_code == HTTPStatus.OK: + + def _parse_response_200( + data: object, + ) -> Union[ + "RelationshipDataListResponse", "RelationshipDataSingleResponse" + ]: + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_relationship_response_body_type_0 = ( + RelationshipDataSingleResponse.from_dict(data) + ) + + return componentsschemas_relationship_response_body_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + componentsschemas_relationship_response_body_type_1 = ( + RelationshipDataListResponse.from_dict(data) + ) + + return componentsschemas_relationship_response_body_type_1 + + response_200 = _parse_response_200(response.json()) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ + Union[ + Any, + Union[ + "RelationshipDataListResponse", "RelationshipDataSingleResponse" + ], + ] +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[ + Union[ + Any, + Union[ + "RelationshipDataListResponse", "RelationshipDataSingleResponse" + ], + ] +]: + """Returns a list of Work Item Relationships. + + Args: + project_id (str): + work_item_id (str): + relationship_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, Union['RelationshipDataListResponse', 'RelationshipDataSingleResponse']]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + relationship_id=relationship_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[ + Union[ + Any, + Union[ + "RelationshipDataListResponse", "RelationshipDataSingleResponse" + ], + ] +]: + """Returns a list of Work Item Relationships. + + Args: + project_id (str): + work_item_id (str): + relationship_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, Union['RelationshipDataListResponse', 'RelationshipDataSingleResponse']] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + relationship_id=relationship_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[ + Union[ + Any, + Union[ + "RelationshipDataListResponse", "RelationshipDataSingleResponse" + ], + ] +]: + """Returns a list of Work Item Relationships. + + Args: + project_id (str): + work_item_id (str): + relationship_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, Union['RelationshipDataListResponse', 'RelationshipDataSingleResponse']]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + relationship_id=relationship_id, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, "SparseFields"] = UNSET, + include: Union[Unset, str] = UNSET, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[ + Union[ + Any, + Union[ + "RelationshipDataListResponse", "RelationshipDataSingleResponse" + ], + ] +]: + """Returns a list of Work Item Relationships. + + Args: + project_id (str): + work_item_id (str): + relationship_id (str): + fields (Union[Unset, SparseFields]): + include (Union[Unset, str]): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, Union['RelationshipDataListResponse', 'RelationshipDataSingleResponse']] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + relationship_id=relationship_id, + client=client, + fields=fields, + include=include, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/work_items/get_workflow_actions_for_work_item.py b/polarion_rest_api_client/open_api_client/api/work_items/get_workflow_actions_for_work_item.py new file mode 100644 index 00000000..23f5f6cf --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_items/get_workflow_actions_for_work_item.py @@ -0,0 +1,247 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.workflow_actions_action_response_body import ( + WorkflowActionsActionResponseBody, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + work_item_id: str, + *, + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + params["page[size]"] = pagesize + + params["page[number]"] = pagenumber + + params["revision"] = revision + + 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": "/projects/{projectId}/workitems/{workItemId}/actions/getWorkflowActions".format( + projectId=project_id, + workItemId=work_item_id, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, WorkflowActionsActionResponseBody]]: + if response.status_code == HTTPStatus.OK: + response_200 = WorkflowActionsActionResponseBody.from_dict( + response.json() + ) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = cast(Any, None) + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = cast(Any, None) + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = cast(Any, None) + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = cast(Any, None) + return response_404 + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + response_406 = cast(Any, None) + return response_406 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = cast(Any, None) + return response_500 + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + response_503 = cast(Any, None) + return response_503 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, WorkflowActionsActionResponseBody]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, WorkflowActionsActionResponseBody]]: + """Returns a list of Workflow Actions. + + Args: + project_id (str): + work_item_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkflowActionsActionResponseBody]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, WorkflowActionsActionResponseBody]]: + """Returns a list of Workflow Actions. + + Args: + project_id (str): + work_item_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkflowActionsActionResponseBody] + """ + + return sync_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ).parsed + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Response[Union[Any, WorkflowActionsActionResponseBody]]: + """Returns a list of Workflow Actions. + + Args: + project_id (str): + work_item_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkflowActionsActionResponseBody]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + work_item_id: str, + *, + client: Union[AuthenticatedClient, Client], + pagesize: Union[Unset, int] = UNSET, + pagenumber: Union[Unset, int] = UNSET, + revision: Union[Unset, str] = UNSET, +) -> Optional[Union[Any, WorkflowActionsActionResponseBody]]: + """Returns a list of Workflow Actions. + + Args: + project_id (str): + work_item_id (str): + pagesize (Union[Unset, int]): + pagenumber (Union[Unset, int]): + revision (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkflowActionsActionResponseBody] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + work_item_id=work_item_id, + client=client, + pagesize=pagesize, + pagenumber=pagenumber, + revision=revision, + ) + ).parsed diff --git a/polarion_rest_api_client/open_api_client/api/work_items/move_from_document.py b/polarion_rest_api_client/open_api_client/api/work_items/move_from_document.py index f1a16d49..c7fa2d66 100644 --- a/polarion_rest_api_client/open_api_client/api/work_items/move_from_document.py +++ b/polarion_rest_api_client/open_api_client/api/work_items/move_from_document.py @@ -15,9 +15,7 @@ def _get_kwargs( project_id: str, work_item_id: str, ) -> Dict[str, Any]: - pass - - return { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/projects/{projectId}/workitems/{workItemId}/actions/moveFromDocument".format( projectId=project_id, @@ -25,6 +23,8 @@ def _get_kwargs( ), } + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -66,23 +66,18 @@ def sync_detailed( *, client: Union[AuthenticatedClient, Client], ) -> Response[Any]: - """Moves Work Item from the document. - - Parameters - ---------- - project_id : str - work_item_id : str - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Moves the specified Work Item from the Document. + + Args: + project_id (str): + work_item_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( @@ -103,23 +98,18 @@ async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], ) -> Response[Any]: - """Moves Work Item from the document. - - Parameters - ---------- - project_id : str - work_item_id : str - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Moves the specified Work Item from the Document. + + Args: + project_id (str): + work_item_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( diff --git a/polarion_rest_api_client/open_api_client/api/work_items/move_to_document.py b/polarion_rest_api_client/open_api_client/api/work_items/move_to_document.py index e0b2a539..172496ac 100644 --- a/polarion_rest_api_client/open_api_client/api/work_items/move_to_document.py +++ b/polarion_rest_api_client/open_api_client/api/work_items/move_to_document.py @@ -18,21 +18,26 @@ def _get_kwargs( project_id: str, work_item_id: str, *, - json_body: MoveWorkItemToDocumentRequestBody, + body: MoveWorkItemToDocumentRequestBody, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/projects/{projectId}/workitems/{workItemId}/actions/moveToDocument".format( projectId=project_id, workItemId=work_item_id, ), - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -79,32 +84,27 @@ def sync_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: MoveWorkItemToDocumentRequestBody, + body: MoveWorkItemToDocumentRequestBody, ) -> Response[Any]: - """Moves Work Item to the document. - - Parameters - ---------- - project_id : str - work_item_id : str - json_body : MoveWorkItemToDocumentRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Moves the specified Work Item to the Document. + + Args: + project_id (str): + work_item_id (str): + body (MoveWorkItemToDocumentRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( project_id=project_id, work_item_id=work_item_id, - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -119,32 +119,27 @@ async def asyncio_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: MoveWorkItemToDocumentRequestBody, + body: MoveWorkItemToDocumentRequestBody, ) -> Response[Any]: - """Moves Work Item to the document. - - Parameters - ---------- - project_id : str - work_item_id : str - json_body : MoveWorkItemToDocumentRequestBody - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Moves the specified Work Item to the Document. + + Args: + project_id (str): + work_item_id (str): + body (MoveWorkItemToDocumentRequestBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( project_id=project_id, work_item_id=work_item_id, - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) diff --git a/polarion_rest_api_client/open_api_client/api/work_items/patch_all_work_items.py b/polarion_rest_api_client/open_api_client/api/work_items/patch_all_work_items.py new file mode 100644 index 00000000..f6c68747 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_items/patch_all_work_items.py @@ -0,0 +1,142 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.workitems_list_patch_request import WorkitemsListPatchRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: WorkitemsListPatchRequest, + workflow_action: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + params: Dict[str, Any] = {} + + params["workflowAction"] = workflow_action + + 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": "/all/workitems", + "params": params, + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.CONFLICT: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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: Union[AuthenticatedClient, Client], + body: WorkitemsListPatchRequest, + workflow_action: Union[Unset, str] = UNSET, +) -> Response[Any]: + """Updates a list of Work Items in the Global context. + + Args: + workflow_action (Union[Unset, str]): + body (WorkitemsListPatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + body=body, + workflow_action=workflow_action, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], + body: WorkitemsListPatchRequest, + workflow_action: Union[Unset, str] = UNSET, +) -> Response[Any]: + """Updates a list of Work Items in the Global context. + + Args: + workflow_action (Union[Unset, str]): + body (WorkitemsListPatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + body=body, + workflow_action=workflow_action, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/work_items/patch_work_item.py b/polarion_rest_api_client/open_api_client/api/work_items/patch_work_item.py index 53803434..dcc04960 100644 --- a/polarion_rest_api_client/open_api_client/api/work_items/patch_work_item.py +++ b/polarion_rest_api_client/open_api_client/api/work_items/patch_work_item.py @@ -18,30 +18,39 @@ def _get_kwargs( project_id: str, work_item_id: str, *, - json_body: WorkitemsSinglePatchRequest, - workflow_action: Union[Unset, None, str] = UNSET, + body: WorkitemsSinglePatchRequest, + workflow_action: Union[Unset, str] = UNSET, + change_type_to: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} params: Dict[str, Any] = {} + params["workflowAction"] = workflow_action + params["changeTypeTo"] = change_type_to + params = { k: v for k, v in params.items() if v is not UNSET and v is not None } - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "patch", "url": "/projects/{projectId}/workitems/{workItemId}".format( projectId=project_id, workItemId=work_item_id, ), - "json": json_json_body, "params": params, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -88,35 +97,33 @@ def sync_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: WorkitemsSinglePatchRequest, - workflow_action: Union[Unset, None, str] = UNSET, + body: WorkitemsSinglePatchRequest, + workflow_action: Union[Unset, str] = UNSET, + change_type_to: Union[Unset, str] = UNSET, ) -> Response[Any]: - """Updates the specified instance. - - Parameters - ---------- - project_id : str - work_item_id : str - workflow_action : Union[Unset, None, str] - json_body : WorkitemsSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Updates the specified Work Item. + + Args: + project_id (str): + work_item_id (str): + workflow_action (Union[Unset, str]): + change_type_to (Union[Unset, str]): + body (WorkitemsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( project_id=project_id, work_item_id=work_item_id, - json_body=json_body, + body=body, workflow_action=workflow_action, + change_type_to=change_type_to, ) response = client.get_httpx_client().request( @@ -131,35 +138,33 @@ async def asyncio_detailed( work_item_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: WorkitemsSinglePatchRequest, - workflow_action: Union[Unset, None, str] = UNSET, + body: WorkitemsSinglePatchRequest, + workflow_action: Union[Unset, str] = UNSET, + change_type_to: Union[Unset, str] = UNSET, ) -> Response[Any]: - """Updates the specified instance. - - Parameters - ---------- - project_id : str - work_item_id : str - workflow_action : Union[Unset, None, str] - json_body : WorkitemsSinglePatchRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Any] + """Updates the specified Work Item. + + Args: + project_id (str): + work_item_id (str): + workflow_action (Union[Unset, str]): + change_type_to (Union[Unset, str]): + body (WorkitemsSinglePatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] """ kwargs = _get_kwargs( project_id=project_id, work_item_id=work_item_id, - json_body=json_body, + body=body, workflow_action=workflow_action, + change_type_to=change_type_to, ) response = await client.get_async_httpx_client().request(**kwargs) diff --git a/polarion_rest_api_client/open_api_client/api/work_items/patch_work_item_relationships.py b/polarion_rest_api_client/open_api_client/api/work_items/patch_work_item_relationships.py new file mode 100644 index 00000000..79e7616f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_items/patch_work_item_relationships.py @@ -0,0 +1,168 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.relationship_data_list_request import ( + RelationshipDataListRequest, +) +from ...models.relationship_data_single_request import ( + RelationshipDataSingleRequest, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + relationship_id: str, + *, + body: Union[ + "RelationshipDataListRequest", "RelationshipDataSingleRequest" + ], +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "patch", + "url": "/projects/{projectId}/workitems/{workItemId}/relationships/{relationshipId}".format( + projectId=project_id, + workItemId=work_item_id, + relationshipId=relationship_id, + ), + } + + _body: Dict[str, Any] + if isinstance(body, RelationshipDataSingleRequest): + _body = body.to_dict() + else: + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + work_item_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: Union[ + "RelationshipDataListRequest", "RelationshipDataSingleRequest" + ], +) -> Response[Any]: + """Updates a list of Work Item Relationships. + + Args: + project_id (str): + work_item_id (str): + relationship_id (str): + body (Union['RelationshipDataListRequest', 'RelationshipDataSingleRequest']): List of + generic contents Example: {'data': [{'type': 'plans', 'id': 'MyProjectId/MyResourceId'}]}. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + relationship_id=relationship_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: Union[ + "RelationshipDataListRequest", "RelationshipDataSingleRequest" + ], +) -> Response[Any]: + """Updates a list of Work Item Relationships. + + Args: + project_id (str): + work_item_id (str): + relationship_id (str): + body (Union['RelationshipDataListRequest', 'RelationshipDataSingleRequest']): List of + generic contents Example: {'data': [{'type': 'plans', 'id': 'MyProjectId/MyResourceId'}]}. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + relationship_id=relationship_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/work_items/patch_work_items.py b/polarion_rest_api_client/open_api_client/api/work_items/patch_work_items.py new file mode 100644 index 00000000..dd248a25 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_items/patch_work_items.py @@ -0,0 +1,162 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.workitems_list_patch_request import WorkitemsListPatchRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: str, + *, + body: WorkitemsListPatchRequest, + workflow_action: Union[Unset, str] = UNSET, + change_type_to: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + params: Dict[str, Any] = {} + + params["workflowAction"] = workflow_action + + params["changeTypeTo"] = change_type_to + + 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": "/projects/{projectId}/workitems".format( + projectId=project_id, + ), + "params": params, + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.CONFLICT: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: WorkitemsListPatchRequest, + workflow_action: Union[Unset, str] = UNSET, + change_type_to: Union[Unset, str] = UNSET, +) -> Response[Any]: + """Updates a list of Work Items. + + Args: + project_id (str): + workflow_action (Union[Unset, str]): + change_type_to (Union[Unset, str]): + body (WorkitemsListPatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + body=body, + workflow_action=workflow_action, + change_type_to=change_type_to, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: WorkitemsListPatchRequest, + workflow_action: Union[Unset, str] = UNSET, + change_type_to: Union[Unset, str] = UNSET, +) -> Response[Any]: + """Updates a list of Work Items. + + Args: + project_id (str): + workflow_action (Union[Unset, str]): + change_type_to (Union[Unset, str]): + body (WorkitemsListPatchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + body=body, + workflow_action=workflow_action, + change_type_to=change_type_to, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/work_items/post_work_item_relationships.py b/polarion_rest_api_client/open_api_client/api/work_items/post_work_item_relationships.py new file mode 100644 index 00000000..e7649006 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/api/work_items/post_work_item_relationships.py @@ -0,0 +1,170 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.relationship_data_list_request import ( + RelationshipDataListRequest, +) +from ...models.relationship_data_single_request import ( + RelationshipDataSingleRequest, +) +from ...types import Response + + +def _get_kwargs( + project_id: str, + work_item_id: str, + relationship_id: str, + *, + body: Union[ + "RelationshipDataListRequest", "RelationshipDataSingleRequest" + ], +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/projects/{projectId}/workitems/{workItemId}/relationships/{relationshipId}".format( + projectId=project_id, + workItemId=work_item_id, + relationshipId=relationship_id, + ), + } + + _body: Dict[str, Any] + if isinstance(body, RelationshipDataSingleRequest): + _body = body.to_dict() + else: + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Any]: + if response.status_code == HTTPStatus.NO_CONTENT: + return None + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.NOT_ACCEPTABLE: + return None + if response.status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: + return None + if response.status_code == HTTPStatus.UNSUPPORTED_MEDIA_TYPE: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.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( + project_id: str, + work_item_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: Union[ + "RelationshipDataListRequest", "RelationshipDataSingleRequest" + ], +) -> Response[Any]: + """Creates a list of Work Item Relationships. + + Args: + project_id (str): + work_item_id (str): + relationship_id (str): + body (Union['RelationshipDataListRequest', 'RelationshipDataSingleRequest']): List of + generic contents Example: {'data': [{'type': 'plans', 'id': 'MyProjectId/MyResourceId'}]}. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + relationship_id=relationship_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + work_item_id: str, + relationship_id: str, + *, + client: Union[AuthenticatedClient, Client], + body: Union[ + "RelationshipDataListRequest", "RelationshipDataSingleRequest" + ], +) -> Response[Any]: + """Creates a list of Work Item Relationships. + + Args: + project_id (str): + work_item_id (str): + relationship_id (str): + body (Union['RelationshipDataListRequest', 'RelationshipDataSingleRequest']): List of + generic contents Example: {'data': [{'type': 'plans', 'id': 'MyProjectId/MyResourceId'}]}. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + work_item_id=work_item_id, + relationship_id=relationship_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/polarion_rest_api_client/open_api_client/api/work_items/post_work_items.py b/polarion_rest_api_client/open_api_client/api/work_items/post_work_items.py index 7d9e7291..5d2fa8dc 100644 --- a/polarion_rest_api_client/open_api_client/api/work_items/post_work_items.py +++ b/polarion_rest_api_client/open_api_client/api/work_items/post_work_items.py @@ -16,20 +16,25 @@ def _get_kwargs( project_id: str, *, - json_body: WorkitemsListPostRequest, + body: WorkitemsListPostRequest, ) -> Dict[str, Any]: - pass + headers: Dict[str, Any] = {} - json_json_body = json_body.to_dict() - - return { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/projects/{projectId}/workitems".format( projectId=project_id, ), - "json": json_json_body, } + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response @@ -89,30 +94,25 @@ def sync_detailed( project_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: WorkitemsListPostRequest, + body: WorkitemsListPostRequest, ) -> Response[Union[Any, WorkitemsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - json_body : WorkitemsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemsListPostResponse]] + """Creates a list of Work Items. + + Args: + project_id (str): + body (WorkitemsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, - json_body=json_body, + body=body, ) response = client.get_httpx_client().request( @@ -126,31 +126,26 @@ def sync( project_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: WorkitemsListPostRequest, + body: WorkitemsListPostRequest, ) -> Optional[Union[Any, WorkitemsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - json_body : WorkitemsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemsListPostResponse] + """Creates a list of Work Items. + + Args: + project_id (str): + body (WorkitemsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemsListPostResponse] """ return sync_detailed( project_id=project_id, client=client, - json_body=json_body, + body=body, ).parsed @@ -158,30 +153,25 @@ async def asyncio_detailed( project_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: WorkitemsListPostRequest, + body: WorkitemsListPostRequest, ) -> Response[Union[Any, WorkitemsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - json_body : WorkitemsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Response[Union[Any, WorkitemsListPostResponse]] + """Creates a list of Work Items. + + Args: + project_id (str): + body (WorkitemsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, WorkitemsListPostResponse]] """ kwargs = _get_kwargs( project_id=project_id, - json_body=json_body, + body=body, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -193,31 +183,26 @@ async def asyncio( project_id: str, *, client: Union[AuthenticatedClient, Client], - json_body: WorkitemsListPostRequest, + body: WorkitemsListPostRequest, ) -> Optional[Union[Any, WorkitemsListPostResponse]]: - """Creates a list of instances. - - Parameters - ---------- - project_id : str - json_body : WorkitemsListPostRequest - - Raises - ------ - errors.UnexpectedStatus - If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException - If the request takes longer than Client.timeout. - - Returns - ------- - Union[Any, WorkitemsListPostResponse] + """Creates a list of Work Items. + + Args: + project_id (str): + body (WorkitemsListPostRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, WorkitemsListPostResponse] """ return ( await asyncio_detailed( project_id=project_id, client=client, - json_body=json_body, + body=body, ) ).parsed diff --git a/polarion_rest_api_client/open_api_client/client.py b/polarion_rest_api_client/open_api_client/client.py index d6ce4182..788c14bb 100644 --- a/polarion_rest_api_client/open_api_client/client.py +++ b/polarion_rest_api_client/open_api_client/client.py @@ -31,12 +31,10 @@ class Client: ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor. - Attributes - ---------- - raise_on_unexpected_status : bool - 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. + 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) @@ -174,18 +172,13 @@ class AuthenticatedClient: ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor. - Attributes - ---------- - raise_on_unexpected_status : bool - 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 : str - The token to use for authentication - prefix : str - The prefix to use for the Authorization header - auth_header_name : str - The name of the Authorization header + 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) diff --git a/polarion_rest_api_client/open_api_client/models/__init__.py b/polarion_rest_api_client/open_api_client/models/__init__.py index f40e2c0d..b4f12fe6 100644 --- a/polarion_rest_api_client/open_api_client/models/__init__.py +++ b/polarion_rest_api_client/open_api_client/models/__init__.py @@ -3,7 +3,15 @@ """Contains all the data models used in inputs/outputs.""" from .branch_document_request_body import BranchDocumentRequestBody +from .branch_documents_request_body import BranchDocumentsRequestBody +from .branch_documents_request_body_document_configurations_item import ( + BranchDocumentsRequestBodyDocumentConfigurationsItem, +) from .copy_document_request_body import CopyDocumentRequestBody +from .create_project_request_body import CreateProjectRequestBody +from .create_project_request_body_params_type_0 import ( + CreateProjectRequestBodyParamsType0, +) from .document_attachments_list_get_response import ( DocumentAttachmentsListGetResponse, ) @@ -25,6 +33,9 @@ from .document_attachments_list_get_response_data_item_meta_errors_item_source import ( DocumentAttachmentsListGetResponseDataItemMetaErrorsItemSource, ) +from .document_attachments_list_get_response_data_item_meta_errors_item_source_resource import ( + DocumentAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, +) from .document_attachments_list_get_response_data_item_relationships import ( DocumentAttachmentsListGetResponseDataItemRelationships, ) @@ -103,6 +114,9 @@ from .document_attachments_single_get_response_data_meta_errors_item_source import ( DocumentAttachmentsSingleGetResponseDataMetaErrorsItemSource, ) +from .document_attachments_single_get_response_data_meta_errors_item_source_resource import ( + DocumentAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, +) from .document_attachments_single_get_response_data_relationships import ( DocumentAttachmentsSingleGetResponseDataRelationships, ) @@ -172,6 +186,9 @@ from .document_comments_list_get_response_data_item_meta_errors_item_source import ( DocumentCommentsListGetResponseDataItemMetaErrorsItemSource, ) +from .document_comments_list_get_response_data_item_meta_errors_item_source_resource import ( + DocumentCommentsListGetResponseDataItemMetaErrorsItemSourceResource, +) from .document_comments_list_get_response_data_item_relationships import ( DocumentCommentsListGetResponseDataItemRelationships, ) @@ -304,6 +321,9 @@ from .document_comments_single_get_response_data_meta_errors_item_source import ( DocumentCommentsSingleGetResponseDataMetaErrorsItemSource, ) +from .document_comments_single_get_response_data_meta_errors_item_source_resource import ( + DocumentCommentsSingleGetResponseDataMetaErrorsItemSourceResource, +) from .document_comments_single_get_response_data_relationships import ( DocumentCommentsSingleGetResponseDataRelationships, ) @@ -386,6 +406,9 @@ from .document_parts_list_get_response_data_item_meta_errors_item_source import ( DocumentPartsListGetResponseDataItemMetaErrorsItemSource, ) +from .document_parts_list_get_response_data_item_meta_errors_item_source_resource import ( + DocumentPartsListGetResponseDataItemMetaErrorsItemSourceResource, +) from .document_parts_list_get_response_data_item_relationships import ( DocumentPartsListGetResponseDataItemRelationships, ) @@ -497,6 +520,9 @@ from .document_parts_single_get_response_data_meta_errors_item_source import ( DocumentPartsSingleGetResponseDataMetaErrorsItemSource, ) +from .document_parts_single_get_response_data_meta_errors_item_source_resource import ( + DocumentPartsSingleGetResponseDataMetaErrorsItemSourceResource, +) from .document_parts_single_get_response_data_relationships import ( DocumentPartsSingleGetResponseDataRelationships, ) @@ -603,6 +629,9 @@ from .documents_single_get_response_data_meta_errors_item_source import ( DocumentsSingleGetResponseDataMetaErrorsItemSource, ) +from .documents_single_get_response_data_meta_errors_item_source_resource import ( + DocumentsSingleGetResponseDataMetaErrorsItemSourceResource, +) from .documents_single_get_response_data_relationships import ( DocumentsSingleGetResponseDataRelationships, ) @@ -746,6 +775,90 @@ from .documents_single_post_response_data_attributes_rendering_layouts_item_properties_item import ( DocumentsSinglePostResponseDataAttributesRenderingLayoutsItemPropertiesItem, ) +from .documents_single_post_response_data_links import ( + DocumentsSinglePostResponseDataLinks, +) +from .documents_single_post_response_data_relationships import ( + DocumentsSinglePostResponseDataRelationships, +) +from .documents_single_post_response_data_relationships_attachments import ( + DocumentsSinglePostResponseDataRelationshipsAttachments, +) +from .documents_single_post_response_data_relationships_attachments_data_item import ( + DocumentsSinglePostResponseDataRelationshipsAttachmentsDataItem, +) +from .documents_single_post_response_data_relationships_attachments_data_item_type import ( + DocumentsSinglePostResponseDataRelationshipsAttachmentsDataItemType, +) +from .documents_single_post_response_data_relationships_attachments_links import ( + DocumentsSinglePostResponseDataRelationshipsAttachmentsLinks, +) +from .documents_single_post_response_data_relationships_author import ( + DocumentsSinglePostResponseDataRelationshipsAuthor, +) +from .documents_single_post_response_data_relationships_author_data import ( + DocumentsSinglePostResponseDataRelationshipsAuthorData, +) +from .documents_single_post_response_data_relationships_author_data_type import ( + DocumentsSinglePostResponseDataRelationshipsAuthorDataType, +) +from .documents_single_post_response_data_relationships_branched_from import ( + DocumentsSinglePostResponseDataRelationshipsBranchedFrom, +) +from .documents_single_post_response_data_relationships_branched_from_data import ( + DocumentsSinglePostResponseDataRelationshipsBranchedFromData, +) +from .documents_single_post_response_data_relationships_branched_from_data_type import ( + DocumentsSinglePostResponseDataRelationshipsBranchedFromDataType, +) +from .documents_single_post_response_data_relationships_comments import ( + DocumentsSinglePostResponseDataRelationshipsComments, +) +from .documents_single_post_response_data_relationships_comments_data_item import ( + DocumentsSinglePostResponseDataRelationshipsCommentsDataItem, +) +from .documents_single_post_response_data_relationships_comments_data_item_type import ( + DocumentsSinglePostResponseDataRelationshipsCommentsDataItemType, +) +from .documents_single_post_response_data_relationships_comments_links import ( + DocumentsSinglePostResponseDataRelationshipsCommentsLinks, +) +from .documents_single_post_response_data_relationships_derived_from import ( + DocumentsSinglePostResponseDataRelationshipsDerivedFrom, +) +from .documents_single_post_response_data_relationships_derived_from_data import ( + DocumentsSinglePostResponseDataRelationshipsDerivedFromData, +) +from .documents_single_post_response_data_relationships_derived_from_data_type import ( + DocumentsSinglePostResponseDataRelationshipsDerivedFromDataType, +) +from .documents_single_post_response_data_relationships_project import ( + DocumentsSinglePostResponseDataRelationshipsProject, +) +from .documents_single_post_response_data_relationships_project_data import ( + DocumentsSinglePostResponseDataRelationshipsProjectData, +) +from .documents_single_post_response_data_relationships_project_data_type import ( + DocumentsSinglePostResponseDataRelationshipsProjectDataType, +) +from .documents_single_post_response_data_relationships_updated_by import ( + DocumentsSinglePostResponseDataRelationshipsUpdatedBy, +) +from .documents_single_post_response_data_relationships_updated_by_data import ( + DocumentsSinglePostResponseDataRelationshipsUpdatedByData, +) +from .documents_single_post_response_data_relationships_updated_by_data_type import ( + DocumentsSinglePostResponseDataRelationshipsUpdatedByDataType, +) +from .documents_single_post_response_data_relationships_variant import ( + DocumentsSinglePostResponseDataRelationshipsVariant, +) +from .documents_single_post_response_data_relationships_variant_data import ( + DocumentsSinglePostResponseDataRelationshipsVariantData, +) +from .documents_single_post_response_data_relationships_variant_data_type import ( + DocumentsSinglePostResponseDataRelationshipsVariantDataType, +) from .documents_single_post_response_data_type import ( DocumentsSinglePostResponseDataType, ) @@ -804,6 +917,9 @@ from .enumerations_single_get_response_data_meta_errors_item_source import ( EnumerationsSingleGetResponseDataMetaErrorsItemSource, ) +from .enumerations_single_get_response_data_meta_errors_item_source_resource import ( + EnumerationsSingleGetResponseDataMetaErrorsItemSourceResource, +) from .enumerations_single_get_response_data_type import ( EnumerationsSingleGetResponseDataType, ) @@ -829,6 +945,209 @@ from .errors import Errors from .errors_errors_item import ErrorsErrorsItem from .errors_errors_item_source import ErrorsErrorsItemSource +from .errors_errors_item_source_resource import ErrorsErrorsItemSourceResource +from .export_test_cases_request_body import ExportTestCasesRequestBody +from .externallylinkedworkitems_list_delete_request import ( + ExternallylinkedworkitemsListDeleteRequest, +) +from .externallylinkedworkitems_list_delete_request_data_item import ( + ExternallylinkedworkitemsListDeleteRequestDataItem, +) +from .externallylinkedworkitems_list_delete_request_data_item_type import ( + ExternallylinkedworkitemsListDeleteRequestDataItemType, +) +from .externallylinkedworkitems_list_get_response import ( + ExternallylinkedworkitemsListGetResponse, +) +from .externallylinkedworkitems_list_get_response_data_item import ( + ExternallylinkedworkitemsListGetResponseDataItem, +) +from .externallylinkedworkitems_list_get_response_data_item_attributes import ( + ExternallylinkedworkitemsListGetResponseDataItemAttributes, +) +from .externallylinkedworkitems_list_get_response_data_item_links import ( + ExternallylinkedworkitemsListGetResponseDataItemLinks, +) +from .externallylinkedworkitems_list_get_response_data_item_meta import ( + ExternallylinkedworkitemsListGetResponseDataItemMeta, +) +from .externallylinkedworkitems_list_get_response_data_item_meta_errors_item import ( + ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItem, +) +from .externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source import ( + ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSource, +) +from .externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source_resource import ( + ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource, +) +from .externallylinkedworkitems_list_get_response_data_item_type import ( + ExternallylinkedworkitemsListGetResponseDataItemType, +) +from .externallylinkedworkitems_list_get_response_included_item import ( + ExternallylinkedworkitemsListGetResponseIncludedItem, +) +from .externallylinkedworkitems_list_get_response_links import ( + ExternallylinkedworkitemsListGetResponseLinks, +) +from .externallylinkedworkitems_list_get_response_meta import ( + ExternallylinkedworkitemsListGetResponseMeta, +) +from .externallylinkedworkitems_list_post_request import ( + ExternallylinkedworkitemsListPostRequest, +) +from .externallylinkedworkitems_list_post_request_data_item import ( + ExternallylinkedworkitemsListPostRequestDataItem, +) +from .externallylinkedworkitems_list_post_request_data_item_attributes import ( + ExternallylinkedworkitemsListPostRequestDataItemAttributes, +) +from .externallylinkedworkitems_list_post_request_data_item_type import ( + ExternallylinkedworkitemsListPostRequestDataItemType, +) +from .externallylinkedworkitems_list_post_response import ( + ExternallylinkedworkitemsListPostResponse, +) +from .externallylinkedworkitems_list_post_response_data_item import ( + ExternallylinkedworkitemsListPostResponseDataItem, +) +from .externallylinkedworkitems_list_post_response_data_item_links import ( + ExternallylinkedworkitemsListPostResponseDataItemLinks, +) +from .externallylinkedworkitems_list_post_response_data_item_type import ( + ExternallylinkedworkitemsListPostResponseDataItemType, +) +from .externallylinkedworkitems_single_get_response import ( + ExternallylinkedworkitemsSingleGetResponse, +) +from .externallylinkedworkitems_single_get_response_data import ( + ExternallylinkedworkitemsSingleGetResponseData, +) +from .externallylinkedworkitems_single_get_response_data_attributes import ( + ExternallylinkedworkitemsSingleGetResponseDataAttributes, +) +from .externallylinkedworkitems_single_get_response_data_links import ( + ExternallylinkedworkitemsSingleGetResponseDataLinks, +) +from .externallylinkedworkitems_single_get_response_data_meta import ( + ExternallylinkedworkitemsSingleGetResponseDataMeta, +) +from .externallylinkedworkitems_single_get_response_data_meta_errors_item import ( + ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItem, +) +from .externallylinkedworkitems_single_get_response_data_meta_errors_item_source import ( + ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSource, +) +from .externallylinkedworkitems_single_get_response_data_meta_errors_item_source_resource import ( + ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource, +) +from .externallylinkedworkitems_single_get_response_data_type import ( + ExternallylinkedworkitemsSingleGetResponseDataType, +) +from .externallylinkedworkitems_single_get_response_included_item import ( + ExternallylinkedworkitemsSingleGetResponseIncludedItem, +) +from .externallylinkedworkitems_single_get_response_links import ( + ExternallylinkedworkitemsSingleGetResponseLinks, +) +from .featureselections_list_get_response import ( + FeatureselectionsListGetResponse, +) +from .featureselections_list_get_response_data_item import ( + FeatureselectionsListGetResponseDataItem, +) +from .featureselections_list_get_response_data_item_attributes import ( + FeatureselectionsListGetResponseDataItemAttributes, +) +from .featureselections_list_get_response_data_item_attributes_selection_type import ( + FeatureselectionsListGetResponseDataItemAttributesSelectionType, +) +from .featureselections_list_get_response_data_item_links import ( + FeatureselectionsListGetResponseDataItemLinks, +) +from .featureselections_list_get_response_data_item_meta import ( + FeatureselectionsListGetResponseDataItemMeta, +) +from .featureselections_list_get_response_data_item_meta_errors_item import ( + FeatureselectionsListGetResponseDataItemMetaErrorsItem, +) +from .featureselections_list_get_response_data_item_meta_errors_item_source import ( + FeatureselectionsListGetResponseDataItemMetaErrorsItemSource, +) +from .featureselections_list_get_response_data_item_meta_errors_item_source_resource import ( + FeatureselectionsListGetResponseDataItemMetaErrorsItemSourceResource, +) +from .featureselections_list_get_response_data_item_relationships import ( + FeatureselectionsListGetResponseDataItemRelationships, +) +from .featureselections_list_get_response_data_item_relationships_work_item import ( + FeatureselectionsListGetResponseDataItemRelationshipsWorkItem, +) +from .featureselections_list_get_response_data_item_relationships_work_item_data import ( + FeatureselectionsListGetResponseDataItemRelationshipsWorkItemData, +) +from .featureselections_list_get_response_data_item_relationships_work_item_data_type import ( + FeatureselectionsListGetResponseDataItemRelationshipsWorkItemDataType, +) +from .featureselections_list_get_response_data_item_type import ( + FeatureselectionsListGetResponseDataItemType, +) +from .featureselections_list_get_response_included_item import ( + FeatureselectionsListGetResponseIncludedItem, +) +from .featureselections_list_get_response_links import ( + FeatureselectionsListGetResponseLinks, +) +from .featureselections_list_get_response_meta import ( + FeatureselectionsListGetResponseMeta, +) +from .featureselections_single_get_response import ( + FeatureselectionsSingleGetResponse, +) +from .featureselections_single_get_response_data import ( + FeatureselectionsSingleGetResponseData, +) +from .featureselections_single_get_response_data_attributes import ( + FeatureselectionsSingleGetResponseDataAttributes, +) +from .featureselections_single_get_response_data_attributes_selection_type import ( + FeatureselectionsSingleGetResponseDataAttributesSelectionType, +) +from .featureselections_single_get_response_data_links import ( + FeatureselectionsSingleGetResponseDataLinks, +) +from .featureselections_single_get_response_data_meta import ( + FeatureselectionsSingleGetResponseDataMeta, +) +from .featureselections_single_get_response_data_meta_errors_item import ( + FeatureselectionsSingleGetResponseDataMetaErrorsItem, +) +from .featureselections_single_get_response_data_meta_errors_item_source import ( + FeatureselectionsSingleGetResponseDataMetaErrorsItemSource, +) +from .featureselections_single_get_response_data_meta_errors_item_source_resource import ( + FeatureselectionsSingleGetResponseDataMetaErrorsItemSourceResource, +) +from .featureselections_single_get_response_data_relationships import ( + FeatureselectionsSingleGetResponseDataRelationships, +) +from .featureselections_single_get_response_data_relationships_work_item import ( + FeatureselectionsSingleGetResponseDataRelationshipsWorkItem, +) +from .featureselections_single_get_response_data_relationships_work_item_data import ( + FeatureselectionsSingleGetResponseDataRelationshipsWorkItemData, +) +from .featureselections_single_get_response_data_relationships_work_item_data_type import ( + FeatureselectionsSingleGetResponseDataRelationshipsWorkItemDataType, +) +from .featureselections_single_get_response_data_type import ( + FeatureselectionsSingleGetResponseDataType, +) +from .featureselections_single_get_response_included_item import ( + FeatureselectionsSingleGetResponseIncludedItem, +) +from .featureselections_single_get_response_links import ( + FeatureselectionsSingleGetResponseLinks, +) from .globalroles_single_get_response import GlobalrolesSingleGetResponse from .globalroles_single_get_response_data import ( GlobalrolesSingleGetResponseData, @@ -845,6 +1164,9 @@ from .globalroles_single_get_response_data_meta_errors_item_source import ( GlobalrolesSingleGetResponseDataMetaErrorsItemSource, ) +from .globalroles_single_get_response_data_meta_errors_item_source_resource import ( + GlobalrolesSingleGetResponseDataMetaErrorsItemSourceResource, +) from .globalroles_single_get_response_data_relationships import ( GlobalrolesSingleGetResponseDataRelationships, ) @@ -886,6 +1208,9 @@ from .icons_list_get_response_data_item_meta_errors_item_source import ( IconsListGetResponseDataItemMetaErrorsItemSource, ) +from .icons_list_get_response_data_item_meta_errors_item_source_resource import ( + IconsListGetResponseDataItemMetaErrorsItemSourceResource, +) from .icons_list_get_response_data_item_type import ( IconsListGetResponseDataItemType, ) @@ -894,6 +1219,19 @@ ) from .icons_list_get_response_links import IconsListGetResponseLinks from .icons_list_get_response_meta import IconsListGetResponseMeta +from .icons_list_post_request import IconsListPostRequest +from .icons_list_post_request_data_item import IconsListPostRequestDataItem +from .icons_list_post_request_data_item_type import ( + IconsListPostRequestDataItemType, +) +from .icons_list_post_response import IconsListPostResponse +from .icons_list_post_response_data_item import IconsListPostResponseDataItem +from .icons_list_post_response_data_item_links import ( + IconsListPostResponseDataItemLinks, +) +from .icons_list_post_response_data_item_type import ( + IconsListPostResponseDataItemType, +) from .icons_single_get_response import IconsSingleGetResponse from .icons_single_get_response_data import IconsSingleGetResponseData from .icons_single_get_response_data_attributes import ( @@ -909,11 +1247,81 @@ from .icons_single_get_response_data_meta_errors_item_source import ( IconsSingleGetResponseDataMetaErrorsItemSource, ) +from .icons_single_get_response_data_meta_errors_item_source_resource import ( + IconsSingleGetResponseDataMetaErrorsItemSourceResource, +) from .icons_single_get_response_data_type import IconsSingleGetResponseDataType from .icons_single_get_response_included_item import ( IconsSingleGetResponseIncludedItem, ) from .icons_single_get_response_links import IconsSingleGetResponseLinks +from .import_test_results_request_body import ImportTestResultsRequestBody +from .linkedoslcresources_list_delete_request import ( + LinkedoslcresourcesListDeleteRequest, +) +from .linkedoslcresources_list_delete_request_data_item import ( + LinkedoslcresourcesListDeleteRequestDataItem, +) +from .linkedoslcresources_list_delete_request_data_item_type import ( + LinkedoslcresourcesListDeleteRequestDataItemType, +) +from .linkedoslcresources_list_get_response import ( + LinkedoslcresourcesListGetResponse, +) +from .linkedoslcresources_list_get_response_data_item import ( + LinkedoslcresourcesListGetResponseDataItem, +) +from .linkedoslcresources_list_get_response_data_item_attributes import ( + LinkedoslcresourcesListGetResponseDataItemAttributes, +) +from .linkedoslcresources_list_get_response_data_item_links import ( + LinkedoslcresourcesListGetResponseDataItemLinks, +) +from .linkedoslcresources_list_get_response_data_item_meta import ( + LinkedoslcresourcesListGetResponseDataItemMeta, +) +from .linkedoslcresources_list_get_response_data_item_meta_errors_item import ( + LinkedoslcresourcesListGetResponseDataItemMetaErrorsItem, +) +from .linkedoslcresources_list_get_response_data_item_meta_errors_item_source import ( + LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSource, +) +from .linkedoslcresources_list_get_response_data_item_meta_errors_item_source_resource import ( + LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSourceResource, +) +from .linkedoslcresources_list_get_response_data_item_type import ( + LinkedoslcresourcesListGetResponseDataItemType, +) +from .linkedoslcresources_list_get_response_included_item import ( + LinkedoslcresourcesListGetResponseIncludedItem, +) +from .linkedoslcresources_list_get_response_meta import ( + LinkedoslcresourcesListGetResponseMeta, +) +from .linkedoslcresources_list_post_request import ( + LinkedoslcresourcesListPostRequest, +) +from .linkedoslcresources_list_post_request_data_item import ( + LinkedoslcresourcesListPostRequestDataItem, +) +from .linkedoslcresources_list_post_request_data_item_attributes import ( + LinkedoslcresourcesListPostRequestDataItemAttributes, +) +from .linkedoslcresources_list_post_request_data_item_type import ( + LinkedoslcresourcesListPostRequestDataItemType, +) +from .linkedoslcresources_list_post_response import ( + LinkedoslcresourcesListPostResponse, +) +from .linkedoslcresources_list_post_response_data_item import ( + LinkedoslcresourcesListPostResponseDataItem, +) +from .linkedoslcresources_list_post_response_data_item_links import ( + LinkedoslcresourcesListPostResponseDataItemLinks, +) +from .linkedoslcresources_list_post_response_data_item_type import ( + LinkedoslcresourcesListPostResponseDataItemType, +) from .linkedworkitems_list_delete_request import ( LinkedworkitemsListDeleteRequest, ) @@ -942,6 +1350,9 @@ from .linkedworkitems_list_get_response_data_item_meta_errors_item_source import ( LinkedworkitemsListGetResponseDataItemMetaErrorsItemSource, ) +from .linkedworkitems_list_get_response_data_item_meta_errors_item_source_resource import ( + LinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource, +) from .linkedworkitems_list_get_response_data_item_relationships import ( LinkedworkitemsListGetResponseDataItemRelationships, ) @@ -1019,6 +1430,9 @@ from .linkedworkitems_single_get_response_data_meta_errors_item_source import ( LinkedworkitemsSingleGetResponseDataMetaErrorsItemSource, ) +from .linkedworkitems_single_get_response_data_meta_errors_item_source_resource import ( + LinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource, +) from .linkedworkitems_single_get_response_data_relationships import ( LinkedworkitemsSingleGetResponseDataRelationships, ) @@ -1052,6 +1466,7 @@ from .linkedworkitems_single_patch_request_data_type import ( LinkedworkitemsSinglePatchRequestDataType, ) +from .move_project_request_body import MoveProjectRequestBody from .move_work_item_to_document_request_body import ( MoveWorkItemToDocumentRequestBody, ) @@ -1098,6 +1513,9 @@ from .page_attachments_single_get_response_data_meta_errors_item_source import ( PageAttachmentsSingleGetResponseDataMetaErrorsItemSource, ) +from .page_attachments_single_get_response_data_meta_errors_item_source_resource import ( + PageAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, +) from .page_attachments_single_get_response_data_relationships import ( PageAttachmentsSingleGetResponseDataRelationships, ) @@ -1143,6 +1561,9 @@ from .pages_single_get_response_data_meta_errors_item_source import ( PagesSingleGetResponseDataMetaErrorsItemSource, ) +from .pages_single_get_response_data_meta_errors_item_source_resource import ( + PagesSingleGetResponseDataMetaErrorsItemSourceResource, +) from .pages_single_get_response_data_relationships import ( PagesSingleGetResponseDataRelationships, ) @@ -1202,13 +1623,362 @@ from .patch_document_attachments_request_body import ( PatchDocumentAttachmentsRequestBody, ) +from .patch_test_run_attachments_request_body import ( + PatchTestRunAttachmentsRequestBody, +) from .patch_work_item_attachments_request_body import ( PatchWorkItemAttachmentsRequestBody, ) +from .plans_list_delete_request import PlansListDeleteRequest +from .plans_list_delete_request_data_item import PlansListDeleteRequestDataItem +from .plans_list_delete_request_data_item_type import ( + PlansListDeleteRequestDataItemType, +) +from .plans_list_get_response import PlansListGetResponse +from .plans_list_get_response_data_item import PlansListGetResponseDataItem +from .plans_list_get_response_data_item_attributes import ( + PlansListGetResponseDataItemAttributes, +) +from .plans_list_get_response_data_item_attributes_calculation_type import ( + PlansListGetResponseDataItemAttributesCalculationType, +) +from .plans_list_get_response_data_item_attributes_description import ( + PlansListGetResponseDataItemAttributesDescription, +) +from .plans_list_get_response_data_item_attributes_description_type import ( + PlansListGetResponseDataItemAttributesDescriptionType, +) +from .plans_list_get_response_data_item_attributes_home_page_content import ( + PlansListGetResponseDataItemAttributesHomePageContent, +) +from .plans_list_get_response_data_item_attributes_home_page_content_type import ( + PlansListGetResponseDataItemAttributesHomePageContentType, +) +from .plans_list_get_response_data_item_links import ( + PlansListGetResponseDataItemLinks, +) +from .plans_list_get_response_data_item_meta import ( + PlansListGetResponseDataItemMeta, +) +from .plans_list_get_response_data_item_meta_errors_item import ( + PlansListGetResponseDataItemMetaErrorsItem, +) +from .plans_list_get_response_data_item_meta_errors_item_source import ( + PlansListGetResponseDataItemMetaErrorsItemSource, +) +from .plans_list_get_response_data_item_meta_errors_item_source_resource import ( + PlansListGetResponseDataItemMetaErrorsItemSourceResource, +) +from .plans_list_get_response_data_item_relationships import ( + PlansListGetResponseDataItemRelationships, +) +from .plans_list_get_response_data_item_relationships_author import ( + PlansListGetResponseDataItemRelationshipsAuthor, +) +from .plans_list_get_response_data_item_relationships_author_data import ( + PlansListGetResponseDataItemRelationshipsAuthorData, +) +from .plans_list_get_response_data_item_relationships_author_data_type import ( + PlansListGetResponseDataItemRelationshipsAuthorDataType, +) +from .plans_list_get_response_data_item_relationships_parent import ( + PlansListGetResponseDataItemRelationshipsParent, +) +from .plans_list_get_response_data_item_relationships_parent_data import ( + PlansListGetResponseDataItemRelationshipsParentData, +) +from .plans_list_get_response_data_item_relationships_parent_data_type import ( + PlansListGetResponseDataItemRelationshipsParentDataType, +) +from .plans_list_get_response_data_item_relationships_project import ( + PlansListGetResponseDataItemRelationshipsProject, +) +from .plans_list_get_response_data_item_relationships_project_data import ( + PlansListGetResponseDataItemRelationshipsProjectData, +) +from .plans_list_get_response_data_item_relationships_project_data_type import ( + PlansListGetResponseDataItemRelationshipsProjectDataType, +) +from .plans_list_get_response_data_item_relationships_project_span import ( + PlansListGetResponseDataItemRelationshipsProjectSpan, +) +from .plans_list_get_response_data_item_relationships_project_span_data_item import ( + PlansListGetResponseDataItemRelationshipsProjectSpanDataItem, +) +from .plans_list_get_response_data_item_relationships_project_span_data_item_type import ( + PlansListGetResponseDataItemRelationshipsProjectSpanDataItemType, +) +from .plans_list_get_response_data_item_relationships_project_span_meta import ( + PlansListGetResponseDataItemRelationshipsProjectSpanMeta, +) +from .plans_list_get_response_data_item_relationships_template import ( + PlansListGetResponseDataItemRelationshipsTemplate, +) +from .plans_list_get_response_data_item_relationships_template_data import ( + PlansListGetResponseDataItemRelationshipsTemplateData, +) +from .plans_list_get_response_data_item_relationships_template_data_type import ( + PlansListGetResponseDataItemRelationshipsTemplateDataType, +) +from .plans_list_get_response_data_item_relationships_work_items import ( + PlansListGetResponseDataItemRelationshipsWorkItems, +) +from .plans_list_get_response_data_item_relationships_work_items_data_item import ( + PlansListGetResponseDataItemRelationshipsWorkItemsDataItem, +) +from .plans_list_get_response_data_item_relationships_work_items_data_item_type import ( + PlansListGetResponseDataItemRelationshipsWorkItemsDataItemType, +) +from .plans_list_get_response_data_item_relationships_work_items_meta import ( + PlansListGetResponseDataItemRelationshipsWorkItemsMeta, +) +from .plans_list_get_response_data_item_type import ( + PlansListGetResponseDataItemType, +) +from .plans_list_get_response_included_item import ( + PlansListGetResponseIncludedItem, +) +from .plans_list_get_response_links import PlansListGetResponseLinks +from .plans_list_get_response_meta import PlansListGetResponseMeta +from .plans_list_post_request import PlansListPostRequest +from .plans_list_post_request_data_item import PlansListPostRequestDataItem +from .plans_list_post_request_data_item_attributes import ( + PlansListPostRequestDataItemAttributes, +) +from .plans_list_post_request_data_item_attributes_calculation_type import ( + PlansListPostRequestDataItemAttributesCalculationType, +) +from .plans_list_post_request_data_item_attributes_description import ( + PlansListPostRequestDataItemAttributesDescription, +) +from .plans_list_post_request_data_item_attributes_description_type import ( + PlansListPostRequestDataItemAttributesDescriptionType, +) +from .plans_list_post_request_data_item_attributes_home_page_content import ( + PlansListPostRequestDataItemAttributesHomePageContent, +) +from .plans_list_post_request_data_item_attributes_home_page_content_type import ( + PlansListPostRequestDataItemAttributesHomePageContentType, +) +from .plans_list_post_request_data_item_relationships import ( + PlansListPostRequestDataItemRelationships, +) +from .plans_list_post_request_data_item_relationships_parent import ( + PlansListPostRequestDataItemRelationshipsParent, +) +from .plans_list_post_request_data_item_relationships_parent_data import ( + PlansListPostRequestDataItemRelationshipsParentData, +) +from .plans_list_post_request_data_item_relationships_parent_data_type import ( + PlansListPostRequestDataItemRelationshipsParentDataType, +) +from .plans_list_post_request_data_item_relationships_project_span import ( + PlansListPostRequestDataItemRelationshipsProjectSpan, +) +from .plans_list_post_request_data_item_relationships_project_span_data_item import ( + PlansListPostRequestDataItemRelationshipsProjectSpanDataItem, +) +from .plans_list_post_request_data_item_relationships_project_span_data_item_type import ( + PlansListPostRequestDataItemRelationshipsProjectSpanDataItemType, +) +from .plans_list_post_request_data_item_relationships_template import ( + PlansListPostRequestDataItemRelationshipsTemplate, +) +from .plans_list_post_request_data_item_relationships_template_data import ( + PlansListPostRequestDataItemRelationshipsTemplateData, +) +from .plans_list_post_request_data_item_relationships_template_data_type import ( + PlansListPostRequestDataItemRelationshipsTemplateDataType, +) +from .plans_list_post_request_data_item_relationships_work_items import ( + PlansListPostRequestDataItemRelationshipsWorkItems, +) +from .plans_list_post_request_data_item_relationships_work_items_data_item import ( + PlansListPostRequestDataItemRelationshipsWorkItemsDataItem, +) +from .plans_list_post_request_data_item_relationships_work_items_data_item_type import ( + PlansListPostRequestDataItemRelationshipsWorkItemsDataItemType, +) +from .plans_list_post_request_data_item_type import ( + PlansListPostRequestDataItemType, +) +from .plans_list_post_response import PlansListPostResponse +from .plans_list_post_response_data_item import PlansListPostResponseDataItem +from .plans_list_post_response_data_item_links import ( + PlansListPostResponseDataItemLinks, +) +from .plans_list_post_response_data_item_type import ( + PlansListPostResponseDataItemType, +) +from .plans_single_get_response import PlansSingleGetResponse +from .plans_single_get_response_data import PlansSingleGetResponseData +from .plans_single_get_response_data_attributes import ( + PlansSingleGetResponseDataAttributes, +) +from .plans_single_get_response_data_attributes_calculation_type import ( + PlansSingleGetResponseDataAttributesCalculationType, +) +from .plans_single_get_response_data_attributes_description import ( + PlansSingleGetResponseDataAttributesDescription, +) +from .plans_single_get_response_data_attributes_description_type import ( + PlansSingleGetResponseDataAttributesDescriptionType, +) +from .plans_single_get_response_data_attributes_home_page_content import ( + PlansSingleGetResponseDataAttributesHomePageContent, +) +from .plans_single_get_response_data_attributes_home_page_content_type import ( + PlansSingleGetResponseDataAttributesHomePageContentType, +) +from .plans_single_get_response_data_links import ( + PlansSingleGetResponseDataLinks, +) +from .plans_single_get_response_data_meta import PlansSingleGetResponseDataMeta +from .plans_single_get_response_data_meta_errors_item import ( + PlansSingleGetResponseDataMetaErrorsItem, +) +from .plans_single_get_response_data_meta_errors_item_source import ( + PlansSingleGetResponseDataMetaErrorsItemSource, +) +from .plans_single_get_response_data_meta_errors_item_source_resource import ( + PlansSingleGetResponseDataMetaErrorsItemSourceResource, +) +from .plans_single_get_response_data_relationships import ( + PlansSingleGetResponseDataRelationships, +) +from .plans_single_get_response_data_relationships_author import ( + PlansSingleGetResponseDataRelationshipsAuthor, +) +from .plans_single_get_response_data_relationships_author_data import ( + PlansSingleGetResponseDataRelationshipsAuthorData, +) +from .plans_single_get_response_data_relationships_author_data_type import ( + PlansSingleGetResponseDataRelationshipsAuthorDataType, +) +from .plans_single_get_response_data_relationships_parent import ( + PlansSingleGetResponseDataRelationshipsParent, +) +from .plans_single_get_response_data_relationships_parent_data import ( + PlansSingleGetResponseDataRelationshipsParentData, +) +from .plans_single_get_response_data_relationships_parent_data_type import ( + PlansSingleGetResponseDataRelationshipsParentDataType, +) +from .plans_single_get_response_data_relationships_project import ( + PlansSingleGetResponseDataRelationshipsProject, +) +from .plans_single_get_response_data_relationships_project_data import ( + PlansSingleGetResponseDataRelationshipsProjectData, +) +from .plans_single_get_response_data_relationships_project_data_type import ( + PlansSingleGetResponseDataRelationshipsProjectDataType, +) +from .plans_single_get_response_data_relationships_project_span import ( + PlansSingleGetResponseDataRelationshipsProjectSpan, +) +from .plans_single_get_response_data_relationships_project_span_data_item import ( + PlansSingleGetResponseDataRelationshipsProjectSpanDataItem, +) +from .plans_single_get_response_data_relationships_project_span_data_item_type import ( + PlansSingleGetResponseDataRelationshipsProjectSpanDataItemType, +) +from .plans_single_get_response_data_relationships_project_span_meta import ( + PlansSingleGetResponseDataRelationshipsProjectSpanMeta, +) +from .plans_single_get_response_data_relationships_template import ( + PlansSingleGetResponseDataRelationshipsTemplate, +) +from .plans_single_get_response_data_relationships_template_data import ( + PlansSingleGetResponseDataRelationshipsTemplateData, +) +from .plans_single_get_response_data_relationships_template_data_type import ( + PlansSingleGetResponseDataRelationshipsTemplateDataType, +) +from .plans_single_get_response_data_relationships_work_items import ( + PlansSingleGetResponseDataRelationshipsWorkItems, +) +from .plans_single_get_response_data_relationships_work_items_data_item import ( + PlansSingleGetResponseDataRelationshipsWorkItemsDataItem, +) +from .plans_single_get_response_data_relationships_work_items_data_item_type import ( + PlansSingleGetResponseDataRelationshipsWorkItemsDataItemType, +) +from .plans_single_get_response_data_relationships_work_items_meta import ( + PlansSingleGetResponseDataRelationshipsWorkItemsMeta, +) +from .plans_single_get_response_data_type import PlansSingleGetResponseDataType +from .plans_single_get_response_included_item import ( + PlansSingleGetResponseIncludedItem, +) +from .plans_single_get_response_links import PlansSingleGetResponseLinks +from .plans_single_patch_request import PlansSinglePatchRequest +from .plans_single_patch_request_data import PlansSinglePatchRequestData +from .plans_single_patch_request_data_attributes import ( + PlansSinglePatchRequestDataAttributes, +) +from .plans_single_patch_request_data_attributes_calculation_type import ( + PlansSinglePatchRequestDataAttributesCalculationType, +) +from .plans_single_patch_request_data_attributes_description import ( + PlansSinglePatchRequestDataAttributesDescription, +) +from .plans_single_patch_request_data_attributes_description_type import ( + PlansSinglePatchRequestDataAttributesDescriptionType, +) +from .plans_single_patch_request_data_attributes_home_page_content import ( + PlansSinglePatchRequestDataAttributesHomePageContent, +) +from .plans_single_patch_request_data_attributes_home_page_content_type import ( + PlansSinglePatchRequestDataAttributesHomePageContentType, +) +from .plans_single_patch_request_data_relationships import ( + PlansSinglePatchRequestDataRelationships, +) +from .plans_single_patch_request_data_relationships_parent import ( + PlansSinglePatchRequestDataRelationshipsParent, +) +from .plans_single_patch_request_data_relationships_parent_data import ( + PlansSinglePatchRequestDataRelationshipsParentData, +) +from .plans_single_patch_request_data_relationships_parent_data_type import ( + PlansSinglePatchRequestDataRelationshipsParentDataType, +) +from .plans_single_patch_request_data_relationships_project_span import ( + PlansSinglePatchRequestDataRelationshipsProjectSpan, +) +from .plans_single_patch_request_data_relationships_project_span_data_item import ( + PlansSinglePatchRequestDataRelationshipsProjectSpanDataItem, +) +from .plans_single_patch_request_data_relationships_project_span_data_item_type import ( + PlansSinglePatchRequestDataRelationshipsProjectSpanDataItemType, +) +from .plans_single_patch_request_data_relationships_work_items import ( + PlansSinglePatchRequestDataRelationshipsWorkItems, +) +from .plans_single_patch_request_data_relationships_work_items_data_item import ( + PlansSinglePatchRequestDataRelationshipsWorkItemsDataItem, +) +from .plans_single_patch_request_data_relationships_work_items_data_item_type import ( + PlansSinglePatchRequestDataRelationshipsWorkItemsDataItemType, +) +from .plans_single_patch_request_data_type import ( + PlansSinglePatchRequestDataType, +) from .post_document_attachments_request_body import ( PostDocumentAttachmentsRequestBody, ) +from .post_icons_request_body import PostIconsRequestBody +from .post_import_action_request_body import PostImportActionRequestBody from .post_page_attachments_request_body import PostPageAttachmentsRequestBody +from .post_test_record_attachments_request_body import ( + PostTestRecordAttachmentsRequestBody, +) +from .post_test_run_attachments_request_body import ( + PostTestRunAttachmentsRequestBody, +) +from .post_test_step_result_attachments_request_body import ( + PostTestStepResultAttachmentsRequestBody, +) from .post_work_item_attachments_request_body import ( PostWorkItemAttachmentsRequestBody, ) @@ -1237,6 +2007,9 @@ from .projects_list_get_response_data_item_meta_errors_item_source import ( ProjectsListGetResponseDataItemMetaErrorsItemSource, ) +from .projects_list_get_response_data_item_meta_errors_item_source_resource import ( + ProjectsListGetResponseDataItemMetaErrorsItemSourceResource, +) from .projects_list_get_response_data_item_relationships import ( ProjectsListGetResponseDataItemRelationships, ) @@ -1280,6 +2053,9 @@ from .projects_single_get_response_data_meta_errors_item_source import ( ProjectsSingleGetResponseDataMetaErrorsItemSource, ) +from .projects_single_get_response_data_meta_errors_item_source_resource import ( + ProjectsSingleGetResponseDataMetaErrorsItemSourceResource, +) from .projects_single_get_response_data_relationships import ( ProjectsSingleGetResponseDataRelationships, ) @@ -1299,13 +2075,1821 @@ ProjectsSingleGetResponseIncludedItem, ) from .projects_single_get_response_links import ProjectsSingleGetResponseLinks -from .resource_reference import ResourceReference -from .set_license_request_body import SetLicenseRequestBody -from .set_license_request_body_license import SetLicenseRequestBodyLicense -from .sparse_fields import SparseFields -from .usergroups_single_get_response import UsergroupsSingleGetResponse -from .usergroups_single_get_response_data import ( - UsergroupsSingleGetResponseData, +from .projects_single_patch_request import ProjectsSinglePatchRequest +from .projects_single_patch_request_data import ProjectsSinglePatchRequestData +from .projects_single_patch_request_data_attributes import ( + ProjectsSinglePatchRequestDataAttributes, +) +from .projects_single_patch_request_data_attributes_description import ( + ProjectsSinglePatchRequestDataAttributesDescription, +) +from .projects_single_patch_request_data_attributes_description_type import ( + ProjectsSinglePatchRequestDataAttributesDescriptionType, +) +from .projects_single_patch_request_data_relationships import ( + ProjectsSinglePatchRequestDataRelationships, +) +from .projects_single_patch_request_data_relationships_lead import ( + ProjectsSinglePatchRequestDataRelationshipsLead, +) +from .projects_single_patch_request_data_relationships_lead_data import ( + ProjectsSinglePatchRequestDataRelationshipsLeadData, +) +from .projects_single_patch_request_data_relationships_lead_data_type import ( + ProjectsSinglePatchRequestDataRelationshipsLeadDataType, +) +from .projects_single_patch_request_data_type import ( + ProjectsSinglePatchRequestDataType, +) +from .projecttemplates_list_get_response import ProjecttemplatesListGetResponse +from .projecttemplates_list_get_response_data_item import ( + ProjecttemplatesListGetResponseDataItem, +) +from .projecttemplates_list_get_response_data_item_attributes import ( + ProjecttemplatesListGetResponseDataItemAttributes, +) +from .projecttemplates_list_get_response_data_item_attributes_parameters import ( + ProjecttemplatesListGetResponseDataItemAttributesParameters, +) +from .projecttemplates_list_get_response_data_item_links import ( + ProjecttemplatesListGetResponseDataItemLinks, +) +from .projecttemplates_list_get_response_data_item_meta import ( + ProjecttemplatesListGetResponseDataItemMeta, +) +from .projecttemplates_list_get_response_data_item_meta_errors_item import ( + ProjecttemplatesListGetResponseDataItemMetaErrorsItem, +) +from .projecttemplates_list_get_response_data_item_meta_errors_item_source import ( + ProjecttemplatesListGetResponseDataItemMetaErrorsItemSource, +) +from .projecttemplates_list_get_response_data_item_meta_errors_item_source_resource import ( + ProjecttemplatesListGetResponseDataItemMetaErrorsItemSourceResource, +) +from .projecttemplates_list_get_response_data_item_type import ( + ProjecttemplatesListGetResponseDataItemType, +) +from .projecttemplates_list_get_response_included_item import ( + ProjecttemplatesListGetResponseIncludedItem, +) +from .projecttemplates_list_get_response_links import ( + ProjecttemplatesListGetResponseLinks, +) +from .projecttemplates_list_get_response_meta import ( + ProjecttemplatesListGetResponseMeta, +) +from .relationship_data_body import RelationshipDataBody +from .relationship_data_body_type import RelationshipDataBodyType +from .relationship_data_list_request import RelationshipDataListRequest +from .relationship_data_list_response import RelationshipDataListResponse +from .relationship_data_single_request import RelationshipDataSingleRequest +from .relationship_data_single_response import RelationshipDataSingleResponse +from .relationships_list_delete_request import RelationshipsListDeleteRequest +from .relationships_list_delete_request_data_item import ( + RelationshipsListDeleteRequestDataItem, +) +from .relationships_list_delete_request_data_item_type import ( + RelationshipsListDeleteRequestDataItemType, +) +from .resource_reference import ResourceReference +from .revisions_list_get_response import RevisionsListGetResponse +from .revisions_list_get_response_data_item import ( + RevisionsListGetResponseDataItem, +) +from .revisions_list_get_response_data_item_attributes import ( + RevisionsListGetResponseDataItemAttributes, +) +from .revisions_list_get_response_data_item_links import ( + RevisionsListGetResponseDataItemLinks, +) +from .revisions_list_get_response_data_item_meta import ( + RevisionsListGetResponseDataItemMeta, +) +from .revisions_list_get_response_data_item_meta_errors_item import ( + RevisionsListGetResponseDataItemMetaErrorsItem, +) +from .revisions_list_get_response_data_item_meta_errors_item_source import ( + RevisionsListGetResponseDataItemMetaErrorsItemSource, +) +from .revisions_list_get_response_data_item_meta_errors_item_source_resource import ( + RevisionsListGetResponseDataItemMetaErrorsItemSourceResource, +) +from .revisions_list_get_response_data_item_relationships import ( + RevisionsListGetResponseDataItemRelationships, +) +from .revisions_list_get_response_data_item_relationships_author import ( + RevisionsListGetResponseDataItemRelationshipsAuthor, +) +from .revisions_list_get_response_data_item_relationships_author_data import ( + RevisionsListGetResponseDataItemRelationshipsAuthorData, +) +from .revisions_list_get_response_data_item_relationships_author_data_type import ( + RevisionsListGetResponseDataItemRelationshipsAuthorDataType, +) +from .revisions_list_get_response_data_item_type import ( + RevisionsListGetResponseDataItemType, +) +from .revisions_list_get_response_included_item import ( + RevisionsListGetResponseIncludedItem, +) +from .revisions_list_get_response_links import RevisionsListGetResponseLinks +from .revisions_list_get_response_meta import RevisionsListGetResponseMeta +from .revisions_single_get_response import RevisionsSingleGetResponse +from .revisions_single_get_response_data import RevisionsSingleGetResponseData +from .revisions_single_get_response_data_attributes import ( + RevisionsSingleGetResponseDataAttributes, +) +from .revisions_single_get_response_data_links import ( + RevisionsSingleGetResponseDataLinks, +) +from .revisions_single_get_response_data_meta import ( + RevisionsSingleGetResponseDataMeta, +) +from .revisions_single_get_response_data_meta_errors_item import ( + RevisionsSingleGetResponseDataMetaErrorsItem, +) +from .revisions_single_get_response_data_meta_errors_item_source import ( + RevisionsSingleGetResponseDataMetaErrorsItemSource, +) +from .revisions_single_get_response_data_meta_errors_item_source_resource import ( + RevisionsSingleGetResponseDataMetaErrorsItemSourceResource, +) +from .revisions_single_get_response_data_relationships import ( + RevisionsSingleGetResponseDataRelationships, +) +from .revisions_single_get_response_data_relationships_author import ( + RevisionsSingleGetResponseDataRelationshipsAuthor, +) +from .revisions_single_get_response_data_relationships_author_data import ( + RevisionsSingleGetResponseDataRelationshipsAuthorData, +) +from .revisions_single_get_response_data_relationships_author_data_type import ( + RevisionsSingleGetResponseDataRelationshipsAuthorDataType, +) +from .revisions_single_get_response_data_type import ( + RevisionsSingleGetResponseDataType, +) +from .revisions_single_get_response_included_item import ( + RevisionsSingleGetResponseIncludedItem, +) +from .revisions_single_get_response_links import ( + RevisionsSingleGetResponseLinks, +) +from .set_license_request_body import SetLicenseRequestBody +from .set_license_request_body_license import SetLicenseRequestBodyLicense +from .sparse_fields import SparseFields +from .testparameter_definitions_list_get_response import ( + TestparameterDefinitionsListGetResponse, +) +from .testparameter_definitions_list_get_response_data_item import ( + TestparameterDefinitionsListGetResponseDataItem, +) +from .testparameter_definitions_list_get_response_data_item_attributes import ( + TestparameterDefinitionsListGetResponseDataItemAttributes, +) +from .testparameter_definitions_list_get_response_data_item_links import ( + TestparameterDefinitionsListGetResponseDataItemLinks, +) +from .testparameter_definitions_list_get_response_data_item_meta import ( + TestparameterDefinitionsListGetResponseDataItemMeta, +) +from .testparameter_definitions_list_get_response_data_item_meta_errors_item import ( + TestparameterDefinitionsListGetResponseDataItemMetaErrorsItem, +) +from .testparameter_definitions_list_get_response_data_item_meta_errors_item_source import ( + TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSource, +) +from .testparameter_definitions_list_get_response_data_item_meta_errors_item_source_resource import ( + TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSourceResource, +) +from .testparameter_definitions_list_get_response_data_item_type import ( + TestparameterDefinitionsListGetResponseDataItemType, +) +from .testparameter_definitions_list_get_response_included_item import ( + TestparameterDefinitionsListGetResponseIncludedItem, +) +from .testparameter_definitions_list_get_response_links import ( + TestparameterDefinitionsListGetResponseLinks, +) +from .testparameter_definitions_list_get_response_meta import ( + TestparameterDefinitionsListGetResponseMeta, +) +from .testparameter_definitions_list_post_request import ( + TestparameterDefinitionsListPostRequest, +) +from .testparameter_definitions_list_post_request_data_item import ( + TestparameterDefinitionsListPostRequestDataItem, +) +from .testparameter_definitions_list_post_request_data_item_attributes import ( + TestparameterDefinitionsListPostRequestDataItemAttributes, +) +from .testparameter_definitions_list_post_request_data_item_type import ( + TestparameterDefinitionsListPostRequestDataItemType, +) +from .testparameter_definitions_list_post_response import ( + TestparameterDefinitionsListPostResponse, +) +from .testparameter_definitions_list_post_response_data_item import ( + TestparameterDefinitionsListPostResponseDataItem, +) +from .testparameter_definitions_list_post_response_data_item_links import ( + TestparameterDefinitionsListPostResponseDataItemLinks, +) +from .testparameter_definitions_list_post_response_data_item_type import ( + TestparameterDefinitionsListPostResponseDataItemType, +) +from .testparameter_definitions_single_get_response import ( + TestparameterDefinitionsSingleGetResponse, +) +from .testparameter_definitions_single_get_response_data import ( + TestparameterDefinitionsSingleGetResponseData, +) +from .testparameter_definitions_single_get_response_data_attributes import ( + TestparameterDefinitionsSingleGetResponseDataAttributes, +) +from .testparameter_definitions_single_get_response_data_links import ( + TestparameterDefinitionsSingleGetResponseDataLinks, +) +from .testparameter_definitions_single_get_response_data_meta import ( + TestparameterDefinitionsSingleGetResponseDataMeta, +) +from .testparameter_definitions_single_get_response_data_meta_errors_item import ( + TestparameterDefinitionsSingleGetResponseDataMetaErrorsItem, +) +from .testparameter_definitions_single_get_response_data_meta_errors_item_source import ( + TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSource, +) +from .testparameter_definitions_single_get_response_data_meta_errors_item_source_resource import ( + TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSourceResource, +) +from .testparameter_definitions_single_get_response_data_type import ( + TestparameterDefinitionsSingleGetResponseDataType, +) +from .testparameter_definitions_single_get_response_included_item import ( + TestparameterDefinitionsSingleGetResponseIncludedItem, +) +from .testparameter_definitions_single_get_response_links import ( + TestparameterDefinitionsSingleGetResponseLinks, +) +from .testparameters_list_get_response import TestparametersListGetResponse +from .testparameters_list_get_response_data_item import ( + TestparametersListGetResponseDataItem, +) +from .testparameters_list_get_response_data_item_attributes import ( + TestparametersListGetResponseDataItemAttributes, +) +from .testparameters_list_get_response_data_item_links import ( + TestparametersListGetResponseDataItemLinks, +) +from .testparameters_list_get_response_data_item_meta import ( + TestparametersListGetResponseDataItemMeta, +) +from .testparameters_list_get_response_data_item_meta_errors_item import ( + TestparametersListGetResponseDataItemMetaErrorsItem, +) +from .testparameters_list_get_response_data_item_meta_errors_item_source import ( + TestparametersListGetResponseDataItemMetaErrorsItemSource, +) +from .testparameters_list_get_response_data_item_meta_errors_item_source_resource import ( + TestparametersListGetResponseDataItemMetaErrorsItemSourceResource, +) +from .testparameters_list_get_response_data_item_relationships import ( + TestparametersListGetResponseDataItemRelationships, +) +from .testparameters_list_get_response_data_item_relationships_definition import ( + TestparametersListGetResponseDataItemRelationshipsDefinition, +) +from .testparameters_list_get_response_data_item_relationships_definition_data import ( + TestparametersListGetResponseDataItemRelationshipsDefinitionData, +) +from .testparameters_list_get_response_data_item_relationships_definition_data_type import ( + TestparametersListGetResponseDataItemRelationshipsDefinitionDataType, +) +from .testparameters_list_get_response_data_item_type import ( + TestparametersListGetResponseDataItemType, +) +from .testparameters_list_get_response_included_item import ( + TestparametersListGetResponseIncludedItem, +) +from .testparameters_list_get_response_links import ( + TestparametersListGetResponseLinks, +) +from .testparameters_list_get_response_meta import ( + TestparametersListGetResponseMeta, +) +from .testparameters_list_post_request import TestparametersListPostRequest +from .testparameters_list_post_request_data_item import ( + TestparametersListPostRequestDataItem, +) +from .testparameters_list_post_request_data_item_attributes import ( + TestparametersListPostRequestDataItemAttributes, +) +from .testparameters_list_post_request_data_item_type import ( + TestparametersListPostRequestDataItemType, +) +from .testparameters_list_post_response import TestparametersListPostResponse +from .testparameters_list_post_response_data_item import ( + TestparametersListPostResponseDataItem, +) +from .testparameters_list_post_response_data_item_links import ( + TestparametersListPostResponseDataItemLinks, +) +from .testparameters_list_post_response_data_item_type import ( + TestparametersListPostResponseDataItemType, +) +from .testparameters_single_get_response import TestparametersSingleGetResponse +from .testparameters_single_get_response_data import ( + TestparametersSingleGetResponseData, +) +from .testparameters_single_get_response_data_attributes import ( + TestparametersSingleGetResponseDataAttributes, +) +from .testparameters_single_get_response_data_links import ( + TestparametersSingleGetResponseDataLinks, +) +from .testparameters_single_get_response_data_meta import ( + TestparametersSingleGetResponseDataMeta, +) +from .testparameters_single_get_response_data_meta_errors_item import ( + TestparametersSingleGetResponseDataMetaErrorsItem, +) +from .testparameters_single_get_response_data_meta_errors_item_source import ( + TestparametersSingleGetResponseDataMetaErrorsItemSource, +) +from .testparameters_single_get_response_data_meta_errors_item_source_resource import ( + TestparametersSingleGetResponseDataMetaErrorsItemSourceResource, +) +from .testparameters_single_get_response_data_relationships import ( + TestparametersSingleGetResponseDataRelationships, +) +from .testparameters_single_get_response_data_relationships_definition import ( + TestparametersSingleGetResponseDataRelationshipsDefinition, +) +from .testparameters_single_get_response_data_relationships_definition_data import ( + TestparametersSingleGetResponseDataRelationshipsDefinitionData, +) +from .testparameters_single_get_response_data_relationships_definition_data_type import ( + TestparametersSingleGetResponseDataRelationshipsDefinitionDataType, +) +from .testparameters_single_get_response_data_type import ( + TestparametersSingleGetResponseDataType, +) +from .testparameters_single_get_response_included_item import ( + TestparametersSingleGetResponseIncludedItem, +) +from .testparameters_single_get_response_links import ( + TestparametersSingleGetResponseLinks, +) +from .testrecord_attachments_list_get_response import ( + TestrecordAttachmentsListGetResponse, +) +from .testrecord_attachments_list_get_response_data_item import ( + TestrecordAttachmentsListGetResponseDataItem, +) +from .testrecord_attachments_list_get_response_data_item_attributes import ( + TestrecordAttachmentsListGetResponseDataItemAttributes, +) +from .testrecord_attachments_list_get_response_data_item_links import ( + TestrecordAttachmentsListGetResponseDataItemLinks, +) +from .testrecord_attachments_list_get_response_data_item_meta import ( + TestrecordAttachmentsListGetResponseDataItemMeta, +) +from .testrecord_attachments_list_get_response_data_item_meta_errors_item import ( + TestrecordAttachmentsListGetResponseDataItemMetaErrorsItem, +) +from .testrecord_attachments_list_get_response_data_item_meta_errors_item_source import ( + TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSource, +) +from .testrecord_attachments_list_get_response_data_item_meta_errors_item_source_resource import ( + TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, +) +from .testrecord_attachments_list_get_response_data_item_relationships import ( + TestrecordAttachmentsListGetResponseDataItemRelationships, +) +from .testrecord_attachments_list_get_response_data_item_relationships_author import ( + TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthor, +) +from .testrecord_attachments_list_get_response_data_item_relationships_author_data import ( + TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthorData, +) +from .testrecord_attachments_list_get_response_data_item_relationships_author_data_type import ( + TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthorDataType, +) +from .testrecord_attachments_list_get_response_data_item_relationships_project import ( + TestrecordAttachmentsListGetResponseDataItemRelationshipsProject, +) +from .testrecord_attachments_list_get_response_data_item_relationships_project_data import ( + TestrecordAttachmentsListGetResponseDataItemRelationshipsProjectData, +) +from .testrecord_attachments_list_get_response_data_item_relationships_project_data_type import ( + TestrecordAttachmentsListGetResponseDataItemRelationshipsProjectDataType, +) +from .testrecord_attachments_list_get_response_data_item_type import ( + TestrecordAttachmentsListGetResponseDataItemType, +) +from .testrecord_attachments_list_get_response_included_item import ( + TestrecordAttachmentsListGetResponseIncludedItem, +) +from .testrecord_attachments_list_get_response_links import ( + TestrecordAttachmentsListGetResponseLinks, +) +from .testrecord_attachments_list_get_response_meta import ( + TestrecordAttachmentsListGetResponseMeta, +) +from .testrecord_attachments_list_post_request import ( + TestrecordAttachmentsListPostRequest, +) +from .testrecord_attachments_list_post_request_data_item import ( + TestrecordAttachmentsListPostRequestDataItem, +) +from .testrecord_attachments_list_post_request_data_item_attributes import ( + TestrecordAttachmentsListPostRequestDataItemAttributes, +) +from .testrecord_attachments_list_post_request_data_item_type import ( + TestrecordAttachmentsListPostRequestDataItemType, +) +from .testrecord_attachments_list_post_response import ( + TestrecordAttachmentsListPostResponse, +) +from .testrecord_attachments_list_post_response_data_item import ( + TestrecordAttachmentsListPostResponseDataItem, +) +from .testrecord_attachments_list_post_response_data_item_links import ( + TestrecordAttachmentsListPostResponseDataItemLinks, +) +from .testrecord_attachments_list_post_response_data_item_type import ( + TestrecordAttachmentsListPostResponseDataItemType, +) +from .testrecord_attachments_single_get_response import ( + TestrecordAttachmentsSingleGetResponse, +) +from .testrecord_attachments_single_get_response_data import ( + TestrecordAttachmentsSingleGetResponseData, +) +from .testrecord_attachments_single_get_response_data_attributes import ( + TestrecordAttachmentsSingleGetResponseDataAttributes, +) +from .testrecord_attachments_single_get_response_data_links import ( + TestrecordAttachmentsSingleGetResponseDataLinks, +) +from .testrecord_attachments_single_get_response_data_meta import ( + TestrecordAttachmentsSingleGetResponseDataMeta, +) +from .testrecord_attachments_single_get_response_data_meta_errors_item import ( + TestrecordAttachmentsSingleGetResponseDataMetaErrorsItem, +) +from .testrecord_attachments_single_get_response_data_meta_errors_item_source import ( + TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSource, +) +from .testrecord_attachments_single_get_response_data_meta_errors_item_source_resource import ( + TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, +) +from .testrecord_attachments_single_get_response_data_relationships import ( + TestrecordAttachmentsSingleGetResponseDataRelationships, +) +from .testrecord_attachments_single_get_response_data_relationships_author import ( + TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthor, +) +from .testrecord_attachments_single_get_response_data_relationships_author_data import ( + TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthorData, +) +from .testrecord_attachments_single_get_response_data_relationships_author_data_type import ( + TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthorDataType, +) +from .testrecord_attachments_single_get_response_data_relationships_project import ( + TestrecordAttachmentsSingleGetResponseDataRelationshipsProject, +) +from .testrecord_attachments_single_get_response_data_relationships_project_data import ( + TestrecordAttachmentsSingleGetResponseDataRelationshipsProjectData, +) +from .testrecord_attachments_single_get_response_data_relationships_project_data_type import ( + TestrecordAttachmentsSingleGetResponseDataRelationshipsProjectDataType, +) +from .testrecord_attachments_single_get_response_data_type import ( + TestrecordAttachmentsSingleGetResponseDataType, +) +from .testrecord_attachments_single_get_response_included_item import ( + TestrecordAttachmentsSingleGetResponseIncludedItem, +) +from .testrecord_attachments_single_get_response_links import ( + TestrecordAttachmentsSingleGetResponseLinks, +) +from .testrecords_list_get_response import TestrecordsListGetResponse +from .testrecords_list_get_response_data_item import ( + TestrecordsListGetResponseDataItem, +) +from .testrecords_list_get_response_data_item_attributes import ( + TestrecordsListGetResponseDataItemAttributes, +) +from .testrecords_list_get_response_data_item_attributes_comment import ( + TestrecordsListGetResponseDataItemAttributesComment, +) +from .testrecords_list_get_response_data_item_attributes_comment_type import ( + TestrecordsListGetResponseDataItemAttributesCommentType, +) +from .testrecords_list_get_response_data_item_links import ( + TestrecordsListGetResponseDataItemLinks, +) +from .testrecords_list_get_response_data_item_meta import ( + TestrecordsListGetResponseDataItemMeta, +) +from .testrecords_list_get_response_data_item_meta_errors_item import ( + TestrecordsListGetResponseDataItemMetaErrorsItem, +) +from .testrecords_list_get_response_data_item_meta_errors_item_source import ( + TestrecordsListGetResponseDataItemMetaErrorsItemSource, +) +from .testrecords_list_get_response_data_item_meta_errors_item_source_resource import ( + TestrecordsListGetResponseDataItemMetaErrorsItemSourceResource, +) +from .testrecords_list_get_response_data_item_relationships import ( + TestrecordsListGetResponseDataItemRelationships, +) +from .testrecords_list_get_response_data_item_relationships_defect import ( + TestrecordsListGetResponseDataItemRelationshipsDefect, +) +from .testrecords_list_get_response_data_item_relationships_defect_data import ( + TestrecordsListGetResponseDataItemRelationshipsDefectData, +) +from .testrecords_list_get_response_data_item_relationships_defect_data_type import ( + TestrecordsListGetResponseDataItemRelationshipsDefectDataType, +) +from .testrecords_list_get_response_data_item_relationships_executed_by import ( + TestrecordsListGetResponseDataItemRelationshipsExecutedBy, +) +from .testrecords_list_get_response_data_item_relationships_executed_by_data import ( + TestrecordsListGetResponseDataItemRelationshipsExecutedByData, +) +from .testrecords_list_get_response_data_item_relationships_executed_by_data_type import ( + TestrecordsListGetResponseDataItemRelationshipsExecutedByDataType, +) +from .testrecords_list_get_response_data_item_relationships_test_case import ( + TestrecordsListGetResponseDataItemRelationshipsTestCase, +) +from .testrecords_list_get_response_data_item_relationships_test_case_data import ( + TestrecordsListGetResponseDataItemRelationshipsTestCaseData, +) +from .testrecords_list_get_response_data_item_relationships_test_case_data_type import ( + TestrecordsListGetResponseDataItemRelationshipsTestCaseDataType, +) +from .testrecords_list_get_response_data_item_type import ( + TestrecordsListGetResponseDataItemType, +) +from .testrecords_list_get_response_included_item import ( + TestrecordsListGetResponseIncludedItem, +) +from .testrecords_list_get_response_links import ( + TestrecordsListGetResponseLinks, +) +from .testrecords_list_get_response_meta import TestrecordsListGetResponseMeta +from .testrecords_list_post_request import TestrecordsListPostRequest +from .testrecords_list_post_request_data_item import ( + TestrecordsListPostRequestDataItem, +) +from .testrecords_list_post_request_data_item_attributes import ( + TestrecordsListPostRequestDataItemAttributes, +) +from .testrecords_list_post_request_data_item_attributes_comment import ( + TestrecordsListPostRequestDataItemAttributesComment, +) +from .testrecords_list_post_request_data_item_attributes_comment_type import ( + TestrecordsListPostRequestDataItemAttributesCommentType, +) +from .testrecords_list_post_request_data_item_relationships import ( + TestrecordsListPostRequestDataItemRelationships, +) +from .testrecords_list_post_request_data_item_relationships_defect import ( + TestrecordsListPostRequestDataItemRelationshipsDefect, +) +from .testrecords_list_post_request_data_item_relationships_defect_data import ( + TestrecordsListPostRequestDataItemRelationshipsDefectData, +) +from .testrecords_list_post_request_data_item_relationships_defect_data_type import ( + TestrecordsListPostRequestDataItemRelationshipsDefectDataType, +) +from .testrecords_list_post_request_data_item_relationships_executed_by import ( + TestrecordsListPostRequestDataItemRelationshipsExecutedBy, +) +from .testrecords_list_post_request_data_item_relationships_executed_by_data import ( + TestrecordsListPostRequestDataItemRelationshipsExecutedByData, +) +from .testrecords_list_post_request_data_item_relationships_executed_by_data_type import ( + TestrecordsListPostRequestDataItemRelationshipsExecutedByDataType, +) +from .testrecords_list_post_request_data_item_relationships_test_case import ( + TestrecordsListPostRequestDataItemRelationshipsTestCase, +) +from .testrecords_list_post_request_data_item_relationships_test_case_data import ( + TestrecordsListPostRequestDataItemRelationshipsTestCaseData, +) +from .testrecords_list_post_request_data_item_relationships_test_case_data_type import ( + TestrecordsListPostRequestDataItemRelationshipsTestCaseDataType, +) +from .testrecords_list_post_request_data_item_type import ( + TestrecordsListPostRequestDataItemType, +) +from .testrecords_list_post_response import TestrecordsListPostResponse +from .testrecords_list_post_response_data_item import ( + TestrecordsListPostResponseDataItem, +) +from .testrecords_list_post_response_data_item_links import ( + TestrecordsListPostResponseDataItemLinks, +) +from .testrecords_list_post_response_data_item_type import ( + TestrecordsListPostResponseDataItemType, +) +from .testrecords_single_get_response import TestrecordsSingleGetResponse +from .testrecords_single_get_response_data import ( + TestrecordsSingleGetResponseData, +) +from .testrecords_single_get_response_data_attributes import ( + TestrecordsSingleGetResponseDataAttributes, +) +from .testrecords_single_get_response_data_attributes_comment import ( + TestrecordsSingleGetResponseDataAttributesComment, +) +from .testrecords_single_get_response_data_attributes_comment_type import ( + TestrecordsSingleGetResponseDataAttributesCommentType, +) +from .testrecords_single_get_response_data_links import ( + TestrecordsSingleGetResponseDataLinks, +) +from .testrecords_single_get_response_data_meta import ( + TestrecordsSingleGetResponseDataMeta, +) +from .testrecords_single_get_response_data_meta_errors_item import ( + TestrecordsSingleGetResponseDataMetaErrorsItem, +) +from .testrecords_single_get_response_data_meta_errors_item_source import ( + TestrecordsSingleGetResponseDataMetaErrorsItemSource, +) +from .testrecords_single_get_response_data_meta_errors_item_source_resource import ( + TestrecordsSingleGetResponseDataMetaErrorsItemSourceResource, +) +from .testrecords_single_get_response_data_relationships import ( + TestrecordsSingleGetResponseDataRelationships, +) +from .testrecords_single_get_response_data_relationships_defect import ( + TestrecordsSingleGetResponseDataRelationshipsDefect, +) +from .testrecords_single_get_response_data_relationships_defect_data import ( + TestrecordsSingleGetResponseDataRelationshipsDefectData, +) +from .testrecords_single_get_response_data_relationships_defect_data_type import ( + TestrecordsSingleGetResponseDataRelationshipsDefectDataType, +) +from .testrecords_single_get_response_data_relationships_executed_by import ( + TestrecordsSingleGetResponseDataRelationshipsExecutedBy, +) +from .testrecords_single_get_response_data_relationships_executed_by_data import ( + TestrecordsSingleGetResponseDataRelationshipsExecutedByData, +) +from .testrecords_single_get_response_data_relationships_executed_by_data_type import ( + TestrecordsSingleGetResponseDataRelationshipsExecutedByDataType, +) +from .testrecords_single_get_response_data_relationships_test_case import ( + TestrecordsSingleGetResponseDataRelationshipsTestCase, +) +from .testrecords_single_get_response_data_relationships_test_case_data import ( + TestrecordsSingleGetResponseDataRelationshipsTestCaseData, +) +from .testrecords_single_get_response_data_relationships_test_case_data_type import ( + TestrecordsSingleGetResponseDataRelationshipsTestCaseDataType, +) +from .testrecords_single_get_response_data_type import ( + TestrecordsSingleGetResponseDataType, +) +from .testrecords_single_get_response_included_item import ( + TestrecordsSingleGetResponseIncludedItem, +) +from .testrecords_single_get_response_links import ( + TestrecordsSingleGetResponseLinks, +) +from .testrecords_single_patch_request import TestrecordsSinglePatchRequest +from .testrecords_single_patch_request_data import ( + TestrecordsSinglePatchRequestData, +) +from .testrecords_single_patch_request_data_attributes import ( + TestrecordsSinglePatchRequestDataAttributes, +) +from .testrecords_single_patch_request_data_attributes_comment import ( + TestrecordsSinglePatchRequestDataAttributesComment, +) +from .testrecords_single_patch_request_data_attributes_comment_type import ( + TestrecordsSinglePatchRequestDataAttributesCommentType, +) +from .testrecords_single_patch_request_data_relationships import ( + TestrecordsSinglePatchRequestDataRelationships, +) +from .testrecords_single_patch_request_data_relationships_defect import ( + TestrecordsSinglePatchRequestDataRelationshipsDefect, +) +from .testrecords_single_patch_request_data_relationships_defect_data import ( + TestrecordsSinglePatchRequestDataRelationshipsDefectData, +) +from .testrecords_single_patch_request_data_relationships_defect_data_type import ( + TestrecordsSinglePatchRequestDataRelationshipsDefectDataType, +) +from .testrecords_single_patch_request_data_relationships_executed_by import ( + TestrecordsSinglePatchRequestDataRelationshipsExecutedBy, +) +from .testrecords_single_patch_request_data_relationships_executed_by_data import ( + TestrecordsSinglePatchRequestDataRelationshipsExecutedByData, +) +from .testrecords_single_patch_request_data_relationships_executed_by_data_type import ( + TestrecordsSinglePatchRequestDataRelationshipsExecutedByDataType, +) +from .testrecords_single_patch_request_data_type import ( + TestrecordsSinglePatchRequestDataType, +) +from .testrun_attachments_list_get_response import ( + TestrunAttachmentsListGetResponse, +) +from .testrun_attachments_list_get_response_data_item import ( + TestrunAttachmentsListGetResponseDataItem, +) +from .testrun_attachments_list_get_response_data_item_attributes import ( + TestrunAttachmentsListGetResponseDataItemAttributes, +) +from .testrun_attachments_list_get_response_data_item_links import ( + TestrunAttachmentsListGetResponseDataItemLinks, +) +from .testrun_attachments_list_get_response_data_item_meta import ( + TestrunAttachmentsListGetResponseDataItemMeta, +) +from .testrun_attachments_list_get_response_data_item_meta_errors_item import ( + TestrunAttachmentsListGetResponseDataItemMetaErrorsItem, +) +from .testrun_attachments_list_get_response_data_item_meta_errors_item_source import ( + TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSource, +) +from .testrun_attachments_list_get_response_data_item_meta_errors_item_source_resource import ( + TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, +) +from .testrun_attachments_list_get_response_data_item_relationships import ( + TestrunAttachmentsListGetResponseDataItemRelationships, +) +from .testrun_attachments_list_get_response_data_item_relationships_author import ( + TestrunAttachmentsListGetResponseDataItemRelationshipsAuthor, +) +from .testrun_attachments_list_get_response_data_item_relationships_author_data import ( + TestrunAttachmentsListGetResponseDataItemRelationshipsAuthorData, +) +from .testrun_attachments_list_get_response_data_item_relationships_author_data_type import ( + TestrunAttachmentsListGetResponseDataItemRelationshipsAuthorDataType, +) +from .testrun_attachments_list_get_response_data_item_relationships_project import ( + TestrunAttachmentsListGetResponseDataItemRelationshipsProject, +) +from .testrun_attachments_list_get_response_data_item_relationships_project_data import ( + TestrunAttachmentsListGetResponseDataItemRelationshipsProjectData, +) +from .testrun_attachments_list_get_response_data_item_relationships_project_data_type import ( + TestrunAttachmentsListGetResponseDataItemRelationshipsProjectDataType, +) +from .testrun_attachments_list_get_response_data_item_type import ( + TestrunAttachmentsListGetResponseDataItemType, +) +from .testrun_attachments_list_get_response_included_item import ( + TestrunAttachmentsListGetResponseIncludedItem, +) +from .testrun_attachments_list_get_response_links import ( + TestrunAttachmentsListGetResponseLinks, +) +from .testrun_attachments_list_get_response_meta import ( + TestrunAttachmentsListGetResponseMeta, +) +from .testrun_attachments_list_post_request import ( + TestrunAttachmentsListPostRequest, +) +from .testrun_attachments_list_post_request_data_item import ( + TestrunAttachmentsListPostRequestDataItem, +) +from .testrun_attachments_list_post_request_data_item_attributes import ( + TestrunAttachmentsListPostRequestDataItemAttributes, +) +from .testrun_attachments_list_post_request_data_item_type import ( + TestrunAttachmentsListPostRequestDataItemType, +) +from .testrun_attachments_list_post_response import ( + TestrunAttachmentsListPostResponse, +) +from .testrun_attachments_list_post_response_data_item import ( + TestrunAttachmentsListPostResponseDataItem, +) +from .testrun_attachments_list_post_response_data_item_links import ( + TestrunAttachmentsListPostResponseDataItemLinks, +) +from .testrun_attachments_list_post_response_data_item_type import ( + TestrunAttachmentsListPostResponseDataItemType, +) +from .testrun_attachments_single_get_response import ( + TestrunAttachmentsSingleGetResponse, +) +from .testrun_attachments_single_get_response_data import ( + TestrunAttachmentsSingleGetResponseData, +) +from .testrun_attachments_single_get_response_data_attributes import ( + TestrunAttachmentsSingleGetResponseDataAttributes, +) +from .testrun_attachments_single_get_response_data_links import ( + TestrunAttachmentsSingleGetResponseDataLinks, +) +from .testrun_attachments_single_get_response_data_meta import ( + TestrunAttachmentsSingleGetResponseDataMeta, +) +from .testrun_attachments_single_get_response_data_meta_errors_item import ( + TestrunAttachmentsSingleGetResponseDataMetaErrorsItem, +) +from .testrun_attachments_single_get_response_data_meta_errors_item_source import ( + TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSource, +) +from .testrun_attachments_single_get_response_data_meta_errors_item_source_resource import ( + TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, +) +from .testrun_attachments_single_get_response_data_relationships import ( + TestrunAttachmentsSingleGetResponseDataRelationships, +) +from .testrun_attachments_single_get_response_data_relationships_author import ( + TestrunAttachmentsSingleGetResponseDataRelationshipsAuthor, +) +from .testrun_attachments_single_get_response_data_relationships_author_data import ( + TestrunAttachmentsSingleGetResponseDataRelationshipsAuthorData, +) +from .testrun_attachments_single_get_response_data_relationships_author_data_type import ( + TestrunAttachmentsSingleGetResponseDataRelationshipsAuthorDataType, +) +from .testrun_attachments_single_get_response_data_relationships_project import ( + TestrunAttachmentsSingleGetResponseDataRelationshipsProject, +) +from .testrun_attachments_single_get_response_data_relationships_project_data import ( + TestrunAttachmentsSingleGetResponseDataRelationshipsProjectData, +) +from .testrun_attachments_single_get_response_data_relationships_project_data_type import ( + TestrunAttachmentsSingleGetResponseDataRelationshipsProjectDataType, +) +from .testrun_attachments_single_get_response_data_type import ( + TestrunAttachmentsSingleGetResponseDataType, +) +from .testrun_attachments_single_get_response_included_item import ( + TestrunAttachmentsSingleGetResponseIncludedItem, +) +from .testrun_attachments_single_get_response_links import ( + TestrunAttachmentsSingleGetResponseLinks, +) +from .testrun_attachments_single_patch_request import ( + TestrunAttachmentsSinglePatchRequest, +) +from .testrun_attachments_single_patch_request_data import ( + TestrunAttachmentsSinglePatchRequestData, +) +from .testrun_attachments_single_patch_request_data_attributes import ( + TestrunAttachmentsSinglePatchRequestDataAttributes, +) +from .testrun_attachments_single_patch_request_data_type import ( + TestrunAttachmentsSinglePatchRequestDataType, +) +from .testrun_comments_list_get_response import TestrunCommentsListGetResponse +from .testrun_comments_list_get_response_data_item import ( + TestrunCommentsListGetResponseDataItem, +) +from .testrun_comments_list_get_response_data_item_attributes import ( + TestrunCommentsListGetResponseDataItemAttributes, +) +from .testrun_comments_list_get_response_data_item_attributes_text import ( + TestrunCommentsListGetResponseDataItemAttributesText, +) +from .testrun_comments_list_get_response_data_item_attributes_text_type import ( + TestrunCommentsListGetResponseDataItemAttributesTextType, +) +from .testrun_comments_list_get_response_data_item_links import ( + TestrunCommentsListGetResponseDataItemLinks, +) +from .testrun_comments_list_get_response_data_item_meta import ( + TestrunCommentsListGetResponseDataItemMeta, +) +from .testrun_comments_list_get_response_data_item_meta_errors_item import ( + TestrunCommentsListGetResponseDataItemMetaErrorsItem, +) +from .testrun_comments_list_get_response_data_item_meta_errors_item_source import ( + TestrunCommentsListGetResponseDataItemMetaErrorsItemSource, +) +from .testrun_comments_list_get_response_data_item_meta_errors_item_source_resource import ( + TestrunCommentsListGetResponseDataItemMetaErrorsItemSourceResource, +) +from .testrun_comments_list_get_response_data_item_relationships import ( + TestrunCommentsListGetResponseDataItemRelationships, +) +from .testrun_comments_list_get_response_data_item_relationships_author import ( + TestrunCommentsListGetResponseDataItemRelationshipsAuthor, +) +from .testrun_comments_list_get_response_data_item_relationships_author_data import ( + TestrunCommentsListGetResponseDataItemRelationshipsAuthorData, +) +from .testrun_comments_list_get_response_data_item_relationships_author_data_type import ( + TestrunCommentsListGetResponseDataItemRelationshipsAuthorDataType, +) +from .testrun_comments_list_get_response_data_item_relationships_child_comments import ( + TestrunCommentsListGetResponseDataItemRelationshipsChildComments, +) +from .testrun_comments_list_get_response_data_item_relationships_child_comments_data_item import ( + TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsDataItem, +) +from .testrun_comments_list_get_response_data_item_relationships_child_comments_data_item_type import ( + TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsDataItemType, +) +from .testrun_comments_list_get_response_data_item_relationships_child_comments_meta import ( + TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsMeta, +) +from .testrun_comments_list_get_response_data_item_relationships_parent_comment import ( + TestrunCommentsListGetResponseDataItemRelationshipsParentComment, +) +from .testrun_comments_list_get_response_data_item_relationships_parent_comment_data import ( + TestrunCommentsListGetResponseDataItemRelationshipsParentCommentData, +) +from .testrun_comments_list_get_response_data_item_relationships_parent_comment_data_type import ( + TestrunCommentsListGetResponseDataItemRelationshipsParentCommentDataType, +) +from .testrun_comments_list_get_response_data_item_relationships_project import ( + TestrunCommentsListGetResponseDataItemRelationshipsProject, +) +from .testrun_comments_list_get_response_data_item_relationships_project_data import ( + TestrunCommentsListGetResponseDataItemRelationshipsProjectData, +) +from .testrun_comments_list_get_response_data_item_relationships_project_data_type import ( + TestrunCommentsListGetResponseDataItemRelationshipsProjectDataType, +) +from .testrun_comments_list_get_response_data_item_type import ( + TestrunCommentsListGetResponseDataItemType, +) +from .testrun_comments_list_get_response_included_item import ( + TestrunCommentsListGetResponseIncludedItem, +) +from .testrun_comments_list_get_response_links import ( + TestrunCommentsListGetResponseLinks, +) +from .testrun_comments_list_get_response_meta import ( + TestrunCommentsListGetResponseMeta, +) +from .testrun_comments_list_post_request import TestrunCommentsListPostRequest +from .testrun_comments_list_post_request_data_item import ( + TestrunCommentsListPostRequestDataItem, +) +from .testrun_comments_list_post_request_data_item_attributes import ( + TestrunCommentsListPostRequestDataItemAttributes, +) +from .testrun_comments_list_post_request_data_item_attributes_text import ( + TestrunCommentsListPostRequestDataItemAttributesText, +) +from .testrun_comments_list_post_request_data_item_attributes_text_type import ( + TestrunCommentsListPostRequestDataItemAttributesTextType, +) +from .testrun_comments_list_post_request_data_item_relationships import ( + TestrunCommentsListPostRequestDataItemRelationships, +) +from .testrun_comments_list_post_request_data_item_relationships_author import ( + TestrunCommentsListPostRequestDataItemRelationshipsAuthor, +) +from .testrun_comments_list_post_request_data_item_relationships_author_data import ( + TestrunCommentsListPostRequestDataItemRelationshipsAuthorData, +) +from .testrun_comments_list_post_request_data_item_relationships_author_data_type import ( + TestrunCommentsListPostRequestDataItemRelationshipsAuthorDataType, +) +from .testrun_comments_list_post_request_data_item_relationships_parent_comment import ( + TestrunCommentsListPostRequestDataItemRelationshipsParentComment, +) +from .testrun_comments_list_post_request_data_item_relationships_parent_comment_data import ( + TestrunCommentsListPostRequestDataItemRelationshipsParentCommentData, +) +from .testrun_comments_list_post_request_data_item_relationships_parent_comment_data_type import ( + TestrunCommentsListPostRequestDataItemRelationshipsParentCommentDataType, +) +from .testrun_comments_list_post_request_data_item_type import ( + TestrunCommentsListPostRequestDataItemType, +) +from .testrun_comments_list_post_response import ( + TestrunCommentsListPostResponse, +) +from .testrun_comments_list_post_response_data_item import ( + TestrunCommentsListPostResponseDataItem, +) +from .testrun_comments_list_post_response_data_item_links import ( + TestrunCommentsListPostResponseDataItemLinks, +) +from .testrun_comments_list_post_response_data_item_type import ( + TestrunCommentsListPostResponseDataItemType, +) +from .testrun_comments_single_get_response import ( + TestrunCommentsSingleGetResponse, +) +from .testrun_comments_single_get_response_data import ( + TestrunCommentsSingleGetResponseData, +) +from .testrun_comments_single_get_response_data_attributes import ( + TestrunCommentsSingleGetResponseDataAttributes, +) +from .testrun_comments_single_get_response_data_attributes_text import ( + TestrunCommentsSingleGetResponseDataAttributesText, +) +from .testrun_comments_single_get_response_data_attributes_text_type import ( + TestrunCommentsSingleGetResponseDataAttributesTextType, +) +from .testrun_comments_single_get_response_data_links import ( + TestrunCommentsSingleGetResponseDataLinks, +) +from .testrun_comments_single_get_response_data_meta import ( + TestrunCommentsSingleGetResponseDataMeta, +) +from .testrun_comments_single_get_response_data_meta_errors_item import ( + TestrunCommentsSingleGetResponseDataMetaErrorsItem, +) +from .testrun_comments_single_get_response_data_meta_errors_item_source import ( + TestrunCommentsSingleGetResponseDataMetaErrorsItemSource, +) +from .testrun_comments_single_get_response_data_meta_errors_item_source_resource import ( + TestrunCommentsSingleGetResponseDataMetaErrorsItemSourceResource, +) +from .testrun_comments_single_get_response_data_relationships import ( + TestrunCommentsSingleGetResponseDataRelationships, +) +from .testrun_comments_single_get_response_data_relationships_author import ( + TestrunCommentsSingleGetResponseDataRelationshipsAuthor, +) +from .testrun_comments_single_get_response_data_relationships_author_data import ( + TestrunCommentsSingleGetResponseDataRelationshipsAuthorData, +) +from .testrun_comments_single_get_response_data_relationships_author_data_type import ( + TestrunCommentsSingleGetResponseDataRelationshipsAuthorDataType, +) +from .testrun_comments_single_get_response_data_relationships_child_comments import ( + TestrunCommentsSingleGetResponseDataRelationshipsChildComments, +) +from .testrun_comments_single_get_response_data_relationships_child_comments_data_item import ( + TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsDataItem, +) +from .testrun_comments_single_get_response_data_relationships_child_comments_data_item_type import ( + TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsDataItemType, +) +from .testrun_comments_single_get_response_data_relationships_child_comments_meta import ( + TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsMeta, +) +from .testrun_comments_single_get_response_data_relationships_parent_comment import ( + TestrunCommentsSingleGetResponseDataRelationshipsParentComment, +) +from .testrun_comments_single_get_response_data_relationships_parent_comment_data import ( + TestrunCommentsSingleGetResponseDataRelationshipsParentCommentData, +) +from .testrun_comments_single_get_response_data_relationships_parent_comment_data_type import ( + TestrunCommentsSingleGetResponseDataRelationshipsParentCommentDataType, +) +from .testrun_comments_single_get_response_data_relationships_project import ( + TestrunCommentsSingleGetResponseDataRelationshipsProject, +) +from .testrun_comments_single_get_response_data_relationships_project_data import ( + TestrunCommentsSingleGetResponseDataRelationshipsProjectData, +) +from .testrun_comments_single_get_response_data_relationships_project_data_type import ( + TestrunCommentsSingleGetResponseDataRelationshipsProjectDataType, +) +from .testrun_comments_single_get_response_data_type import ( + TestrunCommentsSingleGetResponseDataType, +) +from .testrun_comments_single_get_response_included_item import ( + TestrunCommentsSingleGetResponseIncludedItem, +) +from .testrun_comments_single_get_response_links import ( + TestrunCommentsSingleGetResponseLinks, +) +from .testrun_comments_single_patch_request import ( + TestrunCommentsSinglePatchRequest, +) +from .testrun_comments_single_patch_request_data import ( + TestrunCommentsSinglePatchRequestData, +) +from .testrun_comments_single_patch_request_data_attributes import ( + TestrunCommentsSinglePatchRequestDataAttributes, +) +from .testrun_comments_single_patch_request_data_type import ( + TestrunCommentsSinglePatchRequestDataType, +) +from .testruns_list_get_response import TestrunsListGetResponse +from .testruns_list_get_response_data_item import ( + TestrunsListGetResponseDataItem, +) +from .testruns_list_get_response_data_item_attributes import ( + TestrunsListGetResponseDataItemAttributes, +) +from .testruns_list_get_response_data_item_attributes_home_page_content import ( + TestrunsListGetResponseDataItemAttributesHomePageContent, +) +from .testruns_list_get_response_data_item_attributes_home_page_content_type import ( + TestrunsListGetResponseDataItemAttributesHomePageContentType, +) +from .testruns_list_get_response_data_item_attributes_select_test_cases_by import ( + TestrunsListGetResponseDataItemAttributesSelectTestCasesBy, +) +from .testruns_list_get_response_data_item_links import ( + TestrunsListGetResponseDataItemLinks, +) +from .testruns_list_get_response_data_item_meta import ( + TestrunsListGetResponseDataItemMeta, +) +from .testruns_list_get_response_data_item_meta_errors_item import ( + TestrunsListGetResponseDataItemMetaErrorsItem, +) +from .testruns_list_get_response_data_item_meta_errors_item_source import ( + TestrunsListGetResponseDataItemMetaErrorsItemSource, +) +from .testruns_list_get_response_data_item_meta_errors_item_source_resource import ( + TestrunsListGetResponseDataItemMetaErrorsItemSourceResource, +) +from .testruns_list_get_response_data_item_relationships import ( + TestrunsListGetResponseDataItemRelationships, +) +from .testruns_list_get_response_data_item_relationships_author import ( + TestrunsListGetResponseDataItemRelationshipsAuthor, +) +from .testruns_list_get_response_data_item_relationships_author_data import ( + TestrunsListGetResponseDataItemRelationshipsAuthorData, +) +from .testruns_list_get_response_data_item_relationships_author_data_type import ( + TestrunsListGetResponseDataItemRelationshipsAuthorDataType, +) +from .testruns_list_get_response_data_item_relationships_document import ( + TestrunsListGetResponseDataItemRelationshipsDocument, +) +from .testruns_list_get_response_data_item_relationships_document_data import ( + TestrunsListGetResponseDataItemRelationshipsDocumentData, +) +from .testruns_list_get_response_data_item_relationships_document_data_type import ( + TestrunsListGetResponseDataItemRelationshipsDocumentDataType, +) +from .testruns_list_get_response_data_item_relationships_project import ( + TestrunsListGetResponseDataItemRelationshipsProject, +) +from .testruns_list_get_response_data_item_relationships_project_data import ( + TestrunsListGetResponseDataItemRelationshipsProjectData, +) +from .testruns_list_get_response_data_item_relationships_project_data_type import ( + TestrunsListGetResponseDataItemRelationshipsProjectDataType, +) +from .testruns_list_get_response_data_item_relationships_project_span import ( + TestrunsListGetResponseDataItemRelationshipsProjectSpan, +) +from .testruns_list_get_response_data_item_relationships_project_span_data_item import ( + TestrunsListGetResponseDataItemRelationshipsProjectSpanDataItem, +) +from .testruns_list_get_response_data_item_relationships_project_span_data_item_type import ( + TestrunsListGetResponseDataItemRelationshipsProjectSpanDataItemType, +) +from .testruns_list_get_response_data_item_relationships_project_span_meta import ( + TestrunsListGetResponseDataItemRelationshipsProjectSpanMeta, +) +from .testruns_list_get_response_data_item_relationships_summary_defect import ( + TestrunsListGetResponseDataItemRelationshipsSummaryDefect, +) +from .testruns_list_get_response_data_item_relationships_summary_defect_data import ( + TestrunsListGetResponseDataItemRelationshipsSummaryDefectData, +) +from .testruns_list_get_response_data_item_relationships_summary_defect_data_type import ( + TestrunsListGetResponseDataItemRelationshipsSummaryDefectDataType, +) +from .testruns_list_get_response_data_item_relationships_template import ( + TestrunsListGetResponseDataItemRelationshipsTemplate, +) +from .testruns_list_get_response_data_item_relationships_template_data import ( + TestrunsListGetResponseDataItemRelationshipsTemplateData, +) +from .testruns_list_get_response_data_item_relationships_template_data_type import ( + TestrunsListGetResponseDataItemRelationshipsTemplateDataType, +) +from .testruns_list_get_response_data_item_type import ( + TestrunsListGetResponseDataItemType, +) +from .testruns_list_get_response_included_item import ( + TestrunsListGetResponseIncludedItem, +) +from .testruns_list_get_response_links import TestrunsListGetResponseLinks +from .testruns_list_get_response_meta import TestrunsListGetResponseMeta +from .testruns_list_post_request import TestrunsListPostRequest +from .testruns_list_post_request_data_item import ( + TestrunsListPostRequestDataItem, +) +from .testruns_list_post_request_data_item_attributes import ( + TestrunsListPostRequestDataItemAttributes, +) +from .testruns_list_post_request_data_item_attributes_home_page_content import ( + TestrunsListPostRequestDataItemAttributesHomePageContent, +) +from .testruns_list_post_request_data_item_attributes_home_page_content_type import ( + TestrunsListPostRequestDataItemAttributesHomePageContentType, +) +from .testruns_list_post_request_data_item_attributes_select_test_cases_by import ( + TestrunsListPostRequestDataItemAttributesSelectTestCasesBy, +) +from .testruns_list_post_request_data_item_relationships import ( + TestrunsListPostRequestDataItemRelationships, +) +from .testruns_list_post_request_data_item_relationships_document import ( + TestrunsListPostRequestDataItemRelationshipsDocument, +) +from .testruns_list_post_request_data_item_relationships_document_data import ( + TestrunsListPostRequestDataItemRelationshipsDocumentData, +) +from .testruns_list_post_request_data_item_relationships_document_data_type import ( + TestrunsListPostRequestDataItemRelationshipsDocumentDataType, +) +from .testruns_list_post_request_data_item_relationships_project_span import ( + TestrunsListPostRequestDataItemRelationshipsProjectSpan, +) +from .testruns_list_post_request_data_item_relationships_project_span_data_item import ( + TestrunsListPostRequestDataItemRelationshipsProjectSpanDataItem, +) +from .testruns_list_post_request_data_item_relationships_project_span_data_item_type import ( + TestrunsListPostRequestDataItemRelationshipsProjectSpanDataItemType, +) +from .testruns_list_post_request_data_item_relationships_summary_defect import ( + TestrunsListPostRequestDataItemRelationshipsSummaryDefect, +) +from .testruns_list_post_request_data_item_relationships_summary_defect_data import ( + TestrunsListPostRequestDataItemRelationshipsSummaryDefectData, +) +from .testruns_list_post_request_data_item_relationships_summary_defect_data_type import ( + TestrunsListPostRequestDataItemRelationshipsSummaryDefectDataType, +) +from .testruns_list_post_request_data_item_relationships_template import ( + TestrunsListPostRequestDataItemRelationshipsTemplate, +) +from .testruns_list_post_request_data_item_relationships_template_data import ( + TestrunsListPostRequestDataItemRelationshipsTemplateData, +) +from .testruns_list_post_request_data_item_relationships_template_data_type import ( + TestrunsListPostRequestDataItemRelationshipsTemplateDataType, +) +from .testruns_list_post_request_data_item_type import ( + TestrunsListPostRequestDataItemType, +) +from .testruns_list_post_response import TestrunsListPostResponse +from .testruns_list_post_response_data_item import ( + TestrunsListPostResponseDataItem, +) +from .testruns_list_post_response_data_item_links import ( + TestrunsListPostResponseDataItemLinks, +) +from .testruns_list_post_response_data_item_type import ( + TestrunsListPostResponseDataItemType, +) +from .testruns_single_get_response import TestrunsSingleGetResponse +from .testruns_single_get_response_data import TestrunsSingleGetResponseData +from .testruns_single_get_response_data_attributes import ( + TestrunsSingleGetResponseDataAttributes, +) +from .testruns_single_get_response_data_attributes_home_page_content import ( + TestrunsSingleGetResponseDataAttributesHomePageContent, +) +from .testruns_single_get_response_data_attributes_home_page_content_type import ( + TestrunsSingleGetResponseDataAttributesHomePageContentType, +) +from .testruns_single_get_response_data_attributes_select_test_cases_by import ( + TestrunsSingleGetResponseDataAttributesSelectTestCasesBy, +) +from .testruns_single_get_response_data_links import ( + TestrunsSingleGetResponseDataLinks, +) +from .testruns_single_get_response_data_meta import ( + TestrunsSingleGetResponseDataMeta, +) +from .testruns_single_get_response_data_meta_errors_item import ( + TestrunsSingleGetResponseDataMetaErrorsItem, +) +from .testruns_single_get_response_data_meta_errors_item_source import ( + TestrunsSingleGetResponseDataMetaErrorsItemSource, +) +from .testruns_single_get_response_data_meta_errors_item_source_resource import ( + TestrunsSingleGetResponseDataMetaErrorsItemSourceResource, +) +from .testruns_single_get_response_data_relationships import ( + TestrunsSingleGetResponseDataRelationships, +) +from .testruns_single_get_response_data_relationships_author import ( + TestrunsSingleGetResponseDataRelationshipsAuthor, +) +from .testruns_single_get_response_data_relationships_author_data import ( + TestrunsSingleGetResponseDataRelationshipsAuthorData, +) +from .testruns_single_get_response_data_relationships_author_data_type import ( + TestrunsSingleGetResponseDataRelationshipsAuthorDataType, +) +from .testruns_single_get_response_data_relationships_document import ( + TestrunsSingleGetResponseDataRelationshipsDocument, +) +from .testruns_single_get_response_data_relationships_document_data import ( + TestrunsSingleGetResponseDataRelationshipsDocumentData, +) +from .testruns_single_get_response_data_relationships_document_data_type import ( + TestrunsSingleGetResponseDataRelationshipsDocumentDataType, +) +from .testruns_single_get_response_data_relationships_project import ( + TestrunsSingleGetResponseDataRelationshipsProject, +) +from .testruns_single_get_response_data_relationships_project_data import ( + TestrunsSingleGetResponseDataRelationshipsProjectData, +) +from .testruns_single_get_response_data_relationships_project_data_type import ( + TestrunsSingleGetResponseDataRelationshipsProjectDataType, +) +from .testruns_single_get_response_data_relationships_project_span import ( + TestrunsSingleGetResponseDataRelationshipsProjectSpan, +) +from .testruns_single_get_response_data_relationships_project_span_data_item import ( + TestrunsSingleGetResponseDataRelationshipsProjectSpanDataItem, +) +from .testruns_single_get_response_data_relationships_project_span_data_item_type import ( + TestrunsSingleGetResponseDataRelationshipsProjectSpanDataItemType, +) +from .testruns_single_get_response_data_relationships_project_span_meta import ( + TestrunsSingleGetResponseDataRelationshipsProjectSpanMeta, +) +from .testruns_single_get_response_data_relationships_summary_defect import ( + TestrunsSingleGetResponseDataRelationshipsSummaryDefect, +) +from .testruns_single_get_response_data_relationships_summary_defect_data import ( + TestrunsSingleGetResponseDataRelationshipsSummaryDefectData, +) +from .testruns_single_get_response_data_relationships_summary_defect_data_type import ( + TestrunsSingleGetResponseDataRelationshipsSummaryDefectDataType, +) +from .testruns_single_get_response_data_relationships_template import ( + TestrunsSingleGetResponseDataRelationshipsTemplate, +) +from .testruns_single_get_response_data_relationships_template_data import ( + TestrunsSingleGetResponseDataRelationshipsTemplateData, +) +from .testruns_single_get_response_data_relationships_template_data_type import ( + TestrunsSingleGetResponseDataRelationshipsTemplateDataType, +) +from .testruns_single_get_response_data_type import ( + TestrunsSingleGetResponseDataType, +) +from .testruns_single_get_response_included_item import ( + TestrunsSingleGetResponseIncludedItem, +) +from .testruns_single_get_response_links import TestrunsSingleGetResponseLinks +from .testruns_single_patch_request import TestrunsSinglePatchRequest +from .testruns_single_patch_request_data import TestrunsSinglePatchRequestData +from .testruns_single_patch_request_data_attributes import ( + TestrunsSinglePatchRequestDataAttributes, +) +from .testruns_single_patch_request_data_attributes_home_page_content import ( + TestrunsSinglePatchRequestDataAttributesHomePageContent, +) +from .testruns_single_patch_request_data_attributes_home_page_content_type import ( + TestrunsSinglePatchRequestDataAttributesHomePageContentType, +) +from .testruns_single_patch_request_data_attributes_select_test_cases_by import ( + TestrunsSinglePatchRequestDataAttributesSelectTestCasesBy, +) +from .testruns_single_patch_request_data_relationships import ( + TestrunsSinglePatchRequestDataRelationships, +) +from .testruns_single_patch_request_data_relationships_document import ( + TestrunsSinglePatchRequestDataRelationshipsDocument, +) +from .testruns_single_patch_request_data_relationships_document_data import ( + TestrunsSinglePatchRequestDataRelationshipsDocumentData, +) +from .testruns_single_patch_request_data_relationships_document_data_type import ( + TestrunsSinglePatchRequestDataRelationshipsDocumentDataType, +) +from .testruns_single_patch_request_data_relationships_project_span import ( + TestrunsSinglePatchRequestDataRelationshipsProjectSpan, +) +from .testruns_single_patch_request_data_relationships_project_span_data_item import ( + TestrunsSinglePatchRequestDataRelationshipsProjectSpanDataItem, +) +from .testruns_single_patch_request_data_relationships_project_span_data_item_type import ( + TestrunsSinglePatchRequestDataRelationshipsProjectSpanDataItemType, +) +from .testruns_single_patch_request_data_relationships_summary_defect import ( + TestrunsSinglePatchRequestDataRelationshipsSummaryDefect, +) +from .testruns_single_patch_request_data_relationships_summary_defect_data import ( + TestrunsSinglePatchRequestDataRelationshipsSummaryDefectData, +) +from .testruns_single_patch_request_data_relationships_summary_defect_data_type import ( + TestrunsSinglePatchRequestDataRelationshipsSummaryDefectDataType, +) +from .testruns_single_patch_request_data_type import ( + TestrunsSinglePatchRequestDataType, +) +from .teststep_results_list_get_response import TeststepResultsListGetResponse +from .teststep_results_list_get_response_data_item import ( + TeststepResultsListGetResponseDataItem, +) +from .teststep_results_list_get_response_data_item_attributes import ( + TeststepResultsListGetResponseDataItemAttributes, +) +from .teststep_results_list_get_response_data_item_attributes_comment import ( + TeststepResultsListGetResponseDataItemAttributesComment, +) +from .teststep_results_list_get_response_data_item_attributes_comment_type import ( + TeststepResultsListGetResponseDataItemAttributesCommentType, +) +from .teststep_results_list_get_response_data_item_links import ( + TeststepResultsListGetResponseDataItemLinks, +) +from .teststep_results_list_get_response_data_item_meta import ( + TeststepResultsListGetResponseDataItemMeta, +) +from .teststep_results_list_get_response_data_item_meta_errors_item import ( + TeststepResultsListGetResponseDataItemMetaErrorsItem, +) +from .teststep_results_list_get_response_data_item_meta_errors_item_source import ( + TeststepResultsListGetResponseDataItemMetaErrorsItemSource, +) +from .teststep_results_list_get_response_data_item_meta_errors_item_source_resource import ( + TeststepResultsListGetResponseDataItemMetaErrorsItemSourceResource, +) +from .teststep_results_list_get_response_data_item_relationships import ( + TeststepResultsListGetResponseDataItemRelationships, +) +from .teststep_results_list_get_response_data_item_relationships_test_step import ( + TeststepResultsListGetResponseDataItemRelationshipsTestStep, +) +from .teststep_results_list_get_response_data_item_relationships_test_step_data import ( + TeststepResultsListGetResponseDataItemRelationshipsTestStepData, +) +from .teststep_results_list_get_response_data_item_relationships_test_step_data_type import ( + TeststepResultsListGetResponseDataItemRelationshipsTestStepDataType, +) +from .teststep_results_list_get_response_data_item_type import ( + TeststepResultsListGetResponseDataItemType, +) +from .teststep_results_list_get_response_included_item import ( + TeststepResultsListGetResponseIncludedItem, +) +from .teststep_results_list_get_response_links import ( + TeststepResultsListGetResponseLinks, +) +from .teststep_results_list_get_response_meta import ( + TeststepResultsListGetResponseMeta, +) +from .teststep_results_list_post_request import TeststepResultsListPostRequest +from .teststep_results_list_post_request_data_item import ( + TeststepResultsListPostRequestDataItem, +) +from .teststep_results_list_post_request_data_item_attributes import ( + TeststepResultsListPostRequestDataItemAttributes, +) +from .teststep_results_list_post_request_data_item_attributes_comment import ( + TeststepResultsListPostRequestDataItemAttributesComment, +) +from .teststep_results_list_post_request_data_item_attributes_comment_type import ( + TeststepResultsListPostRequestDataItemAttributesCommentType, +) +from .teststep_results_list_post_request_data_item_type import ( + TeststepResultsListPostRequestDataItemType, +) +from .teststep_results_list_post_response import ( + TeststepResultsListPostResponse, +) +from .teststep_results_list_post_response_data_item import ( + TeststepResultsListPostResponseDataItem, +) +from .teststep_results_list_post_response_data_item_links import ( + TeststepResultsListPostResponseDataItemLinks, +) +from .teststep_results_list_post_response_data_item_type import ( + TeststepResultsListPostResponseDataItemType, +) +from .teststep_results_single_get_response import ( + TeststepResultsSingleGetResponse, +) +from .teststep_results_single_get_response_data import ( + TeststepResultsSingleGetResponseData, +) +from .teststep_results_single_get_response_data_attributes import ( + TeststepResultsSingleGetResponseDataAttributes, +) +from .teststep_results_single_get_response_data_attributes_comment import ( + TeststepResultsSingleGetResponseDataAttributesComment, +) +from .teststep_results_single_get_response_data_attributes_comment_type import ( + TeststepResultsSingleGetResponseDataAttributesCommentType, +) +from .teststep_results_single_get_response_data_links import ( + TeststepResultsSingleGetResponseDataLinks, +) +from .teststep_results_single_get_response_data_meta import ( + TeststepResultsSingleGetResponseDataMeta, +) +from .teststep_results_single_get_response_data_meta_errors_item import ( + TeststepResultsSingleGetResponseDataMetaErrorsItem, +) +from .teststep_results_single_get_response_data_meta_errors_item_source import ( + TeststepResultsSingleGetResponseDataMetaErrorsItemSource, +) +from .teststep_results_single_get_response_data_meta_errors_item_source_resource import ( + TeststepResultsSingleGetResponseDataMetaErrorsItemSourceResource, +) +from .teststep_results_single_get_response_data_relationships import ( + TeststepResultsSingleGetResponseDataRelationships, +) +from .teststep_results_single_get_response_data_relationships_test_step import ( + TeststepResultsSingleGetResponseDataRelationshipsTestStep, +) +from .teststep_results_single_get_response_data_relationships_test_step_data import ( + TeststepResultsSingleGetResponseDataRelationshipsTestStepData, +) +from .teststep_results_single_get_response_data_relationships_test_step_data_type import ( + TeststepResultsSingleGetResponseDataRelationshipsTestStepDataType, +) +from .teststep_results_single_get_response_data_type import ( + TeststepResultsSingleGetResponseDataType, +) +from .teststep_results_single_get_response_included_item import ( + TeststepResultsSingleGetResponseIncludedItem, +) +from .teststep_results_single_get_response_links import ( + TeststepResultsSingleGetResponseLinks, +) +from .teststepresult_attachments_list_get_response import ( + TeststepresultAttachmentsListGetResponse, +) +from .teststepresult_attachments_list_get_response_data_item import ( + TeststepresultAttachmentsListGetResponseDataItem, +) +from .teststepresult_attachments_list_get_response_data_item_attributes import ( + TeststepresultAttachmentsListGetResponseDataItemAttributes, +) +from .teststepresult_attachments_list_get_response_data_item_links import ( + TeststepresultAttachmentsListGetResponseDataItemLinks, +) +from .teststepresult_attachments_list_get_response_data_item_meta import ( + TeststepresultAttachmentsListGetResponseDataItemMeta, +) +from .teststepresult_attachments_list_get_response_data_item_meta_errors_item import ( + TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItem, +) +from .teststepresult_attachments_list_get_response_data_item_meta_errors_item_source import ( + TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSource, +) +from .teststepresult_attachments_list_get_response_data_item_meta_errors_item_source_resource import ( + TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, +) +from .teststepresult_attachments_list_get_response_data_item_relationships import ( + TeststepresultAttachmentsListGetResponseDataItemRelationships, +) +from .teststepresult_attachments_list_get_response_data_item_relationships_author import ( + TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthor, +) +from .teststepresult_attachments_list_get_response_data_item_relationships_author_data import ( + TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthorData, +) +from .teststepresult_attachments_list_get_response_data_item_relationships_author_data_type import ( + TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthorDataType, +) +from .teststepresult_attachments_list_get_response_data_item_relationships_project import ( + TeststepresultAttachmentsListGetResponseDataItemRelationshipsProject, +) +from .teststepresult_attachments_list_get_response_data_item_relationships_project_data import ( + TeststepresultAttachmentsListGetResponseDataItemRelationshipsProjectData, +) +from .teststepresult_attachments_list_get_response_data_item_relationships_project_data_type import ( + TeststepresultAttachmentsListGetResponseDataItemRelationshipsProjectDataType, +) +from .teststepresult_attachments_list_get_response_data_item_type import ( + TeststepresultAttachmentsListGetResponseDataItemType, +) +from .teststepresult_attachments_list_get_response_included_item import ( + TeststepresultAttachmentsListGetResponseIncludedItem, +) +from .teststepresult_attachments_list_get_response_links import ( + TeststepresultAttachmentsListGetResponseLinks, +) +from .teststepresult_attachments_list_get_response_meta import ( + TeststepresultAttachmentsListGetResponseMeta, +) +from .teststepresult_attachments_list_post_request import ( + TeststepresultAttachmentsListPostRequest, +) +from .teststepresult_attachments_list_post_request_data_item import ( + TeststepresultAttachmentsListPostRequestDataItem, +) +from .teststepresult_attachments_list_post_request_data_item_attributes import ( + TeststepresultAttachmentsListPostRequestDataItemAttributes, +) +from .teststepresult_attachments_list_post_request_data_item_type import ( + TeststepresultAttachmentsListPostRequestDataItemType, +) +from .teststepresult_attachments_list_post_response import ( + TeststepresultAttachmentsListPostResponse, +) +from .teststepresult_attachments_list_post_response_data_item import ( + TeststepresultAttachmentsListPostResponseDataItem, +) +from .teststepresult_attachments_list_post_response_data_item_links import ( + TeststepresultAttachmentsListPostResponseDataItemLinks, +) +from .teststepresult_attachments_list_post_response_data_item_type import ( + TeststepresultAttachmentsListPostResponseDataItemType, +) +from .teststepresult_attachments_single_get_response import ( + TeststepresultAttachmentsSingleGetResponse, +) +from .teststepresult_attachments_single_get_response_data import ( + TeststepresultAttachmentsSingleGetResponseData, +) +from .teststepresult_attachments_single_get_response_data_attributes import ( + TeststepresultAttachmentsSingleGetResponseDataAttributes, +) +from .teststepresult_attachments_single_get_response_data_links import ( + TeststepresultAttachmentsSingleGetResponseDataLinks, +) +from .teststepresult_attachments_single_get_response_data_meta import ( + TeststepresultAttachmentsSingleGetResponseDataMeta, +) +from .teststepresult_attachments_single_get_response_data_meta_errors_item import ( + TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItem, +) +from .teststepresult_attachments_single_get_response_data_meta_errors_item_source import ( + TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSource, +) +from .teststepresult_attachments_single_get_response_data_meta_errors_item_source_resource import ( + TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, +) +from .teststepresult_attachments_single_get_response_data_relationships import ( + TeststepresultAttachmentsSingleGetResponseDataRelationships, +) +from .teststepresult_attachments_single_get_response_data_relationships_author import ( + TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthor, +) +from .teststepresult_attachments_single_get_response_data_relationships_author_data import ( + TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthorData, +) +from .teststepresult_attachments_single_get_response_data_relationships_author_data_type import ( + TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthorDataType, +) +from .teststepresult_attachments_single_get_response_data_relationships_project import ( + TeststepresultAttachmentsSingleGetResponseDataRelationshipsProject, +) +from .teststepresult_attachments_single_get_response_data_relationships_project_data import ( + TeststepresultAttachmentsSingleGetResponseDataRelationshipsProjectData, +) +from .teststepresult_attachments_single_get_response_data_relationships_project_data_type import ( + TeststepresultAttachmentsSingleGetResponseDataRelationshipsProjectDataType, +) +from .teststepresult_attachments_single_get_response_data_type import ( + TeststepresultAttachmentsSingleGetResponseDataType, +) +from .teststepresult_attachments_single_get_response_included_item import ( + TeststepresultAttachmentsSingleGetResponseIncludedItem, +) +from .teststepresult_attachments_single_get_response_links import ( + TeststepresultAttachmentsSingleGetResponseLinks, +) +from .teststeps_list_delete_request import TeststepsListDeleteRequest +from .teststeps_list_delete_request_data_item import ( + TeststepsListDeleteRequestDataItem, +) +from .teststeps_list_delete_request_data_item_type import ( + TeststepsListDeleteRequestDataItemType, +) +from .teststeps_list_get_response import TeststepsListGetResponse +from .teststeps_list_get_response_data_item import ( + TeststepsListGetResponseDataItem, +) +from .teststeps_list_get_response_data_item_attributes import ( + TeststepsListGetResponseDataItemAttributes, +) +from .teststeps_list_get_response_data_item_attributes_values_item import ( + TeststepsListGetResponseDataItemAttributesValuesItem, +) +from .teststeps_list_get_response_data_item_attributes_values_item_type import ( + TeststepsListGetResponseDataItemAttributesValuesItemType, +) +from .teststeps_list_get_response_data_item_links import ( + TeststepsListGetResponseDataItemLinks, +) +from .teststeps_list_get_response_data_item_meta import ( + TeststepsListGetResponseDataItemMeta, +) +from .teststeps_list_get_response_data_item_meta_errors_item import ( + TeststepsListGetResponseDataItemMetaErrorsItem, +) +from .teststeps_list_get_response_data_item_meta_errors_item_source import ( + TeststepsListGetResponseDataItemMetaErrorsItemSource, +) +from .teststeps_list_get_response_data_item_meta_errors_item_source_resource import ( + TeststepsListGetResponseDataItemMetaErrorsItemSourceResource, +) +from .teststeps_list_get_response_data_item_type import ( + TeststepsListGetResponseDataItemType, +) +from .teststeps_list_get_response_included_item import ( + TeststepsListGetResponseIncludedItem, +) +from .teststeps_list_get_response_links import TeststepsListGetResponseLinks +from .teststeps_list_get_response_meta import TeststepsListGetResponseMeta +from .teststeps_list_patch_request import TeststepsListPatchRequest +from .teststeps_list_patch_request_data_item import ( + TeststepsListPatchRequestDataItem, +) +from .teststeps_list_patch_request_data_item_attributes import ( + TeststepsListPatchRequestDataItemAttributes, +) +from .teststeps_list_patch_request_data_item_attributes_values_item import ( + TeststepsListPatchRequestDataItemAttributesValuesItem, +) +from .teststeps_list_patch_request_data_item_attributes_values_item_type import ( + TeststepsListPatchRequestDataItemAttributesValuesItemType, +) +from .teststeps_list_patch_request_data_item_type import ( + TeststepsListPatchRequestDataItemType, +) +from .teststeps_list_post_request import TeststepsListPostRequest +from .teststeps_list_post_request_data_item import ( + TeststepsListPostRequestDataItem, +) +from .teststeps_list_post_request_data_item_attributes import ( + TeststepsListPostRequestDataItemAttributes, +) +from .teststeps_list_post_request_data_item_attributes_values_item import ( + TeststepsListPostRequestDataItemAttributesValuesItem, +) +from .teststeps_list_post_request_data_item_attributes_values_item_type import ( + TeststepsListPostRequestDataItemAttributesValuesItemType, +) +from .teststeps_list_post_request_data_item_type import ( + TeststepsListPostRequestDataItemType, +) +from .teststeps_list_post_response import TeststepsListPostResponse +from .teststeps_list_post_response_data_item import ( + TeststepsListPostResponseDataItem, +) +from .teststeps_list_post_response_data_item_links import ( + TeststepsListPostResponseDataItemLinks, +) +from .teststeps_list_post_response_data_item_type import ( + TeststepsListPostResponseDataItemType, +) +from .teststeps_single_get_response import TeststepsSingleGetResponse +from .teststeps_single_get_response_data import TeststepsSingleGetResponseData +from .teststeps_single_get_response_data_attributes import ( + TeststepsSingleGetResponseDataAttributes, +) +from .teststeps_single_get_response_data_attributes_values_item import ( + TeststepsSingleGetResponseDataAttributesValuesItem, +) +from .teststeps_single_get_response_data_attributes_values_item_type import ( + TeststepsSingleGetResponseDataAttributesValuesItemType, +) +from .teststeps_single_get_response_data_links import ( + TeststepsSingleGetResponseDataLinks, +) +from .teststeps_single_get_response_data_meta import ( + TeststepsSingleGetResponseDataMeta, +) +from .teststeps_single_get_response_data_meta_errors_item import ( + TeststepsSingleGetResponseDataMetaErrorsItem, +) +from .teststeps_single_get_response_data_meta_errors_item_source import ( + TeststepsSingleGetResponseDataMetaErrorsItemSource, +) +from .teststeps_single_get_response_data_meta_errors_item_source_resource import ( + TeststepsSingleGetResponseDataMetaErrorsItemSourceResource, +) +from .teststeps_single_get_response_data_type import ( + TeststepsSingleGetResponseDataType, +) +from .teststeps_single_get_response_included_item import ( + TeststepsSingleGetResponseIncludedItem, +) +from .teststeps_single_get_response_links import ( + TeststepsSingleGetResponseLinks, +) +from .teststeps_single_patch_request import TeststepsSinglePatchRequest +from .teststeps_single_patch_request_data import ( + TeststepsSinglePatchRequestData, +) +from .teststeps_single_patch_request_data_attributes import ( + TeststepsSinglePatchRequestDataAttributes, +) +from .teststeps_single_patch_request_data_attributes_values_item import ( + TeststepsSinglePatchRequestDataAttributesValuesItem, +) +from .teststeps_single_patch_request_data_attributes_values_item_type import ( + TeststepsSinglePatchRequestDataAttributesValuesItemType, +) +from .teststeps_single_patch_request_data_type import ( + TeststepsSinglePatchRequestDataType, +) +from .update_avatar_request_body import UpdateAvatarRequestBody +from .usergroups_single_get_response import UsergroupsSingleGetResponse +from .usergroups_single_get_response_data import ( + UsergroupsSingleGetResponseData, ) from .usergroups_single_get_response_data_attributes import ( UsergroupsSingleGetResponseDataAttributes, @@ -1328,6 +3912,9 @@ from .usergroups_single_get_response_data_meta_errors_item_source import ( UsergroupsSingleGetResponseDataMetaErrorsItemSource, ) +from .usergroups_single_get_response_data_meta_errors_item_source_resource import ( + UsergroupsSingleGetResponseDataMetaErrorsItemSourceResource, +) from .usergroups_single_get_response_data_relationships import ( UsergroupsSingleGetResponseDataRelationships, ) @@ -1399,6 +3986,9 @@ from .users_list_get_response_data_item_meta_errors_item_source import ( UsersListGetResponseDataItemMetaErrorsItemSource, ) +from .users_list_get_response_data_item_meta_errors_item_source_resource import ( + UsersListGetResponseDataItemMetaErrorsItemSourceResource, +) from .users_list_get_response_data_item_relationships import ( UsersListGetResponseDataItemRelationships, ) @@ -1519,6 +4109,9 @@ from .users_single_get_response_data_meta_errors_item_source import ( UsersSingleGetResponseDataMetaErrorsItemSource, ) +from .users_single_get_response_data_meta_errors_item_source_resource import ( + UsersSingleGetResponseDataMetaErrorsItemSourceResource, +) from .users_single_get_response_data_relationships import ( UsersSingleGetResponseDataRelationships, ) @@ -1607,6 +4200,195 @@ from .users_single_patch_request_data_type import ( UsersSinglePatchRequestDataType, ) +from .workflow_actions_action_response_body import ( + WorkflowActionsActionResponseBody, +) +from .workflow_actions_action_response_body_data_item import ( + WorkflowActionsActionResponseBodyDataItem, +) +from .workflow_actions_action_response_body_links import ( + WorkflowActionsActionResponseBodyLinks, +) +from .workflow_actions_action_response_body_meta import ( + WorkflowActionsActionResponseBodyMeta, +) +from .workitem_approvals_list_delete_request import ( + WorkitemApprovalsListDeleteRequest, +) +from .workitem_approvals_list_delete_request_data_item import ( + WorkitemApprovalsListDeleteRequestDataItem, +) +from .workitem_approvals_list_delete_request_data_item_type import ( + WorkitemApprovalsListDeleteRequestDataItemType, +) +from .workitem_approvals_list_get_response import ( + WorkitemApprovalsListGetResponse, +) +from .workitem_approvals_list_get_response_data_item import ( + WorkitemApprovalsListGetResponseDataItem, +) +from .workitem_approvals_list_get_response_data_item_attributes import ( + WorkitemApprovalsListGetResponseDataItemAttributes, +) +from .workitem_approvals_list_get_response_data_item_attributes_status import ( + WorkitemApprovalsListGetResponseDataItemAttributesStatus, +) +from .workitem_approvals_list_get_response_data_item_links import ( + WorkitemApprovalsListGetResponseDataItemLinks, +) +from .workitem_approvals_list_get_response_data_item_meta import ( + WorkitemApprovalsListGetResponseDataItemMeta, +) +from .workitem_approvals_list_get_response_data_item_meta_errors_item import ( + WorkitemApprovalsListGetResponseDataItemMetaErrorsItem, +) +from .workitem_approvals_list_get_response_data_item_meta_errors_item_source import ( + WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSource, +) +from .workitem_approvals_list_get_response_data_item_meta_errors_item_source_resource import ( + WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSourceResource, +) +from .workitem_approvals_list_get_response_data_item_relationships import ( + WorkitemApprovalsListGetResponseDataItemRelationships, +) +from .workitem_approvals_list_get_response_data_item_relationships_user import ( + WorkitemApprovalsListGetResponseDataItemRelationshipsUser, +) +from .workitem_approvals_list_get_response_data_item_relationships_user_data import ( + WorkitemApprovalsListGetResponseDataItemRelationshipsUserData, +) +from .workitem_approvals_list_get_response_data_item_relationships_user_data_type import ( + WorkitemApprovalsListGetResponseDataItemRelationshipsUserDataType, +) +from .workitem_approvals_list_get_response_data_item_type import ( + WorkitemApprovalsListGetResponseDataItemType, +) +from .workitem_approvals_list_get_response_included_item import ( + WorkitemApprovalsListGetResponseIncludedItem, +) +from .workitem_approvals_list_get_response_links import ( + WorkitemApprovalsListGetResponseLinks, +) +from .workitem_approvals_list_get_response_meta import ( + WorkitemApprovalsListGetResponseMeta, +) +from .workitem_approvals_list_patch_request import ( + WorkitemApprovalsListPatchRequest, +) +from .workitem_approvals_list_patch_request_data_item import ( + WorkitemApprovalsListPatchRequestDataItem, +) +from .workitem_approvals_list_patch_request_data_item_attributes import ( + WorkitemApprovalsListPatchRequestDataItemAttributes, +) +from .workitem_approvals_list_patch_request_data_item_attributes_status import ( + WorkitemApprovalsListPatchRequestDataItemAttributesStatus, +) +from .workitem_approvals_list_patch_request_data_item_type import ( + WorkitemApprovalsListPatchRequestDataItemType, +) +from .workitem_approvals_list_post_request import ( + WorkitemApprovalsListPostRequest, +) +from .workitem_approvals_list_post_request_data_item import ( + WorkitemApprovalsListPostRequestDataItem, +) +from .workitem_approvals_list_post_request_data_item_attributes import ( + WorkitemApprovalsListPostRequestDataItemAttributes, +) +from .workitem_approvals_list_post_request_data_item_attributes_status import ( + WorkitemApprovalsListPostRequestDataItemAttributesStatus, +) +from .workitem_approvals_list_post_request_data_item_relationships import ( + WorkitemApprovalsListPostRequestDataItemRelationships, +) +from .workitem_approvals_list_post_request_data_item_relationships_user import ( + WorkitemApprovalsListPostRequestDataItemRelationshipsUser, +) +from .workitem_approvals_list_post_request_data_item_relationships_user_data import ( + WorkitemApprovalsListPostRequestDataItemRelationshipsUserData, +) +from .workitem_approvals_list_post_request_data_item_relationships_user_data_type import ( + WorkitemApprovalsListPostRequestDataItemRelationshipsUserDataType, +) +from .workitem_approvals_list_post_request_data_item_type import ( + WorkitemApprovalsListPostRequestDataItemType, +) +from .workitem_approvals_list_post_response import ( + WorkitemApprovalsListPostResponse, +) +from .workitem_approvals_list_post_response_data_item import ( + WorkitemApprovalsListPostResponseDataItem, +) +from .workitem_approvals_list_post_response_data_item_links import ( + WorkitemApprovalsListPostResponseDataItemLinks, +) +from .workitem_approvals_list_post_response_data_item_type import ( + WorkitemApprovalsListPostResponseDataItemType, +) +from .workitem_approvals_single_get_response import ( + WorkitemApprovalsSingleGetResponse, +) +from .workitem_approvals_single_get_response_data import ( + WorkitemApprovalsSingleGetResponseData, +) +from .workitem_approvals_single_get_response_data_attributes import ( + WorkitemApprovalsSingleGetResponseDataAttributes, +) +from .workitem_approvals_single_get_response_data_attributes_status import ( + WorkitemApprovalsSingleGetResponseDataAttributesStatus, +) +from .workitem_approvals_single_get_response_data_links import ( + WorkitemApprovalsSingleGetResponseDataLinks, +) +from .workitem_approvals_single_get_response_data_meta import ( + WorkitemApprovalsSingleGetResponseDataMeta, +) +from .workitem_approvals_single_get_response_data_meta_errors_item import ( + WorkitemApprovalsSingleGetResponseDataMetaErrorsItem, +) +from .workitem_approvals_single_get_response_data_meta_errors_item_source import ( + WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSource, +) +from .workitem_approvals_single_get_response_data_meta_errors_item_source_resource import ( + WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSourceResource, +) +from .workitem_approvals_single_get_response_data_relationships import ( + WorkitemApprovalsSingleGetResponseDataRelationships, +) +from .workitem_approvals_single_get_response_data_relationships_user import ( + WorkitemApprovalsSingleGetResponseDataRelationshipsUser, +) +from .workitem_approvals_single_get_response_data_relationships_user_data import ( + WorkitemApprovalsSingleGetResponseDataRelationshipsUserData, +) +from .workitem_approvals_single_get_response_data_relationships_user_data_type import ( + WorkitemApprovalsSingleGetResponseDataRelationshipsUserDataType, +) +from .workitem_approvals_single_get_response_data_type import ( + WorkitemApprovalsSingleGetResponseDataType, +) +from .workitem_approvals_single_get_response_included_item import ( + WorkitemApprovalsSingleGetResponseIncludedItem, +) +from .workitem_approvals_single_get_response_links import ( + WorkitemApprovalsSingleGetResponseLinks, +) +from .workitem_approvals_single_patch_request import ( + WorkitemApprovalsSinglePatchRequest, +) +from .workitem_approvals_single_patch_request_data import ( + WorkitemApprovalsSinglePatchRequestData, +) +from .workitem_approvals_single_patch_request_data_attributes import ( + WorkitemApprovalsSinglePatchRequestDataAttributes, +) +from .workitem_approvals_single_patch_request_data_attributes_status import ( + WorkitemApprovalsSinglePatchRequestDataAttributesStatus, +) +from .workitem_approvals_single_patch_request_data_type import ( + WorkitemApprovalsSinglePatchRequestDataType, +) from .workitem_attachments_list_get_response import ( WorkitemAttachmentsListGetResponse, ) @@ -1628,6 +4410,9 @@ from .workitem_attachments_list_get_response_data_item_meta_errors_item_source import ( WorkitemAttachmentsListGetResponseDataItemMetaErrorsItemSource, ) +from .workitem_attachments_list_get_response_data_item_meta_errors_item_source_resource import ( + WorkitemAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, +) from .workitem_attachments_list_get_response_data_item_relationships import ( WorkitemAttachmentsListGetResponseDataItemRelationships, ) @@ -1706,6 +4491,9 @@ from .workitem_attachments_single_get_response_data_meta_errors_item_source import ( WorkitemAttachmentsSingleGetResponseDataMetaErrorsItemSource, ) +from .workitem_attachments_single_get_response_data_meta_errors_item_source_resource import ( + WorkitemAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, +) from .workitem_attachments_single_get_response_data_relationships import ( WorkitemAttachmentsSingleGetResponseDataRelationships, ) @@ -1775,6 +4563,9 @@ from .workitem_comments_list_get_response_data_item_meta_errors_item_source import ( WorkitemCommentsListGetResponseDataItemMetaErrorsItemSource, ) +from .workitem_comments_list_get_response_data_item_meta_errors_item_source_resource import ( + WorkitemCommentsListGetResponseDataItemMetaErrorsItemSourceResource, +) from .workitem_comments_list_get_response_data_item_relationships import ( WorkitemCommentsListGetResponseDataItemRelationships, ) @@ -1907,6 +4698,9 @@ from .workitem_comments_single_get_response_data_meta_errors_item_source import ( WorkitemCommentsSingleGetResponseDataMetaErrorsItemSource, ) +from .workitem_comments_single_get_response_data_meta_errors_item_source_resource import ( + WorkitemCommentsSingleGetResponseDataMetaErrorsItemSourceResource, +) from .workitem_comments_single_get_response_data_relationships import ( WorkitemCommentsSingleGetResponseDataRelationships, ) @@ -2005,9 +4799,24 @@ from .workitems_list_get_response_data_item_meta_errors_item_source import ( WorkitemsListGetResponseDataItemMetaErrorsItemSource, ) +from .workitems_list_get_response_data_item_meta_errors_item_source_resource import ( + WorkitemsListGetResponseDataItemMetaErrorsItemSourceResource, +) from .workitems_list_get_response_data_item_relationships import ( WorkitemsListGetResponseDataItemRelationships, ) +from .workitems_list_get_response_data_item_relationships_approvals import ( + WorkitemsListGetResponseDataItemRelationshipsApprovals, +) +from .workitems_list_get_response_data_item_relationships_approvals_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsApprovalsDataItem, +) +from .workitems_list_get_response_data_item_relationships_approvals_data_item_type import ( + WorkitemsListGetResponseDataItemRelationshipsApprovalsDataItemType, +) +from .workitems_list_get_response_data_item_relationships_approvals_meta import ( + WorkitemsListGetResponseDataItemRelationshipsApprovalsMeta, +) from .workitems_list_get_response_data_item_relationships_assignee import ( WorkitemsListGetResponseDataItemRelationshipsAssignee, ) @@ -2044,6 +4853,18 @@ from .workitems_list_get_response_data_item_relationships_author_data_type import ( WorkitemsListGetResponseDataItemRelationshipsAuthorDataType, ) +from .workitems_list_get_response_data_item_relationships_backlinked_work_items import ( + WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItems, +) +from .workitems_list_get_response_data_item_relationships_backlinked_work_items_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsDataItem, +) +from .workitems_list_get_response_data_item_relationships_backlinked_work_items_data_item_type import ( + WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsDataItemType, +) +from .workitems_list_get_response_data_item_relationships_backlinked_work_items_meta import ( + WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsMeta, +) from .workitems_list_get_response_data_item_relationships_categories import ( WorkitemsListGetResponseDataItemRelationshipsCategories, ) @@ -2071,6 +4892,42 @@ from .workitems_list_get_response_data_item_relationships_comments_meta import ( WorkitemsListGetResponseDataItemRelationshipsCommentsMeta, ) +from .workitems_list_get_response_data_item_relationships_externally_linked_work_items import ( + WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItems, +) +from .workitems_list_get_response_data_item_relationships_externally_linked_work_items_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsDataItem, +) +from .workitems_list_get_response_data_item_relationships_externally_linked_work_items_data_item_type import ( + WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsDataItemType, +) +from .workitems_list_get_response_data_item_relationships_externally_linked_work_items_meta import ( + WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsMeta, +) +from .workitems_list_get_response_data_item_relationships_linked_oslc_resources import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResources, +) +from .workitems_list_get_response_data_item_relationships_linked_oslc_resources_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesDataItem, +) +from .workitems_list_get_response_data_item_relationships_linked_oslc_resources_data_item_type import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesDataItemType, +) +from .workitems_list_get_response_data_item_relationships_linked_oslc_resources_meta import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesMeta, +) +from .workitems_list_get_response_data_item_relationships_linked_revisions import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedRevisions, +) +from .workitems_list_get_response_data_item_relationships_linked_revisions_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsDataItem, +) +from .workitems_list_get_response_data_item_relationships_linked_revisions_data_item_type import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsDataItemType, +) +from .workitems_list_get_response_data_item_relationships_linked_revisions_meta import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsMeta, +) from .workitems_list_get_response_data_item_relationships_linked_work_items import ( WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItems, ) @@ -2116,6 +4973,30 @@ from .workitems_list_get_response_data_item_relationships_project_data_type import ( WorkitemsListGetResponseDataItemRelationshipsProjectDataType, ) +from .workitems_list_get_response_data_item_relationships_test_steps import ( + WorkitemsListGetResponseDataItemRelationshipsTestSteps, +) +from .workitems_list_get_response_data_item_relationships_test_steps_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsTestStepsDataItem, +) +from .workitems_list_get_response_data_item_relationships_test_steps_data_item_type import ( + WorkitemsListGetResponseDataItemRelationshipsTestStepsDataItemType, +) +from .workitems_list_get_response_data_item_relationships_test_steps_meta import ( + WorkitemsListGetResponseDataItemRelationshipsTestStepsMeta, +) +from .workitems_list_get_response_data_item_relationships_votes import ( + WorkitemsListGetResponseDataItemRelationshipsVotes, +) +from .workitems_list_get_response_data_item_relationships_votes_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsVotesDataItem, +) +from .workitems_list_get_response_data_item_relationships_votes_data_item_type import ( + WorkitemsListGetResponseDataItemRelationshipsVotesDataItemType, +) +from .workitems_list_get_response_data_item_relationships_votes_meta import ( + WorkitemsListGetResponseDataItemRelationshipsVotesMeta, +) from .workitems_list_get_response_data_item_relationships_watches import ( WorkitemsListGetResponseDataItemRelationshipsWatches, ) @@ -2128,6 +5009,18 @@ from .workitems_list_get_response_data_item_relationships_watches_meta import ( WorkitemsListGetResponseDataItemRelationshipsWatchesMeta, ) +from .workitems_list_get_response_data_item_relationships_work_records import ( + WorkitemsListGetResponseDataItemRelationshipsWorkRecords, +) +from .workitems_list_get_response_data_item_relationships_work_records_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsWorkRecordsDataItem, +) +from .workitems_list_get_response_data_item_relationships_work_records_data_item_type import ( + WorkitemsListGetResponseDataItemRelationshipsWorkRecordsDataItemType, +) +from .workitems_list_get_response_data_item_relationships_work_records_meta import ( + WorkitemsListGetResponseDataItemRelationshipsWorkRecordsMeta, +) from .workitems_list_get_response_data_item_type import ( WorkitemsListGetResponseDataItemType, ) @@ -2136,6 +5029,73 @@ ) from .workitems_list_get_response_links import WorkitemsListGetResponseLinks from .workitems_list_get_response_meta import WorkitemsListGetResponseMeta +from .workitems_list_patch_request import WorkitemsListPatchRequest +from .workitems_list_patch_request_data_item import ( + WorkitemsListPatchRequestDataItem, +) +from .workitems_list_patch_request_data_item_attributes import ( + WorkitemsListPatchRequestDataItemAttributes, +) +from .workitems_list_patch_request_data_item_attributes_description import ( + WorkitemsListPatchRequestDataItemAttributesDescription, +) +from .workitems_list_patch_request_data_item_attributes_description_type import ( + WorkitemsListPatchRequestDataItemAttributesDescriptionType, +) +from .workitems_list_patch_request_data_item_attributes_hyperlinks_item import ( + WorkitemsListPatchRequestDataItemAttributesHyperlinksItem, +) +from .workitems_list_patch_request_data_item_relationships import ( + WorkitemsListPatchRequestDataItemRelationships, +) +from .workitems_list_patch_request_data_item_relationships_assignee import ( + WorkitemsListPatchRequestDataItemRelationshipsAssignee, +) +from .workitems_list_patch_request_data_item_relationships_assignee_data_item import ( + WorkitemsListPatchRequestDataItemRelationshipsAssigneeDataItem, +) +from .workitems_list_patch_request_data_item_relationships_assignee_data_item_type import ( + WorkitemsListPatchRequestDataItemRelationshipsAssigneeDataItemType, +) +from .workitems_list_patch_request_data_item_relationships_categories import ( + WorkitemsListPatchRequestDataItemRelationshipsCategories, +) +from .workitems_list_patch_request_data_item_relationships_categories_data_item import ( + WorkitemsListPatchRequestDataItemRelationshipsCategoriesDataItem, +) +from .workitems_list_patch_request_data_item_relationships_categories_data_item_type import ( + WorkitemsListPatchRequestDataItemRelationshipsCategoriesDataItemType, +) +from .workitems_list_patch_request_data_item_relationships_linked_revisions import ( + WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisions, +) +from .workitems_list_patch_request_data_item_relationships_linked_revisions_data_item import ( + WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisionsDataItem, +) +from .workitems_list_patch_request_data_item_relationships_linked_revisions_data_item_type import ( + WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisionsDataItemType, +) +from .workitems_list_patch_request_data_item_relationships_votes import ( + WorkitemsListPatchRequestDataItemRelationshipsVotes, +) +from .workitems_list_patch_request_data_item_relationships_votes_data_item import ( + WorkitemsListPatchRequestDataItemRelationshipsVotesDataItem, +) +from .workitems_list_patch_request_data_item_relationships_votes_data_item_type import ( + WorkitemsListPatchRequestDataItemRelationshipsVotesDataItemType, +) +from .workitems_list_patch_request_data_item_relationships_watches import ( + WorkitemsListPatchRequestDataItemRelationshipsWatches, +) +from .workitems_list_patch_request_data_item_relationships_watches_data_item import ( + WorkitemsListPatchRequestDataItemRelationshipsWatchesDataItem, +) +from .workitems_list_patch_request_data_item_relationships_watches_data_item_type import ( + WorkitemsListPatchRequestDataItemRelationshipsWatchesDataItemType, +) +from .workitems_list_patch_request_data_item_type import ( + WorkitemsListPatchRequestDataItemType, +) from .workitems_list_post_request import WorkitemsListPostRequest from .workitems_list_post_request_data_item import ( WorkitemsListPostRequestDataItem, @@ -2182,6 +5142,15 @@ from .workitems_list_post_request_data_item_relationships_categories_data_item_type import ( WorkitemsListPostRequestDataItemRelationshipsCategoriesDataItemType, ) +from .workitems_list_post_request_data_item_relationships_linked_revisions import ( + WorkitemsListPostRequestDataItemRelationshipsLinkedRevisions, +) +from .workitems_list_post_request_data_item_relationships_linked_revisions_data_item import ( + WorkitemsListPostRequestDataItemRelationshipsLinkedRevisionsDataItem, +) +from .workitems_list_post_request_data_item_relationships_linked_revisions_data_item_type import ( + WorkitemsListPostRequestDataItemRelationshipsLinkedRevisionsDataItemType, +) from .workitems_list_post_request_data_item_relationships_module import ( WorkitemsListPostRequestDataItemRelationshipsModule, ) @@ -2230,9 +5199,24 @@ from .workitems_single_get_response_data_meta_errors_item_source import ( WorkitemsSingleGetResponseDataMetaErrorsItemSource, ) +from .workitems_single_get_response_data_meta_errors_item_source_resource import ( + WorkitemsSingleGetResponseDataMetaErrorsItemSourceResource, +) from .workitems_single_get_response_data_relationships import ( WorkitemsSingleGetResponseDataRelationships, ) +from .workitems_single_get_response_data_relationships_approvals import ( + WorkitemsSingleGetResponseDataRelationshipsApprovals, +) +from .workitems_single_get_response_data_relationships_approvals_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsApprovalsDataItem, +) +from .workitems_single_get_response_data_relationships_approvals_data_item_type import ( + WorkitemsSingleGetResponseDataRelationshipsApprovalsDataItemType, +) +from .workitems_single_get_response_data_relationships_approvals_meta import ( + WorkitemsSingleGetResponseDataRelationshipsApprovalsMeta, +) from .workitems_single_get_response_data_relationships_assignee import ( WorkitemsSingleGetResponseDataRelationshipsAssignee, ) @@ -2269,6 +5253,18 @@ from .workitems_single_get_response_data_relationships_author_data_type import ( WorkitemsSingleGetResponseDataRelationshipsAuthorDataType, ) +from .workitems_single_get_response_data_relationships_backlinked_work_items import ( + WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItems, +) +from .workitems_single_get_response_data_relationships_backlinked_work_items_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsDataItem, +) +from .workitems_single_get_response_data_relationships_backlinked_work_items_data_item_type import ( + WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsDataItemType, +) +from .workitems_single_get_response_data_relationships_backlinked_work_items_meta import ( + WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsMeta, +) from .workitems_single_get_response_data_relationships_categories import ( WorkitemsSingleGetResponseDataRelationshipsCategories, ) @@ -2296,6 +5292,42 @@ from .workitems_single_get_response_data_relationships_comments_meta import ( WorkitemsSingleGetResponseDataRelationshipsCommentsMeta, ) +from .workitems_single_get_response_data_relationships_externally_linked_work_items import ( + WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItems, +) +from .workitems_single_get_response_data_relationships_externally_linked_work_items_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsDataItem, +) +from .workitems_single_get_response_data_relationships_externally_linked_work_items_data_item_type import ( + WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsDataItemType, +) +from .workitems_single_get_response_data_relationships_externally_linked_work_items_meta import ( + WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsMeta, +) +from .workitems_single_get_response_data_relationships_linked_oslc_resources import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResources, +) +from .workitems_single_get_response_data_relationships_linked_oslc_resources_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesDataItem, +) +from .workitems_single_get_response_data_relationships_linked_oslc_resources_data_item_type import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesDataItemType, +) +from .workitems_single_get_response_data_relationships_linked_oslc_resources_meta import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesMeta, +) +from .workitems_single_get_response_data_relationships_linked_revisions import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedRevisions, +) +from .workitems_single_get_response_data_relationships_linked_revisions_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsDataItem, +) +from .workitems_single_get_response_data_relationships_linked_revisions_data_item_type import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsDataItemType, +) +from .workitems_single_get_response_data_relationships_linked_revisions_meta import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsMeta, +) from .workitems_single_get_response_data_relationships_linked_work_items import ( WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItems, ) @@ -2341,6 +5373,30 @@ from .workitems_single_get_response_data_relationships_project_data_type import ( WorkitemsSingleGetResponseDataRelationshipsProjectDataType, ) +from .workitems_single_get_response_data_relationships_test_steps import ( + WorkitemsSingleGetResponseDataRelationshipsTestSteps, +) +from .workitems_single_get_response_data_relationships_test_steps_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsTestStepsDataItem, +) +from .workitems_single_get_response_data_relationships_test_steps_data_item_type import ( + WorkitemsSingleGetResponseDataRelationshipsTestStepsDataItemType, +) +from .workitems_single_get_response_data_relationships_test_steps_meta import ( + WorkitemsSingleGetResponseDataRelationshipsTestStepsMeta, +) +from .workitems_single_get_response_data_relationships_votes import ( + WorkitemsSingleGetResponseDataRelationshipsVotes, +) +from .workitems_single_get_response_data_relationships_votes_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsVotesDataItem, +) +from .workitems_single_get_response_data_relationships_votes_data_item_type import ( + WorkitemsSingleGetResponseDataRelationshipsVotesDataItemType, +) +from .workitems_single_get_response_data_relationships_votes_meta import ( + WorkitemsSingleGetResponseDataRelationshipsVotesMeta, +) from .workitems_single_get_response_data_relationships_watches import ( WorkitemsSingleGetResponseDataRelationshipsWatches, ) @@ -2353,6 +5409,18 @@ from .workitems_single_get_response_data_relationships_watches_meta import ( WorkitemsSingleGetResponseDataRelationshipsWatchesMeta, ) +from .workitems_single_get_response_data_relationships_work_records import ( + WorkitemsSingleGetResponseDataRelationshipsWorkRecords, +) +from .workitems_single_get_response_data_relationships_work_records_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsWorkRecordsDataItem, +) +from .workitems_single_get_response_data_relationships_work_records_data_item_type import ( + WorkitemsSingleGetResponseDataRelationshipsWorkRecordsDataItemType, +) +from .workitems_single_get_response_data_relationships_work_records_meta import ( + WorkitemsSingleGetResponseDataRelationshipsWorkRecordsMeta, +) from .workitems_single_get_response_data_type import ( WorkitemsSingleGetResponseDataType, ) @@ -2399,6 +5467,24 @@ from .workitems_single_patch_request_data_relationships_categories_data_item_type import ( WorkitemsSinglePatchRequestDataRelationshipsCategoriesDataItemType, ) +from .workitems_single_patch_request_data_relationships_linked_revisions import ( + WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisions, +) +from .workitems_single_patch_request_data_relationships_linked_revisions_data_item import ( + WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisionsDataItem, +) +from .workitems_single_patch_request_data_relationships_linked_revisions_data_item_type import ( + WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisionsDataItemType, +) +from .workitems_single_patch_request_data_relationships_votes import ( + WorkitemsSinglePatchRequestDataRelationshipsVotes, +) +from .workitems_single_patch_request_data_relationships_votes_data_item import ( + WorkitemsSinglePatchRequestDataRelationshipsVotesDataItem, +) +from .workitems_single_patch_request_data_relationships_votes_data_item_type import ( + WorkitemsSinglePatchRequestDataRelationshipsVotesDataItemType, +) from .workitems_single_patch_request_data_relationships_watches import ( WorkitemsSinglePatchRequestDataRelationshipsWatches, ) @@ -2411,10 +5497,158 @@ from .workitems_single_patch_request_data_type import ( WorkitemsSinglePatchRequestDataType, ) +from .workrecords_list_delete_request import WorkrecordsListDeleteRequest +from .workrecords_list_delete_request_data_item import ( + WorkrecordsListDeleteRequestDataItem, +) +from .workrecords_list_delete_request_data_item_type import ( + WorkrecordsListDeleteRequestDataItemType, +) +from .workrecords_list_get_response import WorkrecordsListGetResponse +from .workrecords_list_get_response_data_item import ( + WorkrecordsListGetResponseDataItem, +) +from .workrecords_list_get_response_data_item_attributes import ( + WorkrecordsListGetResponseDataItemAttributes, +) +from .workrecords_list_get_response_data_item_links import ( + WorkrecordsListGetResponseDataItemLinks, +) +from .workrecords_list_get_response_data_item_meta import ( + WorkrecordsListGetResponseDataItemMeta, +) +from .workrecords_list_get_response_data_item_meta_errors_item import ( + WorkrecordsListGetResponseDataItemMetaErrorsItem, +) +from .workrecords_list_get_response_data_item_meta_errors_item_source import ( + WorkrecordsListGetResponseDataItemMetaErrorsItemSource, +) +from .workrecords_list_get_response_data_item_meta_errors_item_source_resource import ( + WorkrecordsListGetResponseDataItemMetaErrorsItemSourceResource, +) +from .workrecords_list_get_response_data_item_relationships import ( + WorkrecordsListGetResponseDataItemRelationships, +) +from .workrecords_list_get_response_data_item_relationships_project import ( + WorkrecordsListGetResponseDataItemRelationshipsProject, +) +from .workrecords_list_get_response_data_item_relationships_project_data import ( + WorkrecordsListGetResponseDataItemRelationshipsProjectData, +) +from .workrecords_list_get_response_data_item_relationships_project_data_type import ( + WorkrecordsListGetResponseDataItemRelationshipsProjectDataType, +) +from .workrecords_list_get_response_data_item_relationships_user import ( + WorkrecordsListGetResponseDataItemRelationshipsUser, +) +from .workrecords_list_get_response_data_item_relationships_user_data import ( + WorkrecordsListGetResponseDataItemRelationshipsUserData, +) +from .workrecords_list_get_response_data_item_relationships_user_data_type import ( + WorkrecordsListGetResponseDataItemRelationshipsUserDataType, +) +from .workrecords_list_get_response_data_item_type import ( + WorkrecordsListGetResponseDataItemType, +) +from .workrecords_list_get_response_included_item import ( + WorkrecordsListGetResponseIncludedItem, +) +from .workrecords_list_get_response_links import ( + WorkrecordsListGetResponseLinks, +) +from .workrecords_list_get_response_meta import WorkrecordsListGetResponseMeta +from .workrecords_list_post_request import WorkrecordsListPostRequest +from .workrecords_list_post_request_data_item import ( + WorkrecordsListPostRequestDataItem, +) +from .workrecords_list_post_request_data_item_attributes import ( + WorkrecordsListPostRequestDataItemAttributes, +) +from .workrecords_list_post_request_data_item_relationships import ( + WorkrecordsListPostRequestDataItemRelationships, +) +from .workrecords_list_post_request_data_item_relationships_user import ( + WorkrecordsListPostRequestDataItemRelationshipsUser, +) +from .workrecords_list_post_request_data_item_relationships_user_data import ( + WorkrecordsListPostRequestDataItemRelationshipsUserData, +) +from .workrecords_list_post_request_data_item_relationships_user_data_type import ( + WorkrecordsListPostRequestDataItemRelationshipsUserDataType, +) +from .workrecords_list_post_request_data_item_type import ( + WorkrecordsListPostRequestDataItemType, +) +from .workrecords_list_post_response import WorkrecordsListPostResponse +from .workrecords_list_post_response_data_item import ( + WorkrecordsListPostResponseDataItem, +) +from .workrecords_list_post_response_data_item_links import ( + WorkrecordsListPostResponseDataItemLinks, +) +from .workrecords_list_post_response_data_item_type import ( + WorkrecordsListPostResponseDataItemType, +) +from .workrecords_single_get_response import WorkrecordsSingleGetResponse +from .workrecords_single_get_response_data import ( + WorkrecordsSingleGetResponseData, +) +from .workrecords_single_get_response_data_attributes import ( + WorkrecordsSingleGetResponseDataAttributes, +) +from .workrecords_single_get_response_data_links import ( + WorkrecordsSingleGetResponseDataLinks, +) +from .workrecords_single_get_response_data_meta import ( + WorkrecordsSingleGetResponseDataMeta, +) +from .workrecords_single_get_response_data_meta_errors_item import ( + WorkrecordsSingleGetResponseDataMetaErrorsItem, +) +from .workrecords_single_get_response_data_meta_errors_item_source import ( + WorkrecordsSingleGetResponseDataMetaErrorsItemSource, +) +from .workrecords_single_get_response_data_meta_errors_item_source_resource import ( + WorkrecordsSingleGetResponseDataMetaErrorsItemSourceResource, +) +from .workrecords_single_get_response_data_relationships import ( + WorkrecordsSingleGetResponseDataRelationships, +) +from .workrecords_single_get_response_data_relationships_project import ( + WorkrecordsSingleGetResponseDataRelationshipsProject, +) +from .workrecords_single_get_response_data_relationships_project_data import ( + WorkrecordsSingleGetResponseDataRelationshipsProjectData, +) +from .workrecords_single_get_response_data_relationships_project_data_type import ( + WorkrecordsSingleGetResponseDataRelationshipsProjectDataType, +) +from .workrecords_single_get_response_data_relationships_user import ( + WorkrecordsSingleGetResponseDataRelationshipsUser, +) +from .workrecords_single_get_response_data_relationships_user_data import ( + WorkrecordsSingleGetResponseDataRelationshipsUserData, +) +from .workrecords_single_get_response_data_relationships_user_data_type import ( + WorkrecordsSingleGetResponseDataRelationshipsUserDataType, +) +from .workrecords_single_get_response_data_type import ( + WorkrecordsSingleGetResponseDataType, +) +from .workrecords_single_get_response_included_item import ( + WorkrecordsSingleGetResponseIncludedItem, +) +from .workrecords_single_get_response_links import ( + WorkrecordsSingleGetResponseLinks, +) __all__ = ( "BranchDocumentRequestBody", + "BranchDocumentsRequestBody", + "BranchDocumentsRequestBodyDocumentConfigurationsItem", "CopyDocumentRequestBody", + "CreateProjectRequestBody", + "CreateProjectRequestBodyParamsType0", "DocumentAttachmentsListGetResponse", "DocumentAttachmentsListGetResponseDataItem", "DocumentAttachmentsListGetResponseDataItemAttributes", @@ -2422,6 +5656,7 @@ "DocumentAttachmentsListGetResponseDataItemMeta", "DocumentAttachmentsListGetResponseDataItemMetaErrorsItem", "DocumentAttachmentsListGetResponseDataItemMetaErrorsItemSource", + "DocumentAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource", "DocumentAttachmentsListGetResponseDataItemRelationships", "DocumentAttachmentsListGetResponseDataItemRelationshipsAuthor", "DocumentAttachmentsListGetResponseDataItemRelationshipsAuthorData", @@ -2448,6 +5683,7 @@ "DocumentAttachmentsSingleGetResponseDataMeta", "DocumentAttachmentsSingleGetResponseDataMetaErrorsItem", "DocumentAttachmentsSingleGetResponseDataMetaErrorsItemSource", + "DocumentAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource", "DocumentAttachmentsSingleGetResponseDataRelationships", "DocumentAttachmentsSingleGetResponseDataRelationshipsAuthor", "DocumentAttachmentsSingleGetResponseDataRelationshipsAuthorData", @@ -2471,6 +5707,7 @@ "DocumentCommentsListGetResponseDataItemMeta", "DocumentCommentsListGetResponseDataItemMetaErrorsItem", "DocumentCommentsListGetResponseDataItemMetaErrorsItemSource", + "DocumentCommentsListGetResponseDataItemMetaErrorsItemSourceResource", "DocumentCommentsListGetResponseDataItemRelationships", "DocumentCommentsListGetResponseDataItemRelationshipsAuthor", "DocumentCommentsListGetResponseDataItemRelationshipsAuthorData", @@ -2515,6 +5752,7 @@ "DocumentCommentsSingleGetResponseDataMeta", "DocumentCommentsSingleGetResponseDataMetaErrorsItem", "DocumentCommentsSingleGetResponseDataMetaErrorsItemSource", + "DocumentCommentsSingleGetResponseDataMetaErrorsItemSourceResource", "DocumentCommentsSingleGetResponseDataRelationships", "DocumentCommentsSingleGetResponseDataRelationshipsAuthor", "DocumentCommentsSingleGetResponseDataRelationshipsAuthorData", @@ -2543,6 +5781,7 @@ "DocumentPartsListGetResponseDataItemMeta", "DocumentPartsListGetResponseDataItemMetaErrorsItem", "DocumentPartsListGetResponseDataItemMetaErrorsItemSource", + "DocumentPartsListGetResponseDataItemMetaErrorsItemSourceResource", "DocumentPartsListGetResponseDataItemRelationships", "DocumentPartsListGetResponseDataItemRelationshipsNextPart", "DocumentPartsListGetResponseDataItemRelationshipsNextPartData", @@ -2582,6 +5821,7 @@ "DocumentPartsSingleGetResponseDataMeta", "DocumentPartsSingleGetResponseDataMetaErrorsItem", "DocumentPartsSingleGetResponseDataMetaErrorsItemSource", + "DocumentPartsSingleGetResponseDataMetaErrorsItemSourceResource", "DocumentPartsSingleGetResponseDataRelationships", "DocumentPartsSingleGetResponseDataRelationshipsNextPart", "DocumentPartsSingleGetResponseDataRelationshipsNextPartData", @@ -2620,6 +5860,7 @@ "DocumentsSingleGetResponseDataMeta", "DocumentsSingleGetResponseDataMetaErrorsItem", "DocumentsSingleGetResponseDataMetaErrorsItemSource", + "DocumentsSingleGetResponseDataMetaErrorsItemSourceResource", "DocumentsSingleGetResponseDataRelationships", "DocumentsSingleGetResponseDataRelationshipsAttachments", "DocumentsSingleGetResponseDataRelationshipsAttachmentsDataItem", @@ -2669,6 +5910,34 @@ "DocumentsSinglePostResponseDataAttributesOutlineNumbering", "DocumentsSinglePostResponseDataAttributesRenderingLayoutsItem", "DocumentsSinglePostResponseDataAttributesRenderingLayoutsItemPropertiesItem", + "DocumentsSinglePostResponseDataLinks", + "DocumentsSinglePostResponseDataRelationships", + "DocumentsSinglePostResponseDataRelationshipsAttachments", + "DocumentsSinglePostResponseDataRelationshipsAttachmentsDataItem", + "DocumentsSinglePostResponseDataRelationshipsAttachmentsDataItemType", + "DocumentsSinglePostResponseDataRelationshipsAttachmentsLinks", + "DocumentsSinglePostResponseDataRelationshipsAuthor", + "DocumentsSinglePostResponseDataRelationshipsAuthorData", + "DocumentsSinglePostResponseDataRelationshipsAuthorDataType", + "DocumentsSinglePostResponseDataRelationshipsBranchedFrom", + "DocumentsSinglePostResponseDataRelationshipsBranchedFromData", + "DocumentsSinglePostResponseDataRelationshipsBranchedFromDataType", + "DocumentsSinglePostResponseDataRelationshipsComments", + "DocumentsSinglePostResponseDataRelationshipsCommentsDataItem", + "DocumentsSinglePostResponseDataRelationshipsCommentsDataItemType", + "DocumentsSinglePostResponseDataRelationshipsCommentsLinks", + "DocumentsSinglePostResponseDataRelationshipsDerivedFrom", + "DocumentsSinglePostResponseDataRelationshipsDerivedFromData", + "DocumentsSinglePostResponseDataRelationshipsDerivedFromDataType", + "DocumentsSinglePostResponseDataRelationshipsProject", + "DocumentsSinglePostResponseDataRelationshipsProjectData", + "DocumentsSinglePostResponseDataRelationshipsProjectDataType", + "DocumentsSinglePostResponseDataRelationshipsUpdatedBy", + "DocumentsSinglePostResponseDataRelationshipsUpdatedByData", + "DocumentsSinglePostResponseDataRelationshipsUpdatedByDataType", + "DocumentsSinglePostResponseDataRelationshipsVariant", + "DocumentsSinglePostResponseDataRelationshipsVariantData", + "DocumentsSinglePostResponseDataRelationshipsVariantDataType", "DocumentsSinglePostResponseDataType", "EnumerationsListPostRequest", "EnumerationsListPostRequestDataItem", @@ -2687,6 +5956,7 @@ "EnumerationsSingleGetResponseDataMeta", "EnumerationsSingleGetResponseDataMetaErrorsItem", "EnumerationsSingleGetResponseDataMetaErrorsItemSource", + "EnumerationsSingleGetResponseDataMetaErrorsItemSourceResource", "EnumerationsSingleGetResponseDataType", "EnumerationsSingleGetResponseIncludedItem", "EnumerationsSingleGetResponseLinks", @@ -2702,12 +5972,82 @@ "Errors", "ErrorsErrorsItem", "ErrorsErrorsItemSource", + "ErrorsErrorsItemSourceResource", + "ExportTestCasesRequestBody", + "ExternallylinkedworkitemsListDeleteRequest", + "ExternallylinkedworkitemsListDeleteRequestDataItem", + "ExternallylinkedworkitemsListDeleteRequestDataItemType", + "ExternallylinkedworkitemsListGetResponse", + "ExternallylinkedworkitemsListGetResponseDataItem", + "ExternallylinkedworkitemsListGetResponseDataItemAttributes", + "ExternallylinkedworkitemsListGetResponseDataItemLinks", + "ExternallylinkedworkitemsListGetResponseDataItemMeta", + "ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItem", + "ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSource", + "ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource", + "ExternallylinkedworkitemsListGetResponseDataItemType", + "ExternallylinkedworkitemsListGetResponseIncludedItem", + "ExternallylinkedworkitemsListGetResponseLinks", + "ExternallylinkedworkitemsListGetResponseMeta", + "ExternallylinkedworkitemsListPostRequest", + "ExternallylinkedworkitemsListPostRequestDataItem", + "ExternallylinkedworkitemsListPostRequestDataItemAttributes", + "ExternallylinkedworkitemsListPostRequestDataItemType", + "ExternallylinkedworkitemsListPostResponse", + "ExternallylinkedworkitemsListPostResponseDataItem", + "ExternallylinkedworkitemsListPostResponseDataItemLinks", + "ExternallylinkedworkitemsListPostResponseDataItemType", + "ExternallylinkedworkitemsSingleGetResponse", + "ExternallylinkedworkitemsSingleGetResponseData", + "ExternallylinkedworkitemsSingleGetResponseDataAttributes", + "ExternallylinkedworkitemsSingleGetResponseDataLinks", + "ExternallylinkedworkitemsSingleGetResponseDataMeta", + "ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItem", + "ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSource", + "ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource", + "ExternallylinkedworkitemsSingleGetResponseDataType", + "ExternallylinkedworkitemsSingleGetResponseIncludedItem", + "ExternallylinkedworkitemsSingleGetResponseLinks", + "FeatureselectionsListGetResponse", + "FeatureselectionsListGetResponseDataItem", + "FeatureselectionsListGetResponseDataItemAttributes", + "FeatureselectionsListGetResponseDataItemAttributesSelectionType", + "FeatureselectionsListGetResponseDataItemLinks", + "FeatureselectionsListGetResponseDataItemMeta", + "FeatureselectionsListGetResponseDataItemMetaErrorsItem", + "FeatureselectionsListGetResponseDataItemMetaErrorsItemSource", + "FeatureselectionsListGetResponseDataItemMetaErrorsItemSourceResource", + "FeatureselectionsListGetResponseDataItemRelationships", + "FeatureselectionsListGetResponseDataItemRelationshipsWorkItem", + "FeatureselectionsListGetResponseDataItemRelationshipsWorkItemData", + "FeatureselectionsListGetResponseDataItemRelationshipsWorkItemDataType", + "FeatureselectionsListGetResponseDataItemType", + "FeatureselectionsListGetResponseIncludedItem", + "FeatureselectionsListGetResponseLinks", + "FeatureselectionsListGetResponseMeta", + "FeatureselectionsSingleGetResponse", + "FeatureselectionsSingleGetResponseData", + "FeatureselectionsSingleGetResponseDataAttributes", + "FeatureselectionsSingleGetResponseDataAttributesSelectionType", + "FeatureselectionsSingleGetResponseDataLinks", + "FeatureselectionsSingleGetResponseDataMeta", + "FeatureselectionsSingleGetResponseDataMetaErrorsItem", + "FeatureselectionsSingleGetResponseDataMetaErrorsItemSource", + "FeatureselectionsSingleGetResponseDataMetaErrorsItemSourceResource", + "FeatureselectionsSingleGetResponseDataRelationships", + "FeatureselectionsSingleGetResponseDataRelationshipsWorkItem", + "FeatureselectionsSingleGetResponseDataRelationshipsWorkItemData", + "FeatureselectionsSingleGetResponseDataRelationshipsWorkItemDataType", + "FeatureselectionsSingleGetResponseDataType", + "FeatureselectionsSingleGetResponseIncludedItem", + "FeatureselectionsSingleGetResponseLinks", "GlobalrolesSingleGetResponse", "GlobalrolesSingleGetResponseData", "GlobalrolesSingleGetResponseDataLinks", "GlobalrolesSingleGetResponseDataMeta", "GlobalrolesSingleGetResponseDataMetaErrorsItem", "GlobalrolesSingleGetResponseDataMetaErrorsItemSource", + "GlobalrolesSingleGetResponseDataMetaErrorsItemSourceResource", "GlobalrolesSingleGetResponseDataRelationships", "GlobalrolesSingleGetResponseDataRelationshipsUsers", "GlobalrolesSingleGetResponseDataRelationshipsUsersDataItem", @@ -2723,10 +6063,18 @@ "IconsListGetResponseDataItemMeta", "IconsListGetResponseDataItemMetaErrorsItem", "IconsListGetResponseDataItemMetaErrorsItemSource", + "IconsListGetResponseDataItemMetaErrorsItemSourceResource", "IconsListGetResponseDataItemType", "IconsListGetResponseIncludedItem", "IconsListGetResponseLinks", "IconsListGetResponseMeta", + "IconsListPostRequest", + "IconsListPostRequestDataItem", + "IconsListPostRequestDataItemType", + "IconsListPostResponse", + "IconsListPostResponseDataItem", + "IconsListPostResponseDataItemLinks", + "IconsListPostResponseDataItemType", "IconsSingleGetResponse", "IconsSingleGetResponseData", "IconsSingleGetResponseDataAttributes", @@ -2734,9 +6082,33 @@ "IconsSingleGetResponseDataMeta", "IconsSingleGetResponseDataMetaErrorsItem", "IconsSingleGetResponseDataMetaErrorsItemSource", + "IconsSingleGetResponseDataMetaErrorsItemSourceResource", "IconsSingleGetResponseDataType", "IconsSingleGetResponseIncludedItem", "IconsSingleGetResponseLinks", + "ImportTestResultsRequestBody", + "LinkedoslcresourcesListDeleteRequest", + "LinkedoslcresourcesListDeleteRequestDataItem", + "LinkedoslcresourcesListDeleteRequestDataItemType", + "LinkedoslcresourcesListGetResponse", + "LinkedoslcresourcesListGetResponseDataItem", + "LinkedoslcresourcesListGetResponseDataItemAttributes", + "LinkedoslcresourcesListGetResponseDataItemLinks", + "LinkedoslcresourcesListGetResponseDataItemMeta", + "LinkedoslcresourcesListGetResponseDataItemMetaErrorsItem", + "LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSource", + "LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSourceResource", + "LinkedoslcresourcesListGetResponseDataItemType", + "LinkedoslcresourcesListGetResponseIncludedItem", + "LinkedoslcresourcesListGetResponseMeta", + "LinkedoslcresourcesListPostRequest", + "LinkedoslcresourcesListPostRequestDataItem", + "LinkedoslcresourcesListPostRequestDataItemAttributes", + "LinkedoslcresourcesListPostRequestDataItemType", + "LinkedoslcresourcesListPostResponse", + "LinkedoslcresourcesListPostResponseDataItem", + "LinkedoslcresourcesListPostResponseDataItemLinks", + "LinkedoslcresourcesListPostResponseDataItemType", "LinkedworkitemsListDeleteRequest", "LinkedworkitemsListDeleteRequestDataItem", "LinkedworkitemsListDeleteRequestDataItemType", @@ -2747,6 +6119,7 @@ "LinkedworkitemsListGetResponseDataItemMeta", "LinkedworkitemsListGetResponseDataItemMetaErrorsItem", "LinkedworkitemsListGetResponseDataItemMetaErrorsItemSource", + "LinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource", "LinkedworkitemsListGetResponseDataItemRelationships", "LinkedworkitemsListGetResponseDataItemRelationshipsWorkItem", "LinkedworkitemsListGetResponseDataItemRelationshipsWorkItemData", @@ -2774,6 +6147,7 @@ "LinkedworkitemsSingleGetResponseDataMeta", "LinkedworkitemsSingleGetResponseDataMetaErrorsItem", "LinkedworkitemsSingleGetResponseDataMetaErrorsItemSource", + "LinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource", "LinkedworkitemsSingleGetResponseDataRelationships", "LinkedworkitemsSingleGetResponseDataRelationshipsWorkItem", "LinkedworkitemsSingleGetResponseDataRelationshipsWorkItemData", @@ -2785,6 +6159,7 @@ "LinkedworkitemsSinglePatchRequestData", "LinkedworkitemsSinglePatchRequestDataAttributes", "LinkedworkitemsSinglePatchRequestDataType", + "MoveProjectRequestBody", "MoveWorkItemToDocumentRequestBody", "PageAttachmentsListPostRequest", "PageAttachmentsListPostRequestDataItem", @@ -2801,6 +6176,7 @@ "PageAttachmentsSingleGetResponseDataMeta", "PageAttachmentsSingleGetResponseDataMetaErrorsItem", "PageAttachmentsSingleGetResponseDataMetaErrorsItemSource", + "PageAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource", "PageAttachmentsSingleGetResponseDataRelationships", "PageAttachmentsSingleGetResponseDataRelationshipsAuthor", "PageAttachmentsSingleGetResponseDataRelationshipsAuthorData", @@ -2818,6 +6194,7 @@ "PagesSingleGetResponseDataMeta", "PagesSingleGetResponseDataMetaErrorsItem", "PagesSingleGetResponseDataMetaErrorsItemSource", + "PagesSingleGetResponseDataMetaErrorsItemSourceResource", "PagesSingleGetResponseDataRelationships", "PagesSingleGetResponseDataRelationshipsAttachments", "PagesSingleGetResponseDataRelationshipsAttachmentsDataItem", @@ -2841,9 +6218,138 @@ "PagesSinglePatchRequestDataType", "Pagination", "PatchDocumentAttachmentsRequestBody", + "PatchTestRunAttachmentsRequestBody", "PatchWorkItemAttachmentsRequestBody", + "PlansListDeleteRequest", + "PlansListDeleteRequestDataItem", + "PlansListDeleteRequestDataItemType", + "PlansListGetResponse", + "PlansListGetResponseDataItem", + "PlansListGetResponseDataItemAttributes", + "PlansListGetResponseDataItemAttributesCalculationType", + "PlansListGetResponseDataItemAttributesDescription", + "PlansListGetResponseDataItemAttributesDescriptionType", + "PlansListGetResponseDataItemAttributesHomePageContent", + "PlansListGetResponseDataItemAttributesHomePageContentType", + "PlansListGetResponseDataItemLinks", + "PlansListGetResponseDataItemMeta", + "PlansListGetResponseDataItemMetaErrorsItem", + "PlansListGetResponseDataItemMetaErrorsItemSource", + "PlansListGetResponseDataItemMetaErrorsItemSourceResource", + "PlansListGetResponseDataItemRelationships", + "PlansListGetResponseDataItemRelationshipsAuthor", + "PlansListGetResponseDataItemRelationshipsAuthorData", + "PlansListGetResponseDataItemRelationshipsAuthorDataType", + "PlansListGetResponseDataItemRelationshipsParent", + "PlansListGetResponseDataItemRelationshipsParentData", + "PlansListGetResponseDataItemRelationshipsParentDataType", + "PlansListGetResponseDataItemRelationshipsProject", + "PlansListGetResponseDataItemRelationshipsProjectData", + "PlansListGetResponseDataItemRelationshipsProjectDataType", + "PlansListGetResponseDataItemRelationshipsProjectSpan", + "PlansListGetResponseDataItemRelationshipsProjectSpanDataItem", + "PlansListGetResponseDataItemRelationshipsProjectSpanDataItemType", + "PlansListGetResponseDataItemRelationshipsProjectSpanMeta", + "PlansListGetResponseDataItemRelationshipsTemplate", + "PlansListGetResponseDataItemRelationshipsTemplateData", + "PlansListGetResponseDataItemRelationshipsTemplateDataType", + "PlansListGetResponseDataItemRelationshipsWorkItems", + "PlansListGetResponseDataItemRelationshipsWorkItemsDataItem", + "PlansListGetResponseDataItemRelationshipsWorkItemsDataItemType", + "PlansListGetResponseDataItemRelationshipsWorkItemsMeta", + "PlansListGetResponseDataItemType", + "PlansListGetResponseIncludedItem", + "PlansListGetResponseLinks", + "PlansListGetResponseMeta", + "PlansListPostRequest", + "PlansListPostRequestDataItem", + "PlansListPostRequestDataItemAttributes", + "PlansListPostRequestDataItemAttributesCalculationType", + "PlansListPostRequestDataItemAttributesDescription", + "PlansListPostRequestDataItemAttributesDescriptionType", + "PlansListPostRequestDataItemAttributesHomePageContent", + "PlansListPostRequestDataItemAttributesHomePageContentType", + "PlansListPostRequestDataItemRelationships", + "PlansListPostRequestDataItemRelationshipsParent", + "PlansListPostRequestDataItemRelationshipsParentData", + "PlansListPostRequestDataItemRelationshipsParentDataType", + "PlansListPostRequestDataItemRelationshipsProjectSpan", + "PlansListPostRequestDataItemRelationshipsProjectSpanDataItem", + "PlansListPostRequestDataItemRelationshipsProjectSpanDataItemType", + "PlansListPostRequestDataItemRelationshipsTemplate", + "PlansListPostRequestDataItemRelationshipsTemplateData", + "PlansListPostRequestDataItemRelationshipsTemplateDataType", + "PlansListPostRequestDataItemRelationshipsWorkItems", + "PlansListPostRequestDataItemRelationshipsWorkItemsDataItem", + "PlansListPostRequestDataItemRelationshipsWorkItemsDataItemType", + "PlansListPostRequestDataItemType", + "PlansListPostResponse", + "PlansListPostResponseDataItem", + "PlansListPostResponseDataItemLinks", + "PlansListPostResponseDataItemType", + "PlansSingleGetResponse", + "PlansSingleGetResponseData", + "PlansSingleGetResponseDataAttributes", + "PlansSingleGetResponseDataAttributesCalculationType", + "PlansSingleGetResponseDataAttributesDescription", + "PlansSingleGetResponseDataAttributesDescriptionType", + "PlansSingleGetResponseDataAttributesHomePageContent", + "PlansSingleGetResponseDataAttributesHomePageContentType", + "PlansSingleGetResponseDataLinks", + "PlansSingleGetResponseDataMeta", + "PlansSingleGetResponseDataMetaErrorsItem", + "PlansSingleGetResponseDataMetaErrorsItemSource", + "PlansSingleGetResponseDataMetaErrorsItemSourceResource", + "PlansSingleGetResponseDataRelationships", + "PlansSingleGetResponseDataRelationshipsAuthor", + "PlansSingleGetResponseDataRelationshipsAuthorData", + "PlansSingleGetResponseDataRelationshipsAuthorDataType", + "PlansSingleGetResponseDataRelationshipsParent", + "PlansSingleGetResponseDataRelationshipsParentData", + "PlansSingleGetResponseDataRelationshipsParentDataType", + "PlansSingleGetResponseDataRelationshipsProject", + "PlansSingleGetResponseDataRelationshipsProjectData", + "PlansSingleGetResponseDataRelationshipsProjectDataType", + "PlansSingleGetResponseDataRelationshipsProjectSpan", + "PlansSingleGetResponseDataRelationshipsProjectSpanDataItem", + "PlansSingleGetResponseDataRelationshipsProjectSpanDataItemType", + "PlansSingleGetResponseDataRelationshipsProjectSpanMeta", + "PlansSingleGetResponseDataRelationshipsTemplate", + "PlansSingleGetResponseDataRelationshipsTemplateData", + "PlansSingleGetResponseDataRelationshipsTemplateDataType", + "PlansSingleGetResponseDataRelationshipsWorkItems", + "PlansSingleGetResponseDataRelationshipsWorkItemsDataItem", + "PlansSingleGetResponseDataRelationshipsWorkItemsDataItemType", + "PlansSingleGetResponseDataRelationshipsWorkItemsMeta", + "PlansSingleGetResponseDataType", + "PlansSingleGetResponseIncludedItem", + "PlansSingleGetResponseLinks", + "PlansSinglePatchRequest", + "PlansSinglePatchRequestData", + "PlansSinglePatchRequestDataAttributes", + "PlansSinglePatchRequestDataAttributesCalculationType", + "PlansSinglePatchRequestDataAttributesDescription", + "PlansSinglePatchRequestDataAttributesDescriptionType", + "PlansSinglePatchRequestDataAttributesHomePageContent", + "PlansSinglePatchRequestDataAttributesHomePageContentType", + "PlansSinglePatchRequestDataRelationships", + "PlansSinglePatchRequestDataRelationshipsParent", + "PlansSinglePatchRequestDataRelationshipsParentData", + "PlansSinglePatchRequestDataRelationshipsParentDataType", + "PlansSinglePatchRequestDataRelationshipsProjectSpan", + "PlansSinglePatchRequestDataRelationshipsProjectSpanDataItem", + "PlansSinglePatchRequestDataRelationshipsProjectSpanDataItemType", + "PlansSinglePatchRequestDataRelationshipsWorkItems", + "PlansSinglePatchRequestDataRelationshipsWorkItemsDataItem", + "PlansSinglePatchRequestDataRelationshipsWorkItemsDataItemType", + "PlansSinglePatchRequestDataType", "PostDocumentAttachmentsRequestBody", + "PostIconsRequestBody", + "PostImportActionRequestBody", "PostPageAttachmentsRequestBody", + "PostTestRecordAttachmentsRequestBody", + "PostTestRunAttachmentsRequestBody", + "PostTestStepResultAttachmentsRequestBody", "PostWorkItemAttachmentsRequestBody", "ProjectsListGetResponse", "ProjectsListGetResponseDataItem", @@ -2854,6 +6360,7 @@ "ProjectsListGetResponseDataItemMeta", "ProjectsListGetResponseDataItemMetaErrorsItem", "ProjectsListGetResponseDataItemMetaErrorsItemSource", + "ProjectsListGetResponseDataItemMetaErrorsItemSourceResource", "ProjectsListGetResponseDataItemRelationships", "ProjectsListGetResponseDataItemRelationshipsLead", "ProjectsListGetResponseDataItemRelationshipsLeadData", @@ -2871,6 +6378,7 @@ "ProjectsSingleGetResponseDataMeta", "ProjectsSingleGetResponseDataMetaErrorsItem", "ProjectsSingleGetResponseDataMetaErrorsItemSource", + "ProjectsSingleGetResponseDataMetaErrorsItemSourceResource", "ProjectsSingleGetResponseDataRelationships", "ProjectsSingleGetResponseDataRelationshipsLead", "ProjectsSingleGetResponseDataRelationshipsLeadData", @@ -2878,10 +6386,646 @@ "ProjectsSingleGetResponseDataType", "ProjectsSingleGetResponseIncludedItem", "ProjectsSingleGetResponseLinks", + "ProjectsSinglePatchRequest", + "ProjectsSinglePatchRequestData", + "ProjectsSinglePatchRequestDataAttributes", + "ProjectsSinglePatchRequestDataAttributesDescription", + "ProjectsSinglePatchRequestDataAttributesDescriptionType", + "ProjectsSinglePatchRequestDataRelationships", + "ProjectsSinglePatchRequestDataRelationshipsLead", + "ProjectsSinglePatchRequestDataRelationshipsLeadData", + "ProjectsSinglePatchRequestDataRelationshipsLeadDataType", + "ProjectsSinglePatchRequestDataType", + "ProjecttemplatesListGetResponse", + "ProjecttemplatesListGetResponseDataItem", + "ProjecttemplatesListGetResponseDataItemAttributes", + "ProjecttemplatesListGetResponseDataItemAttributesParameters", + "ProjecttemplatesListGetResponseDataItemLinks", + "ProjecttemplatesListGetResponseDataItemMeta", + "ProjecttemplatesListGetResponseDataItemMetaErrorsItem", + "ProjecttemplatesListGetResponseDataItemMetaErrorsItemSource", + "ProjecttemplatesListGetResponseDataItemMetaErrorsItemSourceResource", + "ProjecttemplatesListGetResponseDataItemType", + "ProjecttemplatesListGetResponseIncludedItem", + "ProjecttemplatesListGetResponseLinks", + "ProjecttemplatesListGetResponseMeta", + "RelationshipDataBody", + "RelationshipDataBodyType", + "RelationshipDataListRequest", + "RelationshipDataListResponse", + "RelationshipDataSingleRequest", + "RelationshipDataSingleResponse", + "RelationshipsListDeleteRequest", + "RelationshipsListDeleteRequestDataItem", + "RelationshipsListDeleteRequestDataItemType", "ResourceReference", + "RevisionsListGetResponse", + "RevisionsListGetResponseDataItem", + "RevisionsListGetResponseDataItemAttributes", + "RevisionsListGetResponseDataItemLinks", + "RevisionsListGetResponseDataItemMeta", + "RevisionsListGetResponseDataItemMetaErrorsItem", + "RevisionsListGetResponseDataItemMetaErrorsItemSource", + "RevisionsListGetResponseDataItemMetaErrorsItemSourceResource", + "RevisionsListGetResponseDataItemRelationships", + "RevisionsListGetResponseDataItemRelationshipsAuthor", + "RevisionsListGetResponseDataItemRelationshipsAuthorData", + "RevisionsListGetResponseDataItemRelationshipsAuthorDataType", + "RevisionsListGetResponseDataItemType", + "RevisionsListGetResponseIncludedItem", + "RevisionsListGetResponseLinks", + "RevisionsListGetResponseMeta", + "RevisionsSingleGetResponse", + "RevisionsSingleGetResponseData", + "RevisionsSingleGetResponseDataAttributes", + "RevisionsSingleGetResponseDataLinks", + "RevisionsSingleGetResponseDataMeta", + "RevisionsSingleGetResponseDataMetaErrorsItem", + "RevisionsSingleGetResponseDataMetaErrorsItemSource", + "RevisionsSingleGetResponseDataMetaErrorsItemSourceResource", + "RevisionsSingleGetResponseDataRelationships", + "RevisionsSingleGetResponseDataRelationshipsAuthor", + "RevisionsSingleGetResponseDataRelationshipsAuthorData", + "RevisionsSingleGetResponseDataRelationshipsAuthorDataType", + "RevisionsSingleGetResponseDataType", + "RevisionsSingleGetResponseIncludedItem", + "RevisionsSingleGetResponseLinks", "SetLicenseRequestBody", "SetLicenseRequestBodyLicense", "SparseFields", + "TestparameterDefinitionsListGetResponse", + "TestparameterDefinitionsListGetResponseDataItem", + "TestparameterDefinitionsListGetResponseDataItemAttributes", + "TestparameterDefinitionsListGetResponseDataItemLinks", + "TestparameterDefinitionsListGetResponseDataItemMeta", + "TestparameterDefinitionsListGetResponseDataItemMetaErrorsItem", + "TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSource", + "TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSourceResource", + "TestparameterDefinitionsListGetResponseDataItemType", + "TestparameterDefinitionsListGetResponseIncludedItem", + "TestparameterDefinitionsListGetResponseLinks", + "TestparameterDefinitionsListGetResponseMeta", + "TestparameterDefinitionsListPostRequest", + "TestparameterDefinitionsListPostRequestDataItem", + "TestparameterDefinitionsListPostRequestDataItemAttributes", + "TestparameterDefinitionsListPostRequestDataItemType", + "TestparameterDefinitionsListPostResponse", + "TestparameterDefinitionsListPostResponseDataItem", + "TestparameterDefinitionsListPostResponseDataItemLinks", + "TestparameterDefinitionsListPostResponseDataItemType", + "TestparameterDefinitionsSingleGetResponse", + "TestparameterDefinitionsSingleGetResponseData", + "TestparameterDefinitionsSingleGetResponseDataAttributes", + "TestparameterDefinitionsSingleGetResponseDataLinks", + "TestparameterDefinitionsSingleGetResponseDataMeta", + "TestparameterDefinitionsSingleGetResponseDataMetaErrorsItem", + "TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSource", + "TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSourceResource", + "TestparameterDefinitionsSingleGetResponseDataType", + "TestparameterDefinitionsSingleGetResponseIncludedItem", + "TestparameterDefinitionsSingleGetResponseLinks", + "TestparametersListGetResponse", + "TestparametersListGetResponseDataItem", + "TestparametersListGetResponseDataItemAttributes", + "TestparametersListGetResponseDataItemLinks", + "TestparametersListGetResponseDataItemMeta", + "TestparametersListGetResponseDataItemMetaErrorsItem", + "TestparametersListGetResponseDataItemMetaErrorsItemSource", + "TestparametersListGetResponseDataItemMetaErrorsItemSourceResource", + "TestparametersListGetResponseDataItemRelationships", + "TestparametersListGetResponseDataItemRelationshipsDefinition", + "TestparametersListGetResponseDataItemRelationshipsDefinitionData", + "TestparametersListGetResponseDataItemRelationshipsDefinitionDataType", + "TestparametersListGetResponseDataItemType", + "TestparametersListGetResponseIncludedItem", + "TestparametersListGetResponseLinks", + "TestparametersListGetResponseMeta", + "TestparametersListPostRequest", + "TestparametersListPostRequestDataItem", + "TestparametersListPostRequestDataItemAttributes", + "TestparametersListPostRequestDataItemType", + "TestparametersListPostResponse", + "TestparametersListPostResponseDataItem", + "TestparametersListPostResponseDataItemLinks", + "TestparametersListPostResponseDataItemType", + "TestparametersSingleGetResponse", + "TestparametersSingleGetResponseData", + "TestparametersSingleGetResponseDataAttributes", + "TestparametersSingleGetResponseDataLinks", + "TestparametersSingleGetResponseDataMeta", + "TestparametersSingleGetResponseDataMetaErrorsItem", + "TestparametersSingleGetResponseDataMetaErrorsItemSource", + "TestparametersSingleGetResponseDataMetaErrorsItemSourceResource", + "TestparametersSingleGetResponseDataRelationships", + "TestparametersSingleGetResponseDataRelationshipsDefinition", + "TestparametersSingleGetResponseDataRelationshipsDefinitionData", + "TestparametersSingleGetResponseDataRelationshipsDefinitionDataType", + "TestparametersSingleGetResponseDataType", + "TestparametersSingleGetResponseIncludedItem", + "TestparametersSingleGetResponseLinks", + "TestrecordAttachmentsListGetResponse", + "TestrecordAttachmentsListGetResponseDataItem", + "TestrecordAttachmentsListGetResponseDataItemAttributes", + "TestrecordAttachmentsListGetResponseDataItemLinks", + "TestrecordAttachmentsListGetResponseDataItemMeta", + "TestrecordAttachmentsListGetResponseDataItemMetaErrorsItem", + "TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSource", + "TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource", + "TestrecordAttachmentsListGetResponseDataItemRelationships", + "TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthor", + "TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthorData", + "TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthorDataType", + "TestrecordAttachmentsListGetResponseDataItemRelationshipsProject", + "TestrecordAttachmentsListGetResponseDataItemRelationshipsProjectData", + "TestrecordAttachmentsListGetResponseDataItemRelationshipsProjectDataType", + "TestrecordAttachmentsListGetResponseDataItemType", + "TestrecordAttachmentsListGetResponseIncludedItem", + "TestrecordAttachmentsListGetResponseLinks", + "TestrecordAttachmentsListGetResponseMeta", + "TestrecordAttachmentsListPostRequest", + "TestrecordAttachmentsListPostRequestDataItem", + "TestrecordAttachmentsListPostRequestDataItemAttributes", + "TestrecordAttachmentsListPostRequestDataItemType", + "TestrecordAttachmentsListPostResponse", + "TestrecordAttachmentsListPostResponseDataItem", + "TestrecordAttachmentsListPostResponseDataItemLinks", + "TestrecordAttachmentsListPostResponseDataItemType", + "TestrecordAttachmentsSingleGetResponse", + "TestrecordAttachmentsSingleGetResponseData", + "TestrecordAttachmentsSingleGetResponseDataAttributes", + "TestrecordAttachmentsSingleGetResponseDataLinks", + "TestrecordAttachmentsSingleGetResponseDataMeta", + "TestrecordAttachmentsSingleGetResponseDataMetaErrorsItem", + "TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSource", + "TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource", + "TestrecordAttachmentsSingleGetResponseDataRelationships", + "TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthor", + "TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthorData", + "TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthorDataType", + "TestrecordAttachmentsSingleGetResponseDataRelationshipsProject", + "TestrecordAttachmentsSingleGetResponseDataRelationshipsProjectData", + "TestrecordAttachmentsSingleGetResponseDataRelationshipsProjectDataType", + "TestrecordAttachmentsSingleGetResponseDataType", + "TestrecordAttachmentsSingleGetResponseIncludedItem", + "TestrecordAttachmentsSingleGetResponseLinks", + "TestrecordsListGetResponse", + "TestrecordsListGetResponseDataItem", + "TestrecordsListGetResponseDataItemAttributes", + "TestrecordsListGetResponseDataItemAttributesComment", + "TestrecordsListGetResponseDataItemAttributesCommentType", + "TestrecordsListGetResponseDataItemLinks", + "TestrecordsListGetResponseDataItemMeta", + "TestrecordsListGetResponseDataItemMetaErrorsItem", + "TestrecordsListGetResponseDataItemMetaErrorsItemSource", + "TestrecordsListGetResponseDataItemMetaErrorsItemSourceResource", + "TestrecordsListGetResponseDataItemRelationships", + "TestrecordsListGetResponseDataItemRelationshipsDefect", + "TestrecordsListGetResponseDataItemRelationshipsDefectData", + "TestrecordsListGetResponseDataItemRelationshipsDefectDataType", + "TestrecordsListGetResponseDataItemRelationshipsExecutedBy", + "TestrecordsListGetResponseDataItemRelationshipsExecutedByData", + "TestrecordsListGetResponseDataItemRelationshipsExecutedByDataType", + "TestrecordsListGetResponseDataItemRelationshipsTestCase", + "TestrecordsListGetResponseDataItemRelationshipsTestCaseData", + "TestrecordsListGetResponseDataItemRelationshipsTestCaseDataType", + "TestrecordsListGetResponseDataItemType", + "TestrecordsListGetResponseIncludedItem", + "TestrecordsListGetResponseLinks", + "TestrecordsListGetResponseMeta", + "TestrecordsListPostRequest", + "TestrecordsListPostRequestDataItem", + "TestrecordsListPostRequestDataItemAttributes", + "TestrecordsListPostRequestDataItemAttributesComment", + "TestrecordsListPostRequestDataItemAttributesCommentType", + "TestrecordsListPostRequestDataItemRelationships", + "TestrecordsListPostRequestDataItemRelationshipsDefect", + "TestrecordsListPostRequestDataItemRelationshipsDefectData", + "TestrecordsListPostRequestDataItemRelationshipsDefectDataType", + "TestrecordsListPostRequestDataItemRelationshipsExecutedBy", + "TestrecordsListPostRequestDataItemRelationshipsExecutedByData", + "TestrecordsListPostRequestDataItemRelationshipsExecutedByDataType", + "TestrecordsListPostRequestDataItemRelationshipsTestCase", + "TestrecordsListPostRequestDataItemRelationshipsTestCaseData", + "TestrecordsListPostRequestDataItemRelationshipsTestCaseDataType", + "TestrecordsListPostRequestDataItemType", + "TestrecordsListPostResponse", + "TestrecordsListPostResponseDataItem", + "TestrecordsListPostResponseDataItemLinks", + "TestrecordsListPostResponseDataItemType", + "TestrecordsSingleGetResponse", + "TestrecordsSingleGetResponseData", + "TestrecordsSingleGetResponseDataAttributes", + "TestrecordsSingleGetResponseDataAttributesComment", + "TestrecordsSingleGetResponseDataAttributesCommentType", + "TestrecordsSingleGetResponseDataLinks", + "TestrecordsSingleGetResponseDataMeta", + "TestrecordsSingleGetResponseDataMetaErrorsItem", + "TestrecordsSingleGetResponseDataMetaErrorsItemSource", + "TestrecordsSingleGetResponseDataMetaErrorsItemSourceResource", + "TestrecordsSingleGetResponseDataRelationships", + "TestrecordsSingleGetResponseDataRelationshipsDefect", + "TestrecordsSingleGetResponseDataRelationshipsDefectData", + "TestrecordsSingleGetResponseDataRelationshipsDefectDataType", + "TestrecordsSingleGetResponseDataRelationshipsExecutedBy", + "TestrecordsSingleGetResponseDataRelationshipsExecutedByData", + "TestrecordsSingleGetResponseDataRelationshipsExecutedByDataType", + "TestrecordsSingleGetResponseDataRelationshipsTestCase", + "TestrecordsSingleGetResponseDataRelationshipsTestCaseData", + "TestrecordsSingleGetResponseDataRelationshipsTestCaseDataType", + "TestrecordsSingleGetResponseDataType", + "TestrecordsSingleGetResponseIncludedItem", + "TestrecordsSingleGetResponseLinks", + "TestrecordsSinglePatchRequest", + "TestrecordsSinglePatchRequestData", + "TestrecordsSinglePatchRequestDataAttributes", + "TestrecordsSinglePatchRequestDataAttributesComment", + "TestrecordsSinglePatchRequestDataAttributesCommentType", + "TestrecordsSinglePatchRequestDataRelationships", + "TestrecordsSinglePatchRequestDataRelationshipsDefect", + "TestrecordsSinglePatchRequestDataRelationshipsDefectData", + "TestrecordsSinglePatchRequestDataRelationshipsDefectDataType", + "TestrecordsSinglePatchRequestDataRelationshipsExecutedBy", + "TestrecordsSinglePatchRequestDataRelationshipsExecutedByData", + "TestrecordsSinglePatchRequestDataRelationshipsExecutedByDataType", + "TestrecordsSinglePatchRequestDataType", + "TestrunAttachmentsListGetResponse", + "TestrunAttachmentsListGetResponseDataItem", + "TestrunAttachmentsListGetResponseDataItemAttributes", + "TestrunAttachmentsListGetResponseDataItemLinks", + "TestrunAttachmentsListGetResponseDataItemMeta", + "TestrunAttachmentsListGetResponseDataItemMetaErrorsItem", + "TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSource", + "TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource", + "TestrunAttachmentsListGetResponseDataItemRelationships", + "TestrunAttachmentsListGetResponseDataItemRelationshipsAuthor", + "TestrunAttachmentsListGetResponseDataItemRelationshipsAuthorData", + "TestrunAttachmentsListGetResponseDataItemRelationshipsAuthorDataType", + "TestrunAttachmentsListGetResponseDataItemRelationshipsProject", + "TestrunAttachmentsListGetResponseDataItemRelationshipsProjectData", + "TestrunAttachmentsListGetResponseDataItemRelationshipsProjectDataType", + "TestrunAttachmentsListGetResponseDataItemType", + "TestrunAttachmentsListGetResponseIncludedItem", + "TestrunAttachmentsListGetResponseLinks", + "TestrunAttachmentsListGetResponseMeta", + "TestrunAttachmentsListPostRequest", + "TestrunAttachmentsListPostRequestDataItem", + "TestrunAttachmentsListPostRequestDataItemAttributes", + "TestrunAttachmentsListPostRequestDataItemType", + "TestrunAttachmentsListPostResponse", + "TestrunAttachmentsListPostResponseDataItem", + "TestrunAttachmentsListPostResponseDataItemLinks", + "TestrunAttachmentsListPostResponseDataItemType", + "TestrunAttachmentsSingleGetResponse", + "TestrunAttachmentsSingleGetResponseData", + "TestrunAttachmentsSingleGetResponseDataAttributes", + "TestrunAttachmentsSingleGetResponseDataLinks", + "TestrunAttachmentsSingleGetResponseDataMeta", + "TestrunAttachmentsSingleGetResponseDataMetaErrorsItem", + "TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSource", + "TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource", + "TestrunAttachmentsSingleGetResponseDataRelationships", + "TestrunAttachmentsSingleGetResponseDataRelationshipsAuthor", + "TestrunAttachmentsSingleGetResponseDataRelationshipsAuthorData", + "TestrunAttachmentsSingleGetResponseDataRelationshipsAuthorDataType", + "TestrunAttachmentsSingleGetResponseDataRelationshipsProject", + "TestrunAttachmentsSingleGetResponseDataRelationshipsProjectData", + "TestrunAttachmentsSingleGetResponseDataRelationshipsProjectDataType", + "TestrunAttachmentsSingleGetResponseDataType", + "TestrunAttachmentsSingleGetResponseIncludedItem", + "TestrunAttachmentsSingleGetResponseLinks", + "TestrunAttachmentsSinglePatchRequest", + "TestrunAttachmentsSinglePatchRequestData", + "TestrunAttachmentsSinglePatchRequestDataAttributes", + "TestrunAttachmentsSinglePatchRequestDataType", + "TestrunCommentsListGetResponse", + "TestrunCommentsListGetResponseDataItem", + "TestrunCommentsListGetResponseDataItemAttributes", + "TestrunCommentsListGetResponseDataItemAttributesText", + "TestrunCommentsListGetResponseDataItemAttributesTextType", + "TestrunCommentsListGetResponseDataItemLinks", + "TestrunCommentsListGetResponseDataItemMeta", + "TestrunCommentsListGetResponseDataItemMetaErrorsItem", + "TestrunCommentsListGetResponseDataItemMetaErrorsItemSource", + "TestrunCommentsListGetResponseDataItemMetaErrorsItemSourceResource", + "TestrunCommentsListGetResponseDataItemRelationships", + "TestrunCommentsListGetResponseDataItemRelationshipsAuthor", + "TestrunCommentsListGetResponseDataItemRelationshipsAuthorData", + "TestrunCommentsListGetResponseDataItemRelationshipsAuthorDataType", + "TestrunCommentsListGetResponseDataItemRelationshipsChildComments", + "TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsDataItem", + "TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsDataItemType", + "TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsMeta", + "TestrunCommentsListGetResponseDataItemRelationshipsParentComment", + "TestrunCommentsListGetResponseDataItemRelationshipsParentCommentData", + "TestrunCommentsListGetResponseDataItemRelationshipsParentCommentDataType", + "TestrunCommentsListGetResponseDataItemRelationshipsProject", + "TestrunCommentsListGetResponseDataItemRelationshipsProjectData", + "TestrunCommentsListGetResponseDataItemRelationshipsProjectDataType", + "TestrunCommentsListGetResponseDataItemType", + "TestrunCommentsListGetResponseIncludedItem", + "TestrunCommentsListGetResponseLinks", + "TestrunCommentsListGetResponseMeta", + "TestrunCommentsListPostRequest", + "TestrunCommentsListPostRequestDataItem", + "TestrunCommentsListPostRequestDataItemAttributes", + "TestrunCommentsListPostRequestDataItemAttributesText", + "TestrunCommentsListPostRequestDataItemAttributesTextType", + "TestrunCommentsListPostRequestDataItemRelationships", + "TestrunCommentsListPostRequestDataItemRelationshipsAuthor", + "TestrunCommentsListPostRequestDataItemRelationshipsAuthorData", + "TestrunCommentsListPostRequestDataItemRelationshipsAuthorDataType", + "TestrunCommentsListPostRequestDataItemRelationshipsParentComment", + "TestrunCommentsListPostRequestDataItemRelationshipsParentCommentData", + "TestrunCommentsListPostRequestDataItemRelationshipsParentCommentDataType", + "TestrunCommentsListPostRequestDataItemType", + "TestrunCommentsListPostResponse", + "TestrunCommentsListPostResponseDataItem", + "TestrunCommentsListPostResponseDataItemLinks", + "TestrunCommentsListPostResponseDataItemType", + "TestrunCommentsSingleGetResponse", + "TestrunCommentsSingleGetResponseData", + "TestrunCommentsSingleGetResponseDataAttributes", + "TestrunCommentsSingleGetResponseDataAttributesText", + "TestrunCommentsSingleGetResponseDataAttributesTextType", + "TestrunCommentsSingleGetResponseDataLinks", + "TestrunCommentsSingleGetResponseDataMeta", + "TestrunCommentsSingleGetResponseDataMetaErrorsItem", + "TestrunCommentsSingleGetResponseDataMetaErrorsItemSource", + "TestrunCommentsSingleGetResponseDataMetaErrorsItemSourceResource", + "TestrunCommentsSingleGetResponseDataRelationships", + "TestrunCommentsSingleGetResponseDataRelationshipsAuthor", + "TestrunCommentsSingleGetResponseDataRelationshipsAuthorData", + "TestrunCommentsSingleGetResponseDataRelationshipsAuthorDataType", + "TestrunCommentsSingleGetResponseDataRelationshipsChildComments", + "TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsDataItem", + "TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsDataItemType", + "TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsMeta", + "TestrunCommentsSingleGetResponseDataRelationshipsParentComment", + "TestrunCommentsSingleGetResponseDataRelationshipsParentCommentData", + "TestrunCommentsSingleGetResponseDataRelationshipsParentCommentDataType", + "TestrunCommentsSingleGetResponseDataRelationshipsProject", + "TestrunCommentsSingleGetResponseDataRelationshipsProjectData", + "TestrunCommentsSingleGetResponseDataRelationshipsProjectDataType", + "TestrunCommentsSingleGetResponseDataType", + "TestrunCommentsSingleGetResponseIncludedItem", + "TestrunCommentsSingleGetResponseLinks", + "TestrunCommentsSinglePatchRequest", + "TestrunCommentsSinglePatchRequestData", + "TestrunCommentsSinglePatchRequestDataAttributes", + "TestrunCommentsSinglePatchRequestDataType", + "TestrunsListGetResponse", + "TestrunsListGetResponseDataItem", + "TestrunsListGetResponseDataItemAttributes", + "TestrunsListGetResponseDataItemAttributesHomePageContent", + "TestrunsListGetResponseDataItemAttributesHomePageContentType", + "TestrunsListGetResponseDataItemAttributesSelectTestCasesBy", + "TestrunsListGetResponseDataItemLinks", + "TestrunsListGetResponseDataItemMeta", + "TestrunsListGetResponseDataItemMetaErrorsItem", + "TestrunsListGetResponseDataItemMetaErrorsItemSource", + "TestrunsListGetResponseDataItemMetaErrorsItemSourceResource", + "TestrunsListGetResponseDataItemRelationships", + "TestrunsListGetResponseDataItemRelationshipsAuthor", + "TestrunsListGetResponseDataItemRelationshipsAuthorData", + "TestrunsListGetResponseDataItemRelationshipsAuthorDataType", + "TestrunsListGetResponseDataItemRelationshipsDocument", + "TestrunsListGetResponseDataItemRelationshipsDocumentData", + "TestrunsListGetResponseDataItemRelationshipsDocumentDataType", + "TestrunsListGetResponseDataItemRelationshipsProject", + "TestrunsListGetResponseDataItemRelationshipsProjectData", + "TestrunsListGetResponseDataItemRelationshipsProjectDataType", + "TestrunsListGetResponseDataItemRelationshipsProjectSpan", + "TestrunsListGetResponseDataItemRelationshipsProjectSpanDataItem", + "TestrunsListGetResponseDataItemRelationshipsProjectSpanDataItemType", + "TestrunsListGetResponseDataItemRelationshipsProjectSpanMeta", + "TestrunsListGetResponseDataItemRelationshipsSummaryDefect", + "TestrunsListGetResponseDataItemRelationshipsSummaryDefectData", + "TestrunsListGetResponseDataItemRelationshipsSummaryDefectDataType", + "TestrunsListGetResponseDataItemRelationshipsTemplate", + "TestrunsListGetResponseDataItemRelationshipsTemplateData", + "TestrunsListGetResponseDataItemRelationshipsTemplateDataType", + "TestrunsListGetResponseDataItemType", + "TestrunsListGetResponseIncludedItem", + "TestrunsListGetResponseLinks", + "TestrunsListGetResponseMeta", + "TestrunsListPostRequest", + "TestrunsListPostRequestDataItem", + "TestrunsListPostRequestDataItemAttributes", + "TestrunsListPostRequestDataItemAttributesHomePageContent", + "TestrunsListPostRequestDataItemAttributesHomePageContentType", + "TestrunsListPostRequestDataItemAttributesSelectTestCasesBy", + "TestrunsListPostRequestDataItemRelationships", + "TestrunsListPostRequestDataItemRelationshipsDocument", + "TestrunsListPostRequestDataItemRelationshipsDocumentData", + "TestrunsListPostRequestDataItemRelationshipsDocumentDataType", + "TestrunsListPostRequestDataItemRelationshipsProjectSpan", + "TestrunsListPostRequestDataItemRelationshipsProjectSpanDataItem", + "TestrunsListPostRequestDataItemRelationshipsProjectSpanDataItemType", + "TestrunsListPostRequestDataItemRelationshipsSummaryDefect", + "TestrunsListPostRequestDataItemRelationshipsSummaryDefectData", + "TestrunsListPostRequestDataItemRelationshipsSummaryDefectDataType", + "TestrunsListPostRequestDataItemRelationshipsTemplate", + "TestrunsListPostRequestDataItemRelationshipsTemplateData", + "TestrunsListPostRequestDataItemRelationshipsTemplateDataType", + "TestrunsListPostRequestDataItemType", + "TestrunsListPostResponse", + "TestrunsListPostResponseDataItem", + "TestrunsListPostResponseDataItemLinks", + "TestrunsListPostResponseDataItemType", + "TestrunsSingleGetResponse", + "TestrunsSingleGetResponseData", + "TestrunsSingleGetResponseDataAttributes", + "TestrunsSingleGetResponseDataAttributesHomePageContent", + "TestrunsSingleGetResponseDataAttributesHomePageContentType", + "TestrunsSingleGetResponseDataAttributesSelectTestCasesBy", + "TestrunsSingleGetResponseDataLinks", + "TestrunsSingleGetResponseDataMeta", + "TestrunsSingleGetResponseDataMetaErrorsItem", + "TestrunsSingleGetResponseDataMetaErrorsItemSource", + "TestrunsSingleGetResponseDataMetaErrorsItemSourceResource", + "TestrunsSingleGetResponseDataRelationships", + "TestrunsSingleGetResponseDataRelationshipsAuthor", + "TestrunsSingleGetResponseDataRelationshipsAuthorData", + "TestrunsSingleGetResponseDataRelationshipsAuthorDataType", + "TestrunsSingleGetResponseDataRelationshipsDocument", + "TestrunsSingleGetResponseDataRelationshipsDocumentData", + "TestrunsSingleGetResponseDataRelationshipsDocumentDataType", + "TestrunsSingleGetResponseDataRelationshipsProject", + "TestrunsSingleGetResponseDataRelationshipsProjectData", + "TestrunsSingleGetResponseDataRelationshipsProjectDataType", + "TestrunsSingleGetResponseDataRelationshipsProjectSpan", + "TestrunsSingleGetResponseDataRelationshipsProjectSpanDataItem", + "TestrunsSingleGetResponseDataRelationshipsProjectSpanDataItemType", + "TestrunsSingleGetResponseDataRelationshipsProjectSpanMeta", + "TestrunsSingleGetResponseDataRelationshipsSummaryDefect", + "TestrunsSingleGetResponseDataRelationshipsSummaryDefectData", + "TestrunsSingleGetResponseDataRelationshipsSummaryDefectDataType", + "TestrunsSingleGetResponseDataRelationshipsTemplate", + "TestrunsSingleGetResponseDataRelationshipsTemplateData", + "TestrunsSingleGetResponseDataRelationshipsTemplateDataType", + "TestrunsSingleGetResponseDataType", + "TestrunsSingleGetResponseIncludedItem", + "TestrunsSingleGetResponseLinks", + "TestrunsSinglePatchRequest", + "TestrunsSinglePatchRequestData", + "TestrunsSinglePatchRequestDataAttributes", + "TestrunsSinglePatchRequestDataAttributesHomePageContent", + "TestrunsSinglePatchRequestDataAttributesHomePageContentType", + "TestrunsSinglePatchRequestDataAttributesSelectTestCasesBy", + "TestrunsSinglePatchRequestDataRelationships", + "TestrunsSinglePatchRequestDataRelationshipsDocument", + "TestrunsSinglePatchRequestDataRelationshipsDocumentData", + "TestrunsSinglePatchRequestDataRelationshipsDocumentDataType", + "TestrunsSinglePatchRequestDataRelationshipsProjectSpan", + "TestrunsSinglePatchRequestDataRelationshipsProjectSpanDataItem", + "TestrunsSinglePatchRequestDataRelationshipsProjectSpanDataItemType", + "TestrunsSinglePatchRequestDataRelationshipsSummaryDefect", + "TestrunsSinglePatchRequestDataRelationshipsSummaryDefectData", + "TestrunsSinglePatchRequestDataRelationshipsSummaryDefectDataType", + "TestrunsSinglePatchRequestDataType", + "TeststepresultAttachmentsListGetResponse", + "TeststepresultAttachmentsListGetResponseDataItem", + "TeststepresultAttachmentsListGetResponseDataItemAttributes", + "TeststepresultAttachmentsListGetResponseDataItemLinks", + "TeststepresultAttachmentsListGetResponseDataItemMeta", + "TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItem", + "TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSource", + "TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource", + "TeststepresultAttachmentsListGetResponseDataItemRelationships", + "TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthor", + "TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthorData", + "TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthorDataType", + "TeststepresultAttachmentsListGetResponseDataItemRelationshipsProject", + "TeststepresultAttachmentsListGetResponseDataItemRelationshipsProjectData", + "TeststepresultAttachmentsListGetResponseDataItemRelationshipsProjectDataType", + "TeststepresultAttachmentsListGetResponseDataItemType", + "TeststepresultAttachmentsListGetResponseIncludedItem", + "TeststepresultAttachmentsListGetResponseLinks", + "TeststepresultAttachmentsListGetResponseMeta", + "TeststepresultAttachmentsListPostRequest", + "TeststepresultAttachmentsListPostRequestDataItem", + "TeststepresultAttachmentsListPostRequestDataItemAttributes", + "TeststepresultAttachmentsListPostRequestDataItemType", + "TeststepresultAttachmentsListPostResponse", + "TeststepresultAttachmentsListPostResponseDataItem", + "TeststepresultAttachmentsListPostResponseDataItemLinks", + "TeststepresultAttachmentsListPostResponseDataItemType", + "TeststepresultAttachmentsSingleGetResponse", + "TeststepresultAttachmentsSingleGetResponseData", + "TeststepresultAttachmentsSingleGetResponseDataAttributes", + "TeststepresultAttachmentsSingleGetResponseDataLinks", + "TeststepresultAttachmentsSingleGetResponseDataMeta", + "TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItem", + "TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSource", + "TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource", + "TeststepresultAttachmentsSingleGetResponseDataRelationships", + "TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthor", + "TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthorData", + "TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthorDataType", + "TeststepresultAttachmentsSingleGetResponseDataRelationshipsProject", + "TeststepresultAttachmentsSingleGetResponseDataRelationshipsProjectData", + "TeststepresultAttachmentsSingleGetResponseDataRelationshipsProjectDataType", + "TeststepresultAttachmentsSingleGetResponseDataType", + "TeststepresultAttachmentsSingleGetResponseIncludedItem", + "TeststepresultAttachmentsSingleGetResponseLinks", + "TeststepResultsListGetResponse", + "TeststepResultsListGetResponseDataItem", + "TeststepResultsListGetResponseDataItemAttributes", + "TeststepResultsListGetResponseDataItemAttributesComment", + "TeststepResultsListGetResponseDataItemAttributesCommentType", + "TeststepResultsListGetResponseDataItemLinks", + "TeststepResultsListGetResponseDataItemMeta", + "TeststepResultsListGetResponseDataItemMetaErrorsItem", + "TeststepResultsListGetResponseDataItemMetaErrorsItemSource", + "TeststepResultsListGetResponseDataItemMetaErrorsItemSourceResource", + "TeststepResultsListGetResponseDataItemRelationships", + "TeststepResultsListGetResponseDataItemRelationshipsTestStep", + "TeststepResultsListGetResponseDataItemRelationshipsTestStepData", + "TeststepResultsListGetResponseDataItemRelationshipsTestStepDataType", + "TeststepResultsListGetResponseDataItemType", + "TeststepResultsListGetResponseIncludedItem", + "TeststepResultsListGetResponseLinks", + "TeststepResultsListGetResponseMeta", + "TeststepResultsListPostRequest", + "TeststepResultsListPostRequestDataItem", + "TeststepResultsListPostRequestDataItemAttributes", + "TeststepResultsListPostRequestDataItemAttributesComment", + "TeststepResultsListPostRequestDataItemAttributesCommentType", + "TeststepResultsListPostRequestDataItemType", + "TeststepResultsListPostResponse", + "TeststepResultsListPostResponseDataItem", + "TeststepResultsListPostResponseDataItemLinks", + "TeststepResultsListPostResponseDataItemType", + "TeststepResultsSingleGetResponse", + "TeststepResultsSingleGetResponseData", + "TeststepResultsSingleGetResponseDataAttributes", + "TeststepResultsSingleGetResponseDataAttributesComment", + "TeststepResultsSingleGetResponseDataAttributesCommentType", + "TeststepResultsSingleGetResponseDataLinks", + "TeststepResultsSingleGetResponseDataMeta", + "TeststepResultsSingleGetResponseDataMetaErrorsItem", + "TeststepResultsSingleGetResponseDataMetaErrorsItemSource", + "TeststepResultsSingleGetResponseDataMetaErrorsItemSourceResource", + "TeststepResultsSingleGetResponseDataRelationships", + "TeststepResultsSingleGetResponseDataRelationshipsTestStep", + "TeststepResultsSingleGetResponseDataRelationshipsTestStepData", + "TeststepResultsSingleGetResponseDataRelationshipsTestStepDataType", + "TeststepResultsSingleGetResponseDataType", + "TeststepResultsSingleGetResponseIncludedItem", + "TeststepResultsSingleGetResponseLinks", + "TeststepsListDeleteRequest", + "TeststepsListDeleteRequestDataItem", + "TeststepsListDeleteRequestDataItemType", + "TeststepsListGetResponse", + "TeststepsListGetResponseDataItem", + "TeststepsListGetResponseDataItemAttributes", + "TeststepsListGetResponseDataItemAttributesValuesItem", + "TeststepsListGetResponseDataItemAttributesValuesItemType", + "TeststepsListGetResponseDataItemLinks", + "TeststepsListGetResponseDataItemMeta", + "TeststepsListGetResponseDataItemMetaErrorsItem", + "TeststepsListGetResponseDataItemMetaErrorsItemSource", + "TeststepsListGetResponseDataItemMetaErrorsItemSourceResource", + "TeststepsListGetResponseDataItemType", + "TeststepsListGetResponseIncludedItem", + "TeststepsListGetResponseLinks", + "TeststepsListGetResponseMeta", + "TeststepsListPatchRequest", + "TeststepsListPatchRequestDataItem", + "TeststepsListPatchRequestDataItemAttributes", + "TeststepsListPatchRequestDataItemAttributesValuesItem", + "TeststepsListPatchRequestDataItemAttributesValuesItemType", + "TeststepsListPatchRequestDataItemType", + "TeststepsListPostRequest", + "TeststepsListPostRequestDataItem", + "TeststepsListPostRequestDataItemAttributes", + "TeststepsListPostRequestDataItemAttributesValuesItem", + "TeststepsListPostRequestDataItemAttributesValuesItemType", + "TeststepsListPostRequestDataItemType", + "TeststepsListPostResponse", + "TeststepsListPostResponseDataItem", + "TeststepsListPostResponseDataItemLinks", + "TeststepsListPostResponseDataItemType", + "TeststepsSingleGetResponse", + "TeststepsSingleGetResponseData", + "TeststepsSingleGetResponseDataAttributes", + "TeststepsSingleGetResponseDataAttributesValuesItem", + "TeststepsSingleGetResponseDataAttributesValuesItemType", + "TeststepsSingleGetResponseDataLinks", + "TeststepsSingleGetResponseDataMeta", + "TeststepsSingleGetResponseDataMetaErrorsItem", + "TeststepsSingleGetResponseDataMetaErrorsItemSource", + "TeststepsSingleGetResponseDataMetaErrorsItemSourceResource", + "TeststepsSingleGetResponseDataType", + "TeststepsSingleGetResponseIncludedItem", + "TeststepsSingleGetResponseLinks", + "TeststepsSinglePatchRequest", + "TeststepsSinglePatchRequestData", + "TeststepsSinglePatchRequestDataAttributes", + "TeststepsSinglePatchRequestDataAttributesValuesItem", + "TeststepsSinglePatchRequestDataAttributesValuesItemType", + "TeststepsSinglePatchRequestDataType", + "UpdateAvatarRequestBody", "UsergroupsSingleGetResponse", "UsergroupsSingleGetResponseData", "UsergroupsSingleGetResponseDataAttributes", @@ -2891,6 +7035,7 @@ "UsergroupsSingleGetResponseDataMeta", "UsergroupsSingleGetResponseDataMetaErrorsItem", "UsergroupsSingleGetResponseDataMetaErrorsItemSource", + "UsergroupsSingleGetResponseDataMetaErrorsItemSourceResource", "UsergroupsSingleGetResponseDataRelationships", "UsergroupsSingleGetResponseDataRelationshipsGlobalRoles", "UsergroupsSingleGetResponseDataRelationshipsGlobalRolesDataItem", @@ -2916,6 +7061,7 @@ "UsersListGetResponseDataItemMeta", "UsersListGetResponseDataItemMetaErrorsItem", "UsersListGetResponseDataItemMetaErrorsItemSource", + "UsersListGetResponseDataItemMetaErrorsItemSourceResource", "UsersListGetResponseDataItemRelationships", "UsersListGetResponseDataItemRelationshipsGlobalRoles", "UsersListGetResponseDataItemRelationshipsGlobalRolesDataItem", @@ -2962,6 +7108,7 @@ "UsersSingleGetResponseDataMeta", "UsersSingleGetResponseDataMetaErrorsItem", "UsersSingleGetResponseDataMetaErrorsItemSource", + "UsersSingleGetResponseDataMetaErrorsItemSourceResource", "UsersSingleGetResponseDataRelationships", "UsersSingleGetResponseDataRelationshipsGlobalRoles", "UsersSingleGetResponseDataRelationshipsGlobalRolesDataItem", @@ -2994,6 +7141,69 @@ "UsersSinglePatchRequestDataRelationshipsUserGroupsDataItem", "UsersSinglePatchRequestDataRelationshipsUserGroupsDataItemType", "UsersSinglePatchRequestDataType", + "WorkflowActionsActionResponseBody", + "WorkflowActionsActionResponseBodyDataItem", + "WorkflowActionsActionResponseBodyLinks", + "WorkflowActionsActionResponseBodyMeta", + "WorkitemApprovalsListDeleteRequest", + "WorkitemApprovalsListDeleteRequestDataItem", + "WorkitemApprovalsListDeleteRequestDataItemType", + "WorkitemApprovalsListGetResponse", + "WorkitemApprovalsListGetResponseDataItem", + "WorkitemApprovalsListGetResponseDataItemAttributes", + "WorkitemApprovalsListGetResponseDataItemAttributesStatus", + "WorkitemApprovalsListGetResponseDataItemLinks", + "WorkitemApprovalsListGetResponseDataItemMeta", + "WorkitemApprovalsListGetResponseDataItemMetaErrorsItem", + "WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSource", + "WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSourceResource", + "WorkitemApprovalsListGetResponseDataItemRelationships", + "WorkitemApprovalsListGetResponseDataItemRelationshipsUser", + "WorkitemApprovalsListGetResponseDataItemRelationshipsUserData", + "WorkitemApprovalsListGetResponseDataItemRelationshipsUserDataType", + "WorkitemApprovalsListGetResponseDataItemType", + "WorkitemApprovalsListGetResponseIncludedItem", + "WorkitemApprovalsListGetResponseLinks", + "WorkitemApprovalsListGetResponseMeta", + "WorkitemApprovalsListPatchRequest", + "WorkitemApprovalsListPatchRequestDataItem", + "WorkitemApprovalsListPatchRequestDataItemAttributes", + "WorkitemApprovalsListPatchRequestDataItemAttributesStatus", + "WorkitemApprovalsListPatchRequestDataItemType", + "WorkitemApprovalsListPostRequest", + "WorkitemApprovalsListPostRequestDataItem", + "WorkitemApprovalsListPostRequestDataItemAttributes", + "WorkitemApprovalsListPostRequestDataItemAttributesStatus", + "WorkitemApprovalsListPostRequestDataItemRelationships", + "WorkitemApprovalsListPostRequestDataItemRelationshipsUser", + "WorkitemApprovalsListPostRequestDataItemRelationshipsUserData", + "WorkitemApprovalsListPostRequestDataItemRelationshipsUserDataType", + "WorkitemApprovalsListPostRequestDataItemType", + "WorkitemApprovalsListPostResponse", + "WorkitemApprovalsListPostResponseDataItem", + "WorkitemApprovalsListPostResponseDataItemLinks", + "WorkitemApprovalsListPostResponseDataItemType", + "WorkitemApprovalsSingleGetResponse", + "WorkitemApprovalsSingleGetResponseData", + "WorkitemApprovalsSingleGetResponseDataAttributes", + "WorkitemApprovalsSingleGetResponseDataAttributesStatus", + "WorkitemApprovalsSingleGetResponseDataLinks", + "WorkitemApprovalsSingleGetResponseDataMeta", + "WorkitemApprovalsSingleGetResponseDataMetaErrorsItem", + "WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSource", + "WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSourceResource", + "WorkitemApprovalsSingleGetResponseDataRelationships", + "WorkitemApprovalsSingleGetResponseDataRelationshipsUser", + "WorkitemApprovalsSingleGetResponseDataRelationshipsUserData", + "WorkitemApprovalsSingleGetResponseDataRelationshipsUserDataType", + "WorkitemApprovalsSingleGetResponseDataType", + "WorkitemApprovalsSingleGetResponseIncludedItem", + "WorkitemApprovalsSingleGetResponseLinks", + "WorkitemApprovalsSinglePatchRequest", + "WorkitemApprovalsSinglePatchRequestData", + "WorkitemApprovalsSinglePatchRequestDataAttributes", + "WorkitemApprovalsSinglePatchRequestDataAttributesStatus", + "WorkitemApprovalsSinglePatchRequestDataType", "WorkitemAttachmentsListGetResponse", "WorkitemAttachmentsListGetResponseDataItem", "WorkitemAttachmentsListGetResponseDataItemAttributes", @@ -3001,6 +7211,7 @@ "WorkitemAttachmentsListGetResponseDataItemMeta", "WorkitemAttachmentsListGetResponseDataItemMetaErrorsItem", "WorkitemAttachmentsListGetResponseDataItemMetaErrorsItemSource", + "WorkitemAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource", "WorkitemAttachmentsListGetResponseDataItemRelationships", "WorkitemAttachmentsListGetResponseDataItemRelationshipsAuthor", "WorkitemAttachmentsListGetResponseDataItemRelationshipsAuthorData", @@ -3027,6 +7238,7 @@ "WorkitemAttachmentsSingleGetResponseDataMeta", "WorkitemAttachmentsSingleGetResponseDataMetaErrorsItem", "WorkitemAttachmentsSingleGetResponseDataMetaErrorsItemSource", + "WorkitemAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource", "WorkitemAttachmentsSingleGetResponseDataRelationships", "WorkitemAttachmentsSingleGetResponseDataRelationshipsAuthor", "WorkitemAttachmentsSingleGetResponseDataRelationshipsAuthorData", @@ -3050,6 +7262,7 @@ "WorkitemCommentsListGetResponseDataItemMeta", "WorkitemCommentsListGetResponseDataItemMetaErrorsItem", "WorkitemCommentsListGetResponseDataItemMetaErrorsItemSource", + "WorkitemCommentsListGetResponseDataItemMetaErrorsItemSourceResource", "WorkitemCommentsListGetResponseDataItemRelationships", "WorkitemCommentsListGetResponseDataItemRelationshipsAuthor", "WorkitemCommentsListGetResponseDataItemRelationshipsAuthorData", @@ -3094,6 +7307,7 @@ "WorkitemCommentsSingleGetResponseDataMeta", "WorkitemCommentsSingleGetResponseDataMetaErrorsItem", "WorkitemCommentsSingleGetResponseDataMetaErrorsItemSource", + "WorkitemCommentsSingleGetResponseDataMetaErrorsItemSourceResource", "WorkitemCommentsSingleGetResponseDataRelationships", "WorkitemCommentsSingleGetResponseDataRelationshipsAuthor", "WorkitemCommentsSingleGetResponseDataRelationshipsAuthorData", @@ -3128,7 +7342,12 @@ "WorkitemsListGetResponseDataItemMeta", "WorkitemsListGetResponseDataItemMetaErrorsItem", "WorkitemsListGetResponseDataItemMetaErrorsItemSource", + "WorkitemsListGetResponseDataItemMetaErrorsItemSourceResource", "WorkitemsListGetResponseDataItemRelationships", + "WorkitemsListGetResponseDataItemRelationshipsApprovals", + "WorkitemsListGetResponseDataItemRelationshipsApprovalsDataItem", + "WorkitemsListGetResponseDataItemRelationshipsApprovalsDataItemType", + "WorkitemsListGetResponseDataItemRelationshipsApprovalsMeta", "WorkitemsListGetResponseDataItemRelationshipsAssignee", "WorkitemsListGetResponseDataItemRelationshipsAssigneeDataItem", "WorkitemsListGetResponseDataItemRelationshipsAssigneeDataItemType", @@ -3141,6 +7360,10 @@ "WorkitemsListGetResponseDataItemRelationshipsAuthor", "WorkitemsListGetResponseDataItemRelationshipsAuthorData", "WorkitemsListGetResponseDataItemRelationshipsAuthorDataType", + "WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItems", + "WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsDataItem", + "WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsDataItemType", + "WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsMeta", "WorkitemsListGetResponseDataItemRelationshipsCategories", "WorkitemsListGetResponseDataItemRelationshipsCategoriesDataItem", "WorkitemsListGetResponseDataItemRelationshipsCategoriesDataItemType", @@ -3150,6 +7373,18 @@ "WorkitemsListGetResponseDataItemRelationshipsCommentsDataItemType", "WorkitemsListGetResponseDataItemRelationshipsCommentsLinks", "WorkitemsListGetResponseDataItemRelationshipsCommentsMeta", + "WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItems", + "WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsDataItem", + "WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsDataItemType", + "WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsMeta", + "WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResources", + "WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesDataItem", + "WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesDataItemType", + "WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesMeta", + "WorkitemsListGetResponseDataItemRelationshipsLinkedRevisions", + "WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsDataItem", + "WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsDataItemType", + "WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsMeta", "WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItems", "WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItemsDataItem", "WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItemsDataItemType", @@ -3165,14 +7400,49 @@ "WorkitemsListGetResponseDataItemRelationshipsProject", "WorkitemsListGetResponseDataItemRelationshipsProjectData", "WorkitemsListGetResponseDataItemRelationshipsProjectDataType", + "WorkitemsListGetResponseDataItemRelationshipsTestSteps", + "WorkitemsListGetResponseDataItemRelationshipsTestStepsDataItem", + "WorkitemsListGetResponseDataItemRelationshipsTestStepsDataItemType", + "WorkitemsListGetResponseDataItemRelationshipsTestStepsMeta", + "WorkitemsListGetResponseDataItemRelationshipsVotes", + "WorkitemsListGetResponseDataItemRelationshipsVotesDataItem", + "WorkitemsListGetResponseDataItemRelationshipsVotesDataItemType", + "WorkitemsListGetResponseDataItemRelationshipsVotesMeta", "WorkitemsListGetResponseDataItemRelationshipsWatches", "WorkitemsListGetResponseDataItemRelationshipsWatchesDataItem", "WorkitemsListGetResponseDataItemRelationshipsWatchesDataItemType", "WorkitemsListGetResponseDataItemRelationshipsWatchesMeta", + "WorkitemsListGetResponseDataItemRelationshipsWorkRecords", + "WorkitemsListGetResponseDataItemRelationshipsWorkRecordsDataItem", + "WorkitemsListGetResponseDataItemRelationshipsWorkRecordsDataItemType", + "WorkitemsListGetResponseDataItemRelationshipsWorkRecordsMeta", "WorkitemsListGetResponseDataItemType", "WorkitemsListGetResponseIncludedItem", "WorkitemsListGetResponseLinks", "WorkitemsListGetResponseMeta", + "WorkitemsListPatchRequest", + "WorkitemsListPatchRequestDataItem", + "WorkitemsListPatchRequestDataItemAttributes", + "WorkitemsListPatchRequestDataItemAttributesDescription", + "WorkitemsListPatchRequestDataItemAttributesDescriptionType", + "WorkitemsListPatchRequestDataItemAttributesHyperlinksItem", + "WorkitemsListPatchRequestDataItemRelationships", + "WorkitemsListPatchRequestDataItemRelationshipsAssignee", + "WorkitemsListPatchRequestDataItemRelationshipsAssigneeDataItem", + "WorkitemsListPatchRequestDataItemRelationshipsAssigneeDataItemType", + "WorkitemsListPatchRequestDataItemRelationshipsCategories", + "WorkitemsListPatchRequestDataItemRelationshipsCategoriesDataItem", + "WorkitemsListPatchRequestDataItemRelationshipsCategoriesDataItemType", + "WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisions", + "WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisionsDataItem", + "WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisionsDataItemType", + "WorkitemsListPatchRequestDataItemRelationshipsVotes", + "WorkitemsListPatchRequestDataItemRelationshipsVotesDataItem", + "WorkitemsListPatchRequestDataItemRelationshipsVotesDataItemType", + "WorkitemsListPatchRequestDataItemRelationshipsWatches", + "WorkitemsListPatchRequestDataItemRelationshipsWatchesDataItem", + "WorkitemsListPatchRequestDataItemRelationshipsWatchesDataItemType", + "WorkitemsListPatchRequestDataItemType", "WorkitemsListPostRequest", "WorkitemsListPostRequestDataItem", "WorkitemsListPostRequestDataItemAttributes", @@ -3189,6 +7459,9 @@ "WorkitemsListPostRequestDataItemRelationshipsCategories", "WorkitemsListPostRequestDataItemRelationshipsCategoriesDataItem", "WorkitemsListPostRequestDataItemRelationshipsCategoriesDataItemType", + "WorkitemsListPostRequestDataItemRelationshipsLinkedRevisions", + "WorkitemsListPostRequestDataItemRelationshipsLinkedRevisionsDataItem", + "WorkitemsListPostRequestDataItemRelationshipsLinkedRevisionsDataItemType", "WorkitemsListPostRequestDataItemRelationshipsModule", "WorkitemsListPostRequestDataItemRelationshipsModuleData", "WorkitemsListPostRequestDataItemRelationshipsModuleDataType", @@ -3207,7 +7480,12 @@ "WorkitemsSingleGetResponseDataMeta", "WorkitemsSingleGetResponseDataMetaErrorsItem", "WorkitemsSingleGetResponseDataMetaErrorsItemSource", + "WorkitemsSingleGetResponseDataMetaErrorsItemSourceResource", "WorkitemsSingleGetResponseDataRelationships", + "WorkitemsSingleGetResponseDataRelationshipsApprovals", + "WorkitemsSingleGetResponseDataRelationshipsApprovalsDataItem", + "WorkitemsSingleGetResponseDataRelationshipsApprovalsDataItemType", + "WorkitemsSingleGetResponseDataRelationshipsApprovalsMeta", "WorkitemsSingleGetResponseDataRelationshipsAssignee", "WorkitemsSingleGetResponseDataRelationshipsAssigneeDataItem", "WorkitemsSingleGetResponseDataRelationshipsAssigneeDataItemType", @@ -3220,6 +7498,10 @@ "WorkitemsSingleGetResponseDataRelationshipsAuthor", "WorkitemsSingleGetResponseDataRelationshipsAuthorData", "WorkitemsSingleGetResponseDataRelationshipsAuthorDataType", + "WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItems", + "WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsDataItem", + "WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsDataItemType", + "WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsMeta", "WorkitemsSingleGetResponseDataRelationshipsCategories", "WorkitemsSingleGetResponseDataRelationshipsCategoriesDataItem", "WorkitemsSingleGetResponseDataRelationshipsCategoriesDataItemType", @@ -3229,6 +7511,18 @@ "WorkitemsSingleGetResponseDataRelationshipsCommentsDataItemType", "WorkitemsSingleGetResponseDataRelationshipsCommentsLinks", "WorkitemsSingleGetResponseDataRelationshipsCommentsMeta", + "WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItems", + "WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsDataItem", + "WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsDataItemType", + "WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsMeta", + "WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResources", + "WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesDataItem", + "WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesDataItemType", + "WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesMeta", + "WorkitemsSingleGetResponseDataRelationshipsLinkedRevisions", + "WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsDataItem", + "WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsDataItemType", + "WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsMeta", "WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItems", "WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItemsDataItem", "WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItemsDataItemType", @@ -3244,10 +7538,22 @@ "WorkitemsSingleGetResponseDataRelationshipsProject", "WorkitemsSingleGetResponseDataRelationshipsProjectData", "WorkitemsSingleGetResponseDataRelationshipsProjectDataType", + "WorkitemsSingleGetResponseDataRelationshipsTestSteps", + "WorkitemsSingleGetResponseDataRelationshipsTestStepsDataItem", + "WorkitemsSingleGetResponseDataRelationshipsTestStepsDataItemType", + "WorkitemsSingleGetResponseDataRelationshipsTestStepsMeta", + "WorkitemsSingleGetResponseDataRelationshipsVotes", + "WorkitemsSingleGetResponseDataRelationshipsVotesDataItem", + "WorkitemsSingleGetResponseDataRelationshipsVotesDataItemType", + "WorkitemsSingleGetResponseDataRelationshipsVotesMeta", "WorkitemsSingleGetResponseDataRelationshipsWatches", "WorkitemsSingleGetResponseDataRelationshipsWatchesDataItem", "WorkitemsSingleGetResponseDataRelationshipsWatchesDataItemType", "WorkitemsSingleGetResponseDataRelationshipsWatchesMeta", + "WorkitemsSingleGetResponseDataRelationshipsWorkRecords", + "WorkitemsSingleGetResponseDataRelationshipsWorkRecordsDataItem", + "WorkitemsSingleGetResponseDataRelationshipsWorkRecordsDataItemType", + "WorkitemsSingleGetResponseDataRelationshipsWorkRecordsMeta", "WorkitemsSingleGetResponseDataType", "WorkitemsSingleGetResponseIncludedItem", "WorkitemsSingleGetResponseLinks", @@ -3264,8 +7570,66 @@ "WorkitemsSinglePatchRequestDataRelationshipsCategories", "WorkitemsSinglePatchRequestDataRelationshipsCategoriesDataItem", "WorkitemsSinglePatchRequestDataRelationshipsCategoriesDataItemType", + "WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisions", + "WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisionsDataItem", + "WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisionsDataItemType", + "WorkitemsSinglePatchRequestDataRelationshipsVotes", + "WorkitemsSinglePatchRequestDataRelationshipsVotesDataItem", + "WorkitemsSinglePatchRequestDataRelationshipsVotesDataItemType", "WorkitemsSinglePatchRequestDataRelationshipsWatches", "WorkitemsSinglePatchRequestDataRelationshipsWatchesDataItem", "WorkitemsSinglePatchRequestDataRelationshipsWatchesDataItemType", "WorkitemsSinglePatchRequestDataType", + "WorkrecordsListDeleteRequest", + "WorkrecordsListDeleteRequestDataItem", + "WorkrecordsListDeleteRequestDataItemType", + "WorkrecordsListGetResponse", + "WorkrecordsListGetResponseDataItem", + "WorkrecordsListGetResponseDataItemAttributes", + "WorkrecordsListGetResponseDataItemLinks", + "WorkrecordsListGetResponseDataItemMeta", + "WorkrecordsListGetResponseDataItemMetaErrorsItem", + "WorkrecordsListGetResponseDataItemMetaErrorsItemSource", + "WorkrecordsListGetResponseDataItemMetaErrorsItemSourceResource", + "WorkrecordsListGetResponseDataItemRelationships", + "WorkrecordsListGetResponseDataItemRelationshipsProject", + "WorkrecordsListGetResponseDataItemRelationshipsProjectData", + "WorkrecordsListGetResponseDataItemRelationshipsProjectDataType", + "WorkrecordsListGetResponseDataItemRelationshipsUser", + "WorkrecordsListGetResponseDataItemRelationshipsUserData", + "WorkrecordsListGetResponseDataItemRelationshipsUserDataType", + "WorkrecordsListGetResponseDataItemType", + "WorkrecordsListGetResponseIncludedItem", + "WorkrecordsListGetResponseLinks", + "WorkrecordsListGetResponseMeta", + "WorkrecordsListPostRequest", + "WorkrecordsListPostRequestDataItem", + "WorkrecordsListPostRequestDataItemAttributes", + "WorkrecordsListPostRequestDataItemRelationships", + "WorkrecordsListPostRequestDataItemRelationshipsUser", + "WorkrecordsListPostRequestDataItemRelationshipsUserData", + "WorkrecordsListPostRequestDataItemRelationshipsUserDataType", + "WorkrecordsListPostRequestDataItemType", + "WorkrecordsListPostResponse", + "WorkrecordsListPostResponseDataItem", + "WorkrecordsListPostResponseDataItemLinks", + "WorkrecordsListPostResponseDataItemType", + "WorkrecordsSingleGetResponse", + "WorkrecordsSingleGetResponseData", + "WorkrecordsSingleGetResponseDataAttributes", + "WorkrecordsSingleGetResponseDataLinks", + "WorkrecordsSingleGetResponseDataMeta", + "WorkrecordsSingleGetResponseDataMetaErrorsItem", + "WorkrecordsSingleGetResponseDataMetaErrorsItemSource", + "WorkrecordsSingleGetResponseDataMetaErrorsItemSourceResource", + "WorkrecordsSingleGetResponseDataRelationships", + "WorkrecordsSingleGetResponseDataRelationshipsProject", + "WorkrecordsSingleGetResponseDataRelationshipsProjectData", + "WorkrecordsSingleGetResponseDataRelationshipsProjectDataType", + "WorkrecordsSingleGetResponseDataRelationshipsUser", + "WorkrecordsSingleGetResponseDataRelationshipsUserData", + "WorkrecordsSingleGetResponseDataRelationshipsUserDataType", + "WorkrecordsSingleGetResponseDataType", + "WorkrecordsSingleGetResponseIncludedItem", + "WorkrecordsSingleGetResponseLinks", ) diff --git a/polarion_rest_api_client/open_api_client/models/branch_document_request_body.py b/polarion_rest_api_client/open_api_client/models/branch_document_request_body.py index ceb3d111..7c7d6c00 100644 --- a/polarion_rest_api_client/open_api_client/models/branch_document_request_body.py +++ b/polarion_rest_api_client/open_api_client/models/branch_document_request_body.py @@ -14,18 +14,13 @@ @_attrs_define class BranchDocumentRequestBody: """ - Attributes - ---------- - target_project_id : Union[Unset, str] - Project where new document will be created. - target_space_id : Union[Unset, str] - Space where new document will be created. - target_document_name : Union[Unset, str] - Name for new document. - copy_workflow_status_and_signatures : Union[Unset, bool] - Specifies that workflow status and signatures should be copied to the branched document. - query : Union[Unset, str] - Specifies optional filtering query. + Attributes: + target_project_id (Union[Unset, str]): Project where new document will be created. Example: MyProjectId. + target_space_id (Union[Unset, str]): Space where new document will be created. Example: MySpaceId. + target_document_name (Union[Unset, str]): Name for new Document. Example: MyDocumentId. + copy_workflow_status_and_signatures (Union[Unset, bool]): Specifies that workflow status and signatures should + be copied to the branched document. + query (Union[Unset, str]): Specifies optional filtering query. Example: status:open. """ target_project_id: Union[Unset, str] = UNSET @@ -39,11 +34,15 @@ class BranchDocumentRequestBody: def to_dict(self) -> Dict[str, Any]: target_project_id = self.target_project_id + target_space_id = self.target_space_id + target_document_name = self.target_document_name + copy_workflow_status_and_signatures = ( self.copy_workflow_status_and_signatures ) + query = self.query field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/branch_documents_request_body.py b/polarion_rest_api_client/open_api_client/models/branch_documents_request_body.py new file mode 100644 index 00000000..bf833fbb --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/branch_documents_request_body.py @@ -0,0 +1,89 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.branch_documents_request_body_document_configurations_item import ( + BranchDocumentsRequestBodyDocumentConfigurationsItem, + ) + + +T = TypeVar("T", bound="BranchDocumentsRequestBody") + + +@_attrs_define +class BranchDocumentsRequestBody: + """ + Attributes: + document_configurations (List['BranchDocumentsRequestBodyDocumentConfigurationsItem']): + """ + + document_configurations: List[ + "BranchDocumentsRequestBodyDocumentConfigurationsItem" + ] + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + document_configurations = [] + for document_configurations_item_data in self.document_configurations: + document_configurations_item = ( + document_configurations_item_data.to_dict() + ) + document_configurations.append(document_configurations_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "documentConfigurations": document_configurations, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.branch_documents_request_body_document_configurations_item import ( + BranchDocumentsRequestBodyDocumentConfigurationsItem, + ) + + d = src_dict.copy() + document_configurations = [] + _document_configurations = d.pop("documentConfigurations") + for document_configurations_item_data in _document_configurations: + document_configurations_item = ( + BranchDocumentsRequestBodyDocumentConfigurationsItem.from_dict( + document_configurations_item_data + ) + ) + + document_configurations.append(document_configurations_item) + + branch_documents_request_body_obj = cls( + document_configurations=document_configurations, + ) + + branch_documents_request_body_obj.additional_properties = d + return branch_documents_request_body_obj + + @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/polarion_rest_api_client/open_api_client/models/branch_documents_request_body_document_configurations_item.py b/polarion_rest_api_client/open_api_client/models/branch_documents_request_body_document_configurations_item.py new file mode 100644 index 00000000..393277d9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/branch_documents_request_body_document_configurations_item.py @@ -0,0 +1,169 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="BranchDocumentsRequestBodyDocumentConfigurationsItem") + + +@_attrs_define +class BranchDocumentsRequestBodyDocumentConfigurationsItem: + """ + Attributes: + source_document (str): Reference path of the source Document. Example: MyProjectId/MySpaceId/MyDocumentId. + source_revision (Union[Unset, str]): Revision of the source Document. Example: 1234. + target_project_id (Union[Unset, str]): Project where new document will be created. Example: MyProjectId. + target_space_id (Union[Unset, str]): Space where new document will be created. Example: MySpaceId. + target_document_name (Union[Unset, str]): Name for new Document. Example: MyDocumentId. + copy_workflow_status_and_signatures (Union[Unset, bool]): Specifies that workflow status and signatures should + be copied to the branched document. + query (Union[Unset, str]): Specifies optional filtering query. Example: status:open. + target_document_title (Union[Unset, str]): Title for new Document. Example: My Document Title. + update_title_heading (Union[Unset, bool]): Specifies that title heading of the target Document should be set to + the new Document's title. + overwrite_work_items (Union[Unset, bool]): Specifies that Work Items in the branched Document should be + overwritten (instead of being referenced). + initialized_fields (Union[Unset, List[str]]): Specifies fields of overwritten Work Items that should be + initialized (instead of being copied from source Work Items). + """ + + source_document: str + source_revision: Union[Unset, str] = UNSET + target_project_id: Union[Unset, str] = UNSET + target_space_id: Union[Unset, str] = UNSET + target_document_name: Union[Unset, str] = UNSET + copy_workflow_status_and_signatures: Union[Unset, bool] = UNSET + query: Union[Unset, str] = UNSET + target_document_title: Union[Unset, str] = UNSET + update_title_heading: Union[Unset, bool] = UNSET + overwrite_work_items: Union[Unset, bool] = UNSET + initialized_fields: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + source_document = self.source_document + + source_revision = self.source_revision + + target_project_id = self.target_project_id + + target_space_id = self.target_space_id + + target_document_name = self.target_document_name + + copy_workflow_status_and_signatures = ( + self.copy_workflow_status_and_signatures + ) + + query = self.query + + target_document_title = self.target_document_title + + update_title_heading = self.update_title_heading + + overwrite_work_items = self.overwrite_work_items + + initialized_fields: Union[Unset, List[str]] = UNSET + if not isinstance(self.initialized_fields, Unset): + initialized_fields = self.initialized_fields + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "sourceDocument": source_document, + } + ) + if source_revision is not UNSET: + field_dict["sourceRevision"] = source_revision + if target_project_id is not UNSET: + field_dict["targetProjectId"] = target_project_id + if target_space_id is not UNSET: + field_dict["targetSpaceId"] = target_space_id + if target_document_name is not UNSET: + field_dict["targetDocumentName"] = target_document_name + if copy_workflow_status_and_signatures is not UNSET: + field_dict[ + "copyWorkflowStatusAndSignatures" + ] = copy_workflow_status_and_signatures + if query is not UNSET: + field_dict["query"] = query + if target_document_title is not UNSET: + field_dict["targetDocumentTitle"] = target_document_title + if update_title_heading is not UNSET: + field_dict["updateTitleHeading"] = update_title_heading + if overwrite_work_items is not UNSET: + field_dict["overwriteWorkItems"] = overwrite_work_items + if initialized_fields is not UNSET: + field_dict["initializedFields"] = initialized_fields + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + source_document = d.pop("sourceDocument") + + source_revision = d.pop("sourceRevision", UNSET) + + target_project_id = d.pop("targetProjectId", UNSET) + + target_space_id = d.pop("targetSpaceId", UNSET) + + target_document_name = d.pop("targetDocumentName", UNSET) + + copy_workflow_status_and_signatures = d.pop( + "copyWorkflowStatusAndSignatures", UNSET + ) + + query = d.pop("query", UNSET) + + target_document_title = d.pop("targetDocumentTitle", UNSET) + + update_title_heading = d.pop("updateTitleHeading", UNSET) + + overwrite_work_items = d.pop("overwriteWorkItems", UNSET) + + initialized_fields = cast(List[str], d.pop("initializedFields", UNSET)) + + branch_documents_request_body_document_configurations_item_obj = cls( + source_document=source_document, + source_revision=source_revision, + target_project_id=target_project_id, + target_space_id=target_space_id, + target_document_name=target_document_name, + copy_workflow_status_and_signatures=copy_workflow_status_and_signatures, + query=query, + target_document_title=target_document_title, + update_title_heading=update_title_heading, + overwrite_work_items=overwrite_work_items, + initialized_fields=initialized_fields, + ) + + branch_documents_request_body_document_configurations_item_obj.additional_properties = ( + d + ) + return branch_documents_request_body_document_configurations_item_obj + + @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/polarion_rest_api_client/open_api_client/models/copy_document_request_body.py b/polarion_rest_api_client/open_api_client/models/copy_document_request_body.py index 87a9a012..f2c34d92 100644 --- a/polarion_rest_api_client/open_api_client/models/copy_document_request_body.py +++ b/polarion_rest_api_client/open_api_client/models/copy_document_request_body.py @@ -14,18 +14,13 @@ @_attrs_define class CopyDocumentRequestBody: """ - Attributes - ---------- - target_project_id : Union[Unset, str] - Project where new document will be created. - target_space_id : Union[Unset, str] - Space where new document will be created. - target_document_name : Union[Unset, str] - Name for new document. - remove_outgoing_links : Union[Unset, bool] - Should outgoing links be removed? - link_original_items_with_role : Union[Unset, str] - Link a copy of the document to the original. + Attributes: + target_project_id (Union[Unset, str]): Project where new document will be created. Example: MyProjectId. + target_space_id (Union[Unset, str]): Space where new document will be created. Example: MySpaceId. + target_document_name (Union[Unset, str]): Name for new Document. Example: MyDocumentId. + remove_outgoing_links (Union[Unset, bool]): Should outgoing links be removed? Example: True. + link_original_items_with_role (Union[Unset, str]): Link a copy of the document to the original. Example: + duplicates. """ target_project_id: Union[Unset, str] = UNSET @@ -39,9 +34,13 @@ class CopyDocumentRequestBody: def to_dict(self) -> Dict[str, Any]: target_project_id = self.target_project_id + target_space_id = self.target_space_id + target_document_name = self.target_document_name + remove_outgoing_links = self.remove_outgoing_links + link_original_items_with_role = self.link_original_items_with_role field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/create_project_request_body.py b/polarion_rest_api_client/open_api_client/models/create_project_request_body.py new file mode 100644 index 00000000..2dfc1f5f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/create_project_request_body.py @@ -0,0 +1,152 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, 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.create_project_request_body_params_type_0 import ( + CreateProjectRequestBodyParamsType0, + ) + + +T = TypeVar("T", bound="CreateProjectRequestBody") + + +@_attrs_define +class CreateProjectRequestBody: + """ + Attributes: + project_id (Union[Unset, str]): Id of the new Project to be created. Example: MyProjectId. + tracker_prefix (Union[Unset, str]): Tracker prefix of the new Project to be created. Example: MyTrackerPrefix. + location (Union[Unset, str]): Location of the new Project to be created. Example: MyLocation. + template_id (Union[None, Unset, str]): Id of the template to create the new Project from. Example: + MyProjectTemplateId. + params (Union['CreateProjectRequestBodyParamsType0', None, Unset]): params of new Project to be created. + """ + + project_id: Union[Unset, str] = UNSET + tracker_prefix: Union[Unset, str] = UNSET + location: Union[Unset, str] = UNSET + template_id: Union[None, Unset, str] = UNSET + params: Union["CreateProjectRequestBodyParamsType0", None, Unset] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + from ..models.create_project_request_body_params_type_0 import ( + CreateProjectRequestBodyParamsType0, + ) + + project_id = self.project_id + + tracker_prefix = self.tracker_prefix + + location = self.location + + template_id: Union[None, Unset, str] + if isinstance(self.template_id, Unset): + template_id = UNSET + else: + template_id = self.template_id + + params: Union[Dict[str, Any], None, Unset] + if isinstance(self.params, Unset): + params = UNSET + elif isinstance(self.params, CreateProjectRequestBodyParamsType0): + params = self.params.to_dict() + else: + params = self.params + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if project_id is not UNSET: + field_dict["projectId"] = project_id + if tracker_prefix is not UNSET: + field_dict["trackerPrefix"] = tracker_prefix + if location is not UNSET: + field_dict["location"] = location + if template_id is not UNSET: + field_dict["templateId"] = template_id + if params is not UNSET: + field_dict["params"] = params + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.create_project_request_body_params_type_0 import ( + CreateProjectRequestBodyParamsType0, + ) + + d = src_dict.copy() + project_id = d.pop("projectId", UNSET) + + tracker_prefix = d.pop("trackerPrefix", UNSET) + + location = d.pop("location", UNSET) + + def _parse_template_id(data: object) -> Union[None, Unset, str]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, str], data) + + template_id = _parse_template_id(d.pop("templateId", UNSET)) + + def _parse_params( + data: object, + ) -> Union["CreateProjectRequestBodyParamsType0", None, Unset]: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + params_type_0 = CreateProjectRequestBodyParamsType0.from_dict( + data + ) + + return params_type_0 + except: # noqa: E722 + pass + return cast( + Union["CreateProjectRequestBodyParamsType0", None, Unset], data + ) + + params = _parse_params(d.pop("params", UNSET)) + + create_project_request_body_obj = cls( + project_id=project_id, + tracker_prefix=tracker_prefix, + location=location, + template_id=template_id, + params=params, + ) + + create_project_request_body_obj.additional_properties = d + return create_project_request_body_obj + + @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/polarion_rest_api_client/open_api_client/models/create_project_request_body_params_type_0.py b/polarion_rest_api_client/open_api_client/models/create_project_request_body_params_type_0.py new file mode 100644 index 00000000..b7c776bc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/create_project_request_body_params_type_0.py @@ -0,0 +1,49 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CreateProjectRequestBodyParamsType0") + + +@_attrs_define +class CreateProjectRequestBodyParamsType0: + """Params of new Project to be created.""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + create_project_request_body_params_type_0_obj = cls() + + create_project_request_body_params_type_0_obj.additional_properties = d + return create_project_request_body_params_type_0_obj + + @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/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response.py index cc45d6d9..4dfb85cc 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response.py @@ -29,14 +29,13 @@ @_attrs_define class DocumentAttachmentsListGetResponse: """ - Attributes - ---------- - meta : Union[Unset, DocumentAttachmentsListGetResponseMeta] - data : Union[Unset, List['DocumentAttachmentsListGetResponseDataItem']] - included : Union[Unset, List['DocumentAttachmentsListGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, DocumentAttachmentsListGetResponseLinks] + Attributes: + meta (Union[Unset, DocumentAttachmentsListGetResponseMeta]): + data (Union[Unset, List['DocumentAttachmentsListGetResponseDataItem']]): + included (Union[Unset, List['DocumentAttachmentsListGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, DocumentAttachmentsListGetResponseLinks]): """ meta: Union[Unset, "DocumentAttachmentsListGetResponseMeta"] = UNSET @@ -61,7 +60,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) included: Union[Unset, List[Dict[str, Any]]] = UNSET @@ -69,7 +67,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item.py index c534f026..ef3bc1af 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item.py @@ -32,15 +32,14 @@ @_attrs_define class DocumentAttachmentsListGetResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, DocumentAttachmentsListGetResponseDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, DocumentAttachmentsListGetResponseDataItemAttributes] - relationships : Union[Unset, DocumentAttachmentsListGetResponseDataItemRelationships] - meta : Union[Unset, DocumentAttachmentsListGetResponseDataItemMeta] - links : Union[Unset, DocumentAttachmentsListGetResponseDataItemLinks] + Attributes: + type (Union[Unset, DocumentAttachmentsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/MyAttachmentId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, DocumentAttachmentsListGetResponseDataItemAttributes]): + relationships (Union[Unset, DocumentAttachmentsListGetResponseDataItemRelationships]): + meta (Union[Unset, DocumentAttachmentsListGetResponseDataItemMeta]): + links (Union[Unset, DocumentAttachmentsListGetResponseDataItemLinks]): """ type: Union[Unset, DocumentAttachmentsListGetResponseDataItemType] = UNSET @@ -68,7 +67,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_attributes.py index bfa2e906..6abe93f8 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_attributes.py @@ -16,13 +16,12 @@ @_attrs_define class DocumentAttachmentsListGetResponseDataItemAttributes: """ - Attributes - ---------- - file_name : Union[Unset, str] - id : Union[Unset, str] - length : Union[Unset, int] - title : Union[Unset, str] - updated : Union[Unset, datetime.datetime] + Attributes: + file_name (Union[Unset, str]): Example: File Name. + id (Union[Unset, str]): Example: MyAttachmentId. + length (Union[Unset, int]): + title (Union[Unset, str]): Example: Title. + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. """ file_name: Union[Unset, str] = UNSET @@ -36,9 +35,13 @@ class DocumentAttachmentsListGetResponseDataItemAttributes: def to_dict(self) -> Dict[str, Any]: file_name = self.file_name + id = self.id + length = self.length + title = self.title + updated: Union[Unset, str] = UNSET if not isinstance(self.updated, Unset): updated = self.updated.isoformat() diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_links.py index 1c7ed7bf..253ee19f 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_links.py @@ -14,10 +14,11 @@ @_attrs_define class DocumentAttachmentsListGetResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - content : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/attachments/MyAttachmentId?revision=1234. + content (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/spaces/MySpaceId/d + ocuments/MyDocumentId/attachments/MyAttachmentId/content?revision=1234. """ self_: Union[Unset, str] = UNSET @@ -28,6 +29,7 @@ class DocumentAttachmentsListGetResponseDataItemLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + content = self.content field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_meta.py index 2423dd5f..a966e395 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_meta.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_meta.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentAttachmentsListGetResponseDataItemMeta: """ - Attributes - ---------- - errors : Union[Unset, List['DocumentAttachmentsListGetResponseDataItemMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['DocumentAttachmentsListGetResponseDataItemMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_meta_errors_item.py index e296d90d..8664d30d 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_meta_errors_item.py @@ -22,15 +22,12 @@ @_attrs_define class DocumentAttachmentsListGetResponseDataItemMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, DocumentAttachmentsListGetResponseDataItemMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, DocumentAttachmentsListGetResponseDataItemMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -45,8 +42,11 @@ class DocumentAttachmentsListGetResponseDataItemMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_meta_errors_item_source.py index 65a81205..b9a30591 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_meta_errors_item_source.py @@ -1,13 +1,19 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.document_attachments_list_get_response_data_item_meta_errors_item_source_resource import ( + DocumentAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + T = TypeVar( "T", bound="DocumentAttachmentsListGetResponseDataItemMetaErrorsItemSource" ) @@ -16,24 +22,32 @@ @_attrs_define class DocumentAttachmentsListGetResponseDataItemMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, DocumentAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource + causing the error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "DocumentAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource", + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -41,19 +55,38 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.document_attachments_list_get_response_data_item_meta_errors_item_source_resource import ( + DocumentAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + DocumentAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = DocumentAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + document_attachments_list_get_response_data_item_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) document_attachments_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..96a3c5a3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="DocumentAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource", +) + + +@_attrs_define +class DocumentAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + document_attachments_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + document_attachments_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return document_attachments_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships.py index 247b5857..9269a318 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships.py @@ -25,10 +25,9 @@ @_attrs_define class DocumentAttachmentsListGetResponseDataItemRelationships: """ - Attributes - ---------- - author : Union[Unset, DocumentAttachmentsListGetResponseDataItemRelationshipsAuthor] - project : Union[Unset, DocumentAttachmentsListGetResponseDataItemRelationshipsProject] + Attributes: + author (Union[Unset, DocumentAttachmentsListGetResponseDataItemRelationshipsAuthor]): + project (Union[Unset, DocumentAttachmentsListGetResponseDataItemRelationshipsProject]): """ author: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships_author.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships_author.py index ee7af489..735bf521 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships_author.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships_author.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentAttachmentsListGetResponseDataItemRelationshipsAuthor: """ - Attributes - ---------- - data : Union[Unset, DocumentAttachmentsListGetResponseDataItemRelationshipsAuthorData] + Attributes: + data (Union[Unset, DocumentAttachmentsListGetResponseDataItemRelationshipsAuthorData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships_author_data.py index 58d8b854..948f810a 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships_author_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships_author_data.py @@ -20,11 +20,10 @@ @_attrs_define class DocumentAttachmentsListGetResponseDataItemRelationshipsAuthorData: """ - Attributes - ---------- - type : Union[Unset, DocumentAttachmentsListGetResponseDataItemRelationshipsAuthorDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentAttachmentsListGetResponseDataItemRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships_project.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships_project.py index e1f71f6e..121ab75b 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships_project.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships_project.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentAttachmentsListGetResponseDataItemRelationshipsProject: """ - Attributes - ---------- - data : Union[Unset, DocumentAttachmentsListGetResponseDataItemRelationshipsProjectData] + Attributes: + data (Union[Unset, DocumentAttachmentsListGetResponseDataItemRelationshipsProjectData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships_project_data.py index e67ba308..9fc28e9f 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships_project_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_data_item_relationships_project_data.py @@ -20,11 +20,10 @@ @_attrs_define class DocumentAttachmentsListGetResponseDataItemRelationshipsProjectData: """ - Attributes - ---------- - type : Union[Unset, DocumentAttachmentsListGetResponseDataItemRelationshipsProjectDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentAttachmentsListGetResponseDataItemRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_links.py index 4dc46991..40164161 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_links.py @@ -14,13 +14,17 @@ @_attrs_define class DocumentAttachmentsListGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - first : Union[Unset, str] - prev : Union[Unset, str] - next_ : Union[Unset, str] - last : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/spaces/MySpaceId/doc + uments/MyDocumentId/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/spaces/MySpaceId/doc + uments/MyDocumentId/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/spaces/MySpaceId/docu + ments/MyDocumentId/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/spaces/MySpaceId/doc + uments/MyDocumentId/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/spaces/MySpaceId/docu + ments/MyDocumentId/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=9. """ self_: Union[Unset, str] = UNSET @@ -34,9 +38,13 @@ class DocumentAttachmentsListGetResponseLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + first = self.first + prev = self.prev + next_ = self.next_ + last = self.last field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_meta.py index 33ec0ee0..f79e85f8 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_meta.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_get_response_meta.py @@ -14,9 +14,8 @@ @_attrs_define class DocumentAttachmentsListGetResponseMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_request.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_request.py index 97c34b85..85fd4723 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_request.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_request.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentAttachmentsListPostRequest: """ - Attributes - ---------- - data : Union[Unset, List['DocumentAttachmentsListPostRequestDataItem']] + Attributes: + data (Union[Unset, List['DocumentAttachmentsListPostRequestDataItem']]): """ data: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_request_data_item.py index 112a84da..41d75e35 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_request_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_request_data_item.py @@ -23,11 +23,10 @@ @_attrs_define class DocumentAttachmentsListPostRequestDataItem: """ - Attributes - ---------- - type : Union[Unset, DocumentAttachmentsListPostRequestDataItemType] - lid : Union[Unset, str] - attributes : Union[Unset, DocumentAttachmentsListPostRequestDataItemAttributes] + Attributes: + type (Union[Unset, DocumentAttachmentsListPostRequestDataItemType]): + lid (Union[Unset, str]): + attributes (Union[Unset, DocumentAttachmentsListPostRequestDataItemAttributes]): """ type: Union[Unset, DocumentAttachmentsListPostRequestDataItemType] = UNSET @@ -45,6 +44,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value lid = self.lid + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_request_data_item_attributes.py index afc8d2e7..77cf7829 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_request_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_request_data_item_attributes.py @@ -14,10 +14,9 @@ @_attrs_define class DocumentAttachmentsListPostRequestDataItemAttributes: """ - Attributes - ---------- - file_name : Union[Unset, str] - title : Union[Unset, str] + Attributes: + file_name (Union[Unset, str]): Example: File Name. + title (Union[Unset, str]): Example: Title. """ file_name: Union[Unset, str] = UNSET @@ -28,6 +27,7 @@ class DocumentAttachmentsListPostRequestDataItemAttributes: def to_dict(self) -> Dict[str, Any]: file_name = self.file_name + title = self.title field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_response.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_response.py index c643ea75..96114c9d 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_response.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_response.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentAttachmentsListPostResponse: """ - Attributes - ---------- - data : Union[Unset, List['DocumentAttachmentsListPostResponseDataItem']] + Attributes: + data (Union[Unset, List['DocumentAttachmentsListPostResponseDataItem']]): """ data: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_response_data_item.py index 57f64bfa..799bc6dd 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_response_data_item.py @@ -23,11 +23,10 @@ @_attrs_define class DocumentAttachmentsListPostResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, DocumentAttachmentsListPostResponseDataItemType] - id : Union[Unset, str] - links : Union[Unset, DocumentAttachmentsListPostResponseDataItemLinks] + Attributes: + type (Union[Unset, DocumentAttachmentsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/MyAttachmentId. + links (Union[Unset, DocumentAttachmentsListPostResponseDataItemLinks]): """ type: Union[Unset, DocumentAttachmentsListPostResponseDataItemType] = UNSET @@ -45,6 +44,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + links: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_response_data_item_links.py index 28fc7a59..3c2d35ec 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_list_post_response_data_item_links.py @@ -14,10 +14,11 @@ @_attrs_define class DocumentAttachmentsListPostResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - content : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/attachments/MyAttachmentId?revision=1234. + content (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/spaces/MySpaceId/d + ocuments/MyDocumentId/attachments/MyAttachmentId/content?revision=1234. """ self_: Union[Unset, str] = UNSET @@ -28,6 +29,7 @@ class DocumentAttachmentsListPostResponseDataItemLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + content = self.content field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response.py b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response.py index 9994e520..dc63ba69 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response.py @@ -26,13 +26,12 @@ @_attrs_define class DocumentAttachmentsSingleGetResponse: """ - Attributes - ---------- - data : Union[Unset, DocumentAttachmentsSingleGetResponseData] - included : Union[Unset, List['DocumentAttachmentsSingleGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, DocumentAttachmentsSingleGetResponseLinks] + Attributes: + data (Union[Unset, DocumentAttachmentsSingleGetResponseData]): + included (Union[Unset, List['DocumentAttachmentsSingleGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, DocumentAttachmentsSingleGetResponseLinks]): """ data: Union[Unset, "DocumentAttachmentsSingleGetResponseData"] = UNSET @@ -54,7 +53,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data.py index a96fc639..b7b404f5 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data.py @@ -32,15 +32,14 @@ @_attrs_define class DocumentAttachmentsSingleGetResponseData: """ - Attributes - ---------- - type : Union[Unset, DocumentAttachmentsSingleGetResponseDataType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, DocumentAttachmentsSingleGetResponseDataAttributes] - relationships : Union[Unset, DocumentAttachmentsSingleGetResponseDataRelationships] - meta : Union[Unset, DocumentAttachmentsSingleGetResponseDataMeta] - links : Union[Unset, DocumentAttachmentsSingleGetResponseDataLinks] + Attributes: + type (Union[Unset, DocumentAttachmentsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/MyAttachmentId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, DocumentAttachmentsSingleGetResponseDataAttributes]): + relationships (Union[Unset, DocumentAttachmentsSingleGetResponseDataRelationships]): + meta (Union[Unset, DocumentAttachmentsSingleGetResponseDataMeta]): + links (Union[Unset, DocumentAttachmentsSingleGetResponseDataLinks]): """ type: Union[Unset, DocumentAttachmentsSingleGetResponseDataType] = UNSET @@ -66,7 +65,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_attributes.py index 87cb230b..6fac8ca5 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_attributes.py @@ -16,13 +16,12 @@ @_attrs_define class DocumentAttachmentsSingleGetResponseDataAttributes: """ - Attributes - ---------- - file_name : Union[Unset, str] - id : Union[Unset, str] - length : Union[Unset, int] - title : Union[Unset, str] - updated : Union[Unset, datetime.datetime] + Attributes: + file_name (Union[Unset, str]): Example: File Name. + id (Union[Unset, str]): Example: MyAttachmentId. + length (Union[Unset, int]): + title (Union[Unset, str]): Example: Title. + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. """ file_name: Union[Unset, str] = UNSET @@ -36,9 +35,13 @@ class DocumentAttachmentsSingleGetResponseDataAttributes: def to_dict(self) -> Dict[str, Any]: file_name = self.file_name + id = self.id + length = self.length + title = self.title + updated: Union[Unset, str] = UNSET if not isinstance(self.updated, Unset): updated = self.updated.isoformat() diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_links.py index ccfcede5..9e9a1f4c 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_links.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_links.py @@ -14,10 +14,11 @@ @_attrs_define class DocumentAttachmentsSingleGetResponseDataLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - content : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/attachments/MyAttachmentId?revision=1234. + content (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/spaces/MySpaceId/d + ocuments/MyDocumentId/attachments/MyAttachmentId/content?revision=1234. """ self_: Union[Unset, str] = UNSET @@ -28,6 +29,7 @@ class DocumentAttachmentsSingleGetResponseDataLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + content = self.content field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_meta.py index 4bc5e9c3..cb7b25e0 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_meta.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_meta.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentAttachmentsSingleGetResponseDataMeta: """ - Attributes - ---------- - errors : Union[Unset, List['DocumentAttachmentsSingleGetResponseDataMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['DocumentAttachmentsSingleGetResponseDataMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_meta_errors_item.py index eae7f579..40a64ff3 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_meta_errors_item.py @@ -22,15 +22,12 @@ @_attrs_define class DocumentAttachmentsSingleGetResponseDataMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, DocumentAttachmentsSingleGetResponseDataMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, DocumentAttachmentsSingleGetResponseDataMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -45,8 +42,11 @@ class DocumentAttachmentsSingleGetResponseDataMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_meta_errors_item_source.py index 5511e23d..efce7cdd 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_meta_errors_item_source.py @@ -1,13 +1,19 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.document_attachments_single_get_response_data_meta_errors_item_source_resource import ( + DocumentAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + T = TypeVar( "T", bound="DocumentAttachmentsSingleGetResponseDataMetaErrorsItemSource" ) @@ -16,24 +22,32 @@ @_attrs_define class DocumentAttachmentsSingleGetResponseDataMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, DocumentAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing + the error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "DocumentAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource", + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -41,19 +55,38 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.document_attachments_single_get_response_data_meta_errors_item_source_resource import ( + DocumentAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + DocumentAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = DocumentAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + document_attachments_single_get_response_data_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) document_attachments_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..09d3023a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="DocumentAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource", +) + + +@_attrs_define +class DocumentAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + document_attachments_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + document_attachments_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return document_attachments_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships.py index 333daab6..bae93207 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships.py @@ -23,10 +23,9 @@ @_attrs_define class DocumentAttachmentsSingleGetResponseDataRelationships: """ - Attributes - ---------- - author : Union[Unset, DocumentAttachmentsSingleGetResponseDataRelationshipsAuthor] - project : Union[Unset, DocumentAttachmentsSingleGetResponseDataRelationshipsProject] + Attributes: + author (Union[Unset, DocumentAttachmentsSingleGetResponseDataRelationshipsAuthor]): + project (Union[Unset, DocumentAttachmentsSingleGetResponseDataRelationshipsProject]): """ author: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships_author.py b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships_author.py index bd975234..7349058a 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships_author.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships_author.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentAttachmentsSingleGetResponseDataRelationshipsAuthor: """ - Attributes - ---------- - data : Union[Unset, DocumentAttachmentsSingleGetResponseDataRelationshipsAuthorData] + Attributes: + data (Union[Unset, DocumentAttachmentsSingleGetResponseDataRelationshipsAuthorData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships_author_data.py index 26795499..e6e83a54 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships_author_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships_author_data.py @@ -20,11 +20,10 @@ @_attrs_define class DocumentAttachmentsSingleGetResponseDataRelationshipsAuthorData: """ - Attributes - ---------- - type : Union[Unset, DocumentAttachmentsSingleGetResponseDataRelationshipsAuthorDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentAttachmentsSingleGetResponseDataRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships_project.py b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships_project.py index c0e0acce..531b5fe9 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships_project.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships_project.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentAttachmentsSingleGetResponseDataRelationshipsProject: """ - Attributes - ---------- - data : Union[Unset, DocumentAttachmentsSingleGetResponseDataRelationshipsProjectData] + Attributes: + data (Union[Unset, DocumentAttachmentsSingleGetResponseDataRelationshipsProjectData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships_project_data.py index 29dff170..bbfc5d46 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships_project_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_data_relationships_project_data.py @@ -20,11 +20,10 @@ @_attrs_define class DocumentAttachmentsSingleGetResponseDataRelationshipsProjectData: """ - Attributes - ---------- - type : Union[Unset, DocumentAttachmentsSingleGetResponseDataRelationshipsProjectDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentAttachmentsSingleGetResponseDataRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_links.py index 575db18b..1f1029a7 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_single_get_response_links.py @@ -14,9 +14,9 @@ @_attrs_define class DocumentAttachmentsSingleGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/attachments/MyAttachmentId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_single_patch_request.py b/polarion_rest_api_client/open_api_client/models/document_attachments_single_patch_request.py index 7a19fbcc..bb8f9de0 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_single_patch_request.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_single_patch_request.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentAttachmentsSinglePatchRequest: """ - Attributes - ---------- - data : Union[Unset, DocumentAttachmentsSinglePatchRequestData] + Attributes: + data (Union[Unset, DocumentAttachmentsSinglePatchRequestData]): """ data: Union[Unset, "DocumentAttachmentsSinglePatchRequestData"] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_single_patch_request_data.py b/polarion_rest_api_client/open_api_client/models/document_attachments_single_patch_request_data.py index 67929054..660cf612 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_single_patch_request_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_single_patch_request_data.py @@ -23,11 +23,10 @@ @_attrs_define class DocumentAttachmentsSinglePatchRequestData: """ - Attributes - ---------- - type : Union[Unset, DocumentAttachmentsSinglePatchRequestDataType] - id : Union[Unset, str] - attributes : Union[Unset, DocumentAttachmentsSinglePatchRequestDataAttributes] + Attributes: + type (Union[Unset, DocumentAttachmentsSinglePatchRequestDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/MyAttachmentId. + attributes (Union[Unset, DocumentAttachmentsSinglePatchRequestDataAttributes]): """ type: Union[Unset, DocumentAttachmentsSinglePatchRequestDataType] = UNSET @@ -45,6 +44,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_attachments_single_patch_request_data_attributes.py b/polarion_rest_api_client/open_api_client/models/document_attachments_single_patch_request_data_attributes.py index 5ad33d74..0879c563 100644 --- a/polarion_rest_api_client/open_api_client/models/document_attachments_single_patch_request_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/document_attachments_single_patch_request_data_attributes.py @@ -14,9 +14,8 @@ @_attrs_define class DocumentAttachmentsSinglePatchRequestDataAttributes: """ - Attributes - ---------- - title : Union[Unset, str] + Attributes: + title (Union[Unset, str]): Example: Title. """ title: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response.py index 51d58051..87e2102d 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response.py @@ -29,14 +29,13 @@ @_attrs_define class DocumentCommentsListGetResponse: """ - Attributes - ---------- - meta : Union[Unset, DocumentCommentsListGetResponseMeta] - data : Union[Unset, List['DocumentCommentsListGetResponseDataItem']] - included : Union[Unset, List['DocumentCommentsListGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, DocumentCommentsListGetResponseLinks] + Attributes: + meta (Union[Unset, DocumentCommentsListGetResponseMeta]): + data (Union[Unset, List['DocumentCommentsListGetResponseDataItem']]): + included (Union[Unset, List['DocumentCommentsListGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, DocumentCommentsListGetResponseLinks]): """ meta: Union[Unset, "DocumentCommentsListGetResponseMeta"] = UNSET @@ -59,7 +58,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) included: Union[Unset, List[Dict[str, Any]]] = UNSET @@ -67,7 +65,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item.py index cbdd6f4d..e8730e65 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item.py @@ -32,15 +32,14 @@ @_attrs_define class DocumentCommentsListGetResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, DocumentCommentsListGetResponseDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, DocumentCommentsListGetResponseDataItemAttributes] - relationships : Union[Unset, DocumentCommentsListGetResponseDataItemRelationships] - meta : Union[Unset, DocumentCommentsListGetResponseDataItemMeta] - links : Union[Unset, DocumentCommentsListGetResponseDataItemLinks] + Attributes: + type (Union[Unset, DocumentCommentsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, DocumentCommentsListGetResponseDataItemAttributes]): + relationships (Union[Unset, DocumentCommentsListGetResponseDataItemRelationships]): + meta (Union[Unset, DocumentCommentsListGetResponseDataItemMeta]): + links (Union[Unset, DocumentCommentsListGetResponseDataItemLinks]): """ type: Union[Unset, DocumentCommentsListGetResponseDataItemType] = UNSET @@ -64,7 +63,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_attributes.py index ace25440..2b951f25 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_attributes.py @@ -22,12 +22,11 @@ @_attrs_define class DocumentCommentsListGetResponseDataItemAttributes: """ - Attributes - ---------- - created : Union[Unset, datetime.datetime] - id : Union[Unset, str] - resolved : Union[Unset, bool] - text : Union[Unset, DocumentCommentsListGetResponseDataItemAttributesText] + Attributes: + created (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + id (Union[Unset, str]): Example: MyCommentId. + resolved (Union[Unset, bool]): + text (Union[Unset, DocumentCommentsListGetResponseDataItemAttributesText]): """ created: Union[Unset, datetime.datetime] = UNSET @@ -46,7 +45,9 @@ def to_dict(self) -> Dict[str, Any]: created = self.created.isoformat() id = self.id + resolved = self.resolved + text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.text, Unset): text = self.text.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_attributes_text.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_attributes_text.py index 0249fcdb..f39f4294 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_attributes_text.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_attributes_text.py @@ -17,10 +17,9 @@ @_attrs_define class DocumentCommentsListGetResponseDataItemAttributesText: """ - Attributes - ---------- - type : Union[Unset, DocumentCommentsListGetResponseDataItemAttributesTextType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentCommentsListGetResponseDataItemAttributesTextType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_links.py index a1033011..66b4ba20 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_links.py @@ -14,9 +14,9 @@ @_attrs_define class DocumentCommentsListGetResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/comments/MyCommentId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_meta.py index d9f1a6de..d7f52b7e 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_meta.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_meta.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentCommentsListGetResponseDataItemMeta: """ - Attributes - ---------- - errors : Union[Unset, List['DocumentCommentsListGetResponseDataItemMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['DocumentCommentsListGetResponseDataItemMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_meta_errors_item.py index e798998f..904d6f3a 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class DocumentCommentsListGetResponseDataItemMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, DocumentCommentsListGetResponseDataItemMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, DocumentCommentsListGetResponseDataItemMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class DocumentCommentsListGetResponseDataItemMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_meta_errors_item_source.py index c8ba5112..4a59eb49 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_meta_errors_item_source.py @@ -1,13 +1,19 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.document_comments_list_get_response_data_item_meta_errors_item_source_resource import ( + DocumentCommentsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + T = TypeVar( "T", bound="DocumentCommentsListGetResponseDataItemMetaErrorsItemSource" ) @@ -16,24 +22,32 @@ @_attrs_define class DocumentCommentsListGetResponseDataItemMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, DocumentCommentsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing + the error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "DocumentCommentsListGetResponseDataItemMetaErrorsItemSourceResource", + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -41,19 +55,38 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.document_comments_list_get_response_data_item_meta_errors_item_source_resource import ( + DocumentCommentsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + DocumentCommentsListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = DocumentCommentsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + document_comments_list_get_response_data_item_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) document_comments_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..ba8981ef --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="DocumentCommentsListGetResponseDataItemMetaErrorsItemSourceResource", +) + + +@_attrs_define +class DocumentCommentsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + document_comments_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + document_comments_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return document_comments_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships.py index a4b867b8..d7d962ab 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships.py @@ -29,12 +29,11 @@ @_attrs_define class DocumentCommentsListGetResponseDataItemRelationships: """ - Attributes - ---------- - author : Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsAuthor] - child_comments : Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsChildComments] - parent_comment : Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsParentComment] - project : Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsProject] + Attributes: + author (Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsAuthor]): + child_comments (Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsChildComments]): + parent_comment (Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsParentComment]): + project (Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsProject]): """ author: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_author.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_author.py index a1da39cc..a9cdd93c 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_author.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_author.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentCommentsListGetResponseDataItemRelationshipsAuthor: """ - Attributes - ---------- - data : Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsAuthorData] + Attributes: + data (Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsAuthorData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_author_data.py index 08259153..f2892c12 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_author_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_author_data.py @@ -19,11 +19,10 @@ @_attrs_define class DocumentCommentsListGetResponseDataItemRelationshipsAuthorData: """ - Attributes - ---------- - type : Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsAuthorDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -42,6 +41,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_child_comments.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_child_comments.py index 104c8f6b..ada5841c 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_child_comments.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_child_comments.py @@ -26,10 +26,9 @@ @_attrs_define class DocumentCommentsListGetResponseDataItemRelationshipsChildComments: """ - Attributes - ---------- - data : Union[Unset, List['DocumentCommentsListGetResponseDataItemRelationshipsChildCommentsDataItem']] - meta : Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsChildCommentsMeta] + Attributes: + data (Union[Unset, List['DocumentCommentsListGetResponseDataItemRelationshipsChildCommentsDataItem']]): + meta (Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsChildCommentsMeta]): """ data: Union[ @@ -52,7 +51,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_child_comments_data_item.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_child_comments_data_item.py index ccf7be68..61a584f3 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_child_comments_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_child_comments_data_item.py @@ -20,11 +20,10 @@ @_attrs_define class DocumentCommentsListGetResponseDataItemRelationshipsChildCommentsDataItem: """ - Attributes - ---------- - type : Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsChildCommentsDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsChildCommentsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_child_comments_meta.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_child_comments_meta.py index aef90566..111a3c43 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_child_comments_meta.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_child_comments_meta.py @@ -17,9 +17,8 @@ @_attrs_define class DocumentCommentsListGetResponseDataItemRelationshipsChildCommentsMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_parent_comment.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_parent_comment.py index a6dc1087..4c044c2d 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_parent_comment.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_parent_comment.py @@ -23,9 +23,8 @@ @_attrs_define class DocumentCommentsListGetResponseDataItemRelationshipsParentComment: """ - Attributes - ---------- - data : Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsParentCommentData] + Attributes: + data (Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsParentCommentData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_parent_comment_data.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_parent_comment_data.py index 571300d5..ceb7071a 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_parent_comment_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_parent_comment_data.py @@ -20,11 +20,10 @@ @_attrs_define class DocumentCommentsListGetResponseDataItemRelationshipsParentCommentData: """ - Attributes - ---------- - type : Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsParentCommentDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsParentCommentDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_project.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_project.py index a67d544e..196b1237 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_project.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_project.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentCommentsListGetResponseDataItemRelationshipsProject: """ - Attributes - ---------- - data : Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsProjectData] + Attributes: + data (Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsProjectData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_project_data.py index 6884630c..3ee2eec5 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_project_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_data_item_relationships_project_data.py @@ -20,11 +20,10 @@ @_attrs_define class DocumentCommentsListGetResponseDataItemRelationshipsProjectData: """ - Attributes - ---------- - type : Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsProjectDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentCommentsListGetResponseDataItemRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_links.py index 6128a53c..aabe8519 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_links.py @@ -14,13 +14,17 @@ @_attrs_define class DocumentCommentsListGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - first : Union[Unset, str] - prev : Union[Unset, str] - next_ : Union[Unset, str] - last : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/comments?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/comments?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/comments?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/comments?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/comments?page%5Bsize%5D=10&page%5Bnumber%5D=9. """ self_: Union[Unset, str] = UNSET @@ -34,9 +38,13 @@ class DocumentCommentsListGetResponseLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + first = self.first + prev = self.prev + next_ = self.next_ + last = self.last field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_meta.py index 69c0cf29..024deb28 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_meta.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_get_response_meta.py @@ -14,9 +14,8 @@ @_attrs_define class DocumentCommentsListGetResponseMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request.py index 90fe0cb4..a33d6083 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentCommentsListPostRequest: """ - Attributes - ---------- - data : Union[Unset, List['DocumentCommentsListPostRequestDataItem']] + Attributes: + data (Union[Unset, List['DocumentCommentsListPostRequestDataItem']]): """ data: Union[Unset, List["DocumentCommentsListPostRequestDataItem"]] = UNSET @@ -36,7 +35,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item.py index 77890ae7..cf746fb4 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item.py @@ -26,11 +26,10 @@ @_attrs_define class DocumentCommentsListPostRequestDataItem: """ - Attributes - ---------- - type : Union[Unset, DocumentCommentsListPostRequestDataItemType] - attributes : Union[Unset, DocumentCommentsListPostRequestDataItemAttributes] - relationships : Union[Unset, DocumentCommentsListPostRequestDataItemRelationships] + Attributes: + type (Union[Unset, DocumentCommentsListPostRequestDataItemType]): + attributes (Union[Unset, DocumentCommentsListPostRequestDataItemAttributes]): + relationships (Union[Unset, DocumentCommentsListPostRequestDataItemRelationships]): """ type: Union[Unset, DocumentCommentsListPostRequestDataItemType] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_attributes.py index 90458061..bb0f36f2 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_attributes.py @@ -20,10 +20,9 @@ @_attrs_define class DocumentCommentsListPostRequestDataItemAttributes: """ - Attributes - ---------- - resolved : Union[Unset, bool] - text : Union[Unset, DocumentCommentsListPostRequestDataItemAttributesText] + Attributes: + resolved (Union[Unset, bool]): + text (Union[Unset, DocumentCommentsListPostRequestDataItemAttributesText]): """ resolved: Union[Unset, bool] = UNSET @@ -36,6 +35,7 @@ class DocumentCommentsListPostRequestDataItemAttributes: def to_dict(self) -> Dict[str, Any]: resolved = self.resolved + text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.text, Unset): text = self.text.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_attributes_text.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_attributes_text.py index ad4d6e78..67935da5 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_attributes_text.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_attributes_text.py @@ -17,10 +17,9 @@ @_attrs_define class DocumentCommentsListPostRequestDataItemAttributesText: """ - Attributes - ---------- - type : Union[Unset, DocumentCommentsListPostRequestDataItemAttributesTextType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentCommentsListPostRequestDataItemAttributesTextType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships.py index 88f6810a..b2b7de00 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships.py @@ -23,10 +23,9 @@ @_attrs_define class DocumentCommentsListPostRequestDataItemRelationships: """ - Attributes - ---------- - author : Union[Unset, DocumentCommentsListPostRequestDataItemRelationshipsAuthor] - parent_comment : Union[Unset, DocumentCommentsListPostRequestDataItemRelationshipsParentComment] + Attributes: + author (Union[Unset, DocumentCommentsListPostRequestDataItemRelationshipsAuthor]): + parent_comment (Union[Unset, DocumentCommentsListPostRequestDataItemRelationshipsParentComment]): """ author: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships_author.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships_author.py index 411d1fca..655532a1 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships_author.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships_author.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentCommentsListPostRequestDataItemRelationshipsAuthor: """ - Attributes - ---------- - data : Union[Unset, DocumentCommentsListPostRequestDataItemRelationshipsAuthorData] + Attributes: + data (Union[Unset, DocumentCommentsListPostRequestDataItemRelationshipsAuthorData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships_author_data.py index 6002b8c2..c3b5d6dc 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships_author_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships_author_data.py @@ -19,10 +19,9 @@ @_attrs_define class DocumentCommentsListPostRequestDataItemRelationshipsAuthorData: """ - Attributes - ---------- - type : Union[Unset, DocumentCommentsListPostRequestDataItemRelationshipsAuthorDataType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentCommentsListPostRequestDataItemRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships_parent_comment.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships_parent_comment.py index 0996deb5..d9a14d22 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships_parent_comment.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships_parent_comment.py @@ -23,9 +23,8 @@ @_attrs_define class DocumentCommentsListPostRequestDataItemRelationshipsParentComment: """ - Attributes - ---------- - data : Union[Unset, DocumentCommentsListPostRequestDataItemRelationshipsParentCommentData] + Attributes: + data (Union[Unset, DocumentCommentsListPostRequestDataItemRelationshipsParentCommentData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships_parent_comment_data.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships_parent_comment_data.py index 7febf58a..084a3268 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships_parent_comment_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_request_data_item_relationships_parent_comment_data.py @@ -20,10 +20,9 @@ @_attrs_define class DocumentCommentsListPostRequestDataItemRelationshipsParentCommentData: """ - Attributes - ---------- - type : Union[Unset, DocumentCommentsListPostRequestDataItemRelationshipsParentCommentDataType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentCommentsListPostRequestDataItemRelationshipsParentCommentDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/MyCommentId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_response.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_response.py index bd9750eb..9b211857 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_response.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_response.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentCommentsListPostResponse: """ - Attributes - ---------- - data : Union[Unset, List['DocumentCommentsListPostResponseDataItem']] + Attributes: + data (Union[Unset, List['DocumentCommentsListPostResponseDataItem']]): """ data: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_response_data_item.py index 73815368..daa8633d 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_response_data_item.py @@ -23,11 +23,10 @@ @_attrs_define class DocumentCommentsListPostResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, DocumentCommentsListPostResponseDataItemType] - id : Union[Unset, str] - links : Union[Unset, DocumentCommentsListPostResponseDataItemLinks] + Attributes: + type (Union[Unset, DocumentCommentsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/MyCommentId. + links (Union[Unset, DocumentCommentsListPostResponseDataItemLinks]): """ type: Union[Unset, DocumentCommentsListPostResponseDataItemType] = UNSET @@ -45,6 +44,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + links: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_response_data_item_links.py index cc539b9d..97b58a82 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_list_post_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_list_post_response_data_item_links.py @@ -14,9 +14,9 @@ @_attrs_define class DocumentCommentsListPostResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/comments/MyCommentId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response.py index 0a9f5728..10088a79 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response.py @@ -26,13 +26,12 @@ @_attrs_define class DocumentCommentsSingleGetResponse: """ - Attributes - ---------- - data : Union[Unset, DocumentCommentsSingleGetResponseData] - included : Union[Unset, List['DocumentCommentsSingleGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, DocumentCommentsSingleGetResponseLinks] + Attributes: + data (Union[Unset, DocumentCommentsSingleGetResponseData]): + included (Union[Unset, List['DocumentCommentsSingleGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, DocumentCommentsSingleGetResponseLinks]): """ data: Union[Unset, "DocumentCommentsSingleGetResponseData"] = UNSET @@ -54,7 +53,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data.py index 6c35365b..80d48320 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data.py @@ -32,15 +32,14 @@ @_attrs_define class DocumentCommentsSingleGetResponseData: """ - Attributes - ---------- - type : Union[Unset, DocumentCommentsSingleGetResponseDataType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, DocumentCommentsSingleGetResponseDataAttributes] - relationships : Union[Unset, DocumentCommentsSingleGetResponseDataRelationships] - meta : Union[Unset, DocumentCommentsSingleGetResponseDataMeta] - links : Union[Unset, DocumentCommentsSingleGetResponseDataLinks] + Attributes: + type (Union[Unset, DocumentCommentsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, DocumentCommentsSingleGetResponseDataAttributes]): + relationships (Union[Unset, DocumentCommentsSingleGetResponseDataRelationships]): + meta (Union[Unset, DocumentCommentsSingleGetResponseDataMeta]): + links (Union[Unset, DocumentCommentsSingleGetResponseDataLinks]): """ type: Union[Unset, DocumentCommentsSingleGetResponseDataType] = UNSET @@ -64,7 +63,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_attributes.py index 6410f9ad..ace938f8 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_attributes.py @@ -22,12 +22,11 @@ @_attrs_define class DocumentCommentsSingleGetResponseDataAttributes: """ - Attributes - ---------- - created : Union[Unset, datetime.datetime] - id : Union[Unset, str] - resolved : Union[Unset, bool] - text : Union[Unset, DocumentCommentsSingleGetResponseDataAttributesText] + Attributes: + created (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + id (Union[Unset, str]): Example: MyCommentId. + resolved (Union[Unset, bool]): + text (Union[Unset, DocumentCommentsSingleGetResponseDataAttributesText]): """ created: Union[Unset, datetime.datetime] = UNSET @@ -46,7 +45,9 @@ def to_dict(self) -> Dict[str, Any]: created = self.created.isoformat() id = self.id + resolved = self.resolved + text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.text, Unset): text = self.text.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_attributes_text.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_attributes_text.py index 75b82b35..592e2263 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_attributes_text.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_attributes_text.py @@ -17,10 +17,9 @@ @_attrs_define class DocumentCommentsSingleGetResponseDataAttributesText: """ - Attributes - ---------- - type : Union[Unset, DocumentCommentsSingleGetResponseDataAttributesTextType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentCommentsSingleGetResponseDataAttributesTextType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_links.py index 7c7f475c..6e2f9277 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_links.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_links.py @@ -14,9 +14,9 @@ @_attrs_define class DocumentCommentsSingleGetResponseDataLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/comments/MyCommentId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_meta.py index 1fb63606..ae65e543 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_meta.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_meta.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentCommentsSingleGetResponseDataMeta: """ - Attributes - ---------- - errors : Union[Unset, List['DocumentCommentsSingleGetResponseDataMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['DocumentCommentsSingleGetResponseDataMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_meta_errors_item.py index 2fbec702..5d0655b8 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class DocumentCommentsSingleGetResponseDataMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, DocumentCommentsSingleGetResponseDataMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, DocumentCommentsSingleGetResponseDataMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class DocumentCommentsSingleGetResponseDataMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_meta_errors_item_source.py index 0d31a65f..0a65bfa4 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_meta_errors_item_source.py @@ -1,13 +1,19 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.document_comments_single_get_response_data_meta_errors_item_source_resource import ( + DocumentCommentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + T = TypeVar( "T", bound="DocumentCommentsSingleGetResponseDataMetaErrorsItemSource" ) @@ -16,24 +22,32 @@ @_attrs_define class DocumentCommentsSingleGetResponseDataMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, DocumentCommentsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the + error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "DocumentCommentsSingleGetResponseDataMetaErrorsItemSourceResource", + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -41,19 +55,38 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.document_comments_single_get_response_data_meta_errors_item_source_resource import ( + DocumentCommentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + DocumentCommentsSingleGetResponseDataMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = DocumentCommentsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + document_comments_single_get_response_data_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) document_comments_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..a4094280 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="DocumentCommentsSingleGetResponseDataMetaErrorsItemSourceResource", +) + + +@_attrs_define +class DocumentCommentsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + document_comments_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + document_comments_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return document_comments_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships.py index 1a0f1eba..5e0c6450 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships.py @@ -29,12 +29,11 @@ @_attrs_define class DocumentCommentsSingleGetResponseDataRelationships: """ - Attributes - ---------- - author : Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsAuthor] - child_comments : Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsChildComments] - parent_comment : Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsParentComment] - project : Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsProject] + Attributes: + author (Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsAuthor]): + child_comments (Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsChildComments]): + parent_comment (Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsParentComment]): + project (Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsProject]): """ author: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_author.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_author.py index e624b47b..f8be5801 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_author.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_author.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentCommentsSingleGetResponseDataRelationshipsAuthor: """ - Attributes - ---------- - data : Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsAuthorData] + Attributes: + data (Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsAuthorData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_author_data.py index 83c37e52..a776a2cf 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_author_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_author_data.py @@ -19,11 +19,10 @@ @_attrs_define class DocumentCommentsSingleGetResponseDataRelationshipsAuthorData: """ - Attributes - ---------- - type : Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsAuthorDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_child_comments.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_child_comments.py index 4f53d73f..f6b955b3 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_child_comments.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_child_comments.py @@ -26,10 +26,9 @@ @_attrs_define class DocumentCommentsSingleGetResponseDataRelationshipsChildComments: """ - Attributes - ---------- - data : Union[Unset, List['DocumentCommentsSingleGetResponseDataRelationshipsChildCommentsDataItem']] - meta : Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsChildCommentsMeta] + Attributes: + data (Union[Unset, List['DocumentCommentsSingleGetResponseDataRelationshipsChildCommentsDataItem']]): + meta (Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsChildCommentsMeta]): """ data: Union[ @@ -52,7 +51,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_child_comments_data_item.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_child_comments_data_item.py index f9d492fa..516b4457 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_child_comments_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_child_comments_data_item.py @@ -20,11 +20,10 @@ @_attrs_define class DocumentCommentsSingleGetResponseDataRelationshipsChildCommentsDataItem: """ - Attributes - ---------- - type : Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsChildCommentsDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsChildCommentsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_child_comments_meta.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_child_comments_meta.py index 682a478c..4ec0fdc0 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_child_comments_meta.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_child_comments_meta.py @@ -17,9 +17,8 @@ @_attrs_define class DocumentCommentsSingleGetResponseDataRelationshipsChildCommentsMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_parent_comment.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_parent_comment.py index 8b313ea5..7a2a9c58 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_parent_comment.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_parent_comment.py @@ -23,9 +23,8 @@ @_attrs_define class DocumentCommentsSingleGetResponseDataRelationshipsParentComment: """ - Attributes - ---------- - data : Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsParentCommentData] + Attributes: + data (Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsParentCommentData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_parent_comment_data.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_parent_comment_data.py index e8b49653..72e50f40 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_parent_comment_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_parent_comment_data.py @@ -20,11 +20,10 @@ @_attrs_define class DocumentCommentsSingleGetResponseDataRelationshipsParentCommentData: """ - Attributes - ---------- - type : Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsParentCommentDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsParentCommentDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_project.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_project.py index 66de31a2..82d3848f 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_project.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_project.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentCommentsSingleGetResponseDataRelationshipsProject: """ - Attributes - ---------- - data : Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsProjectData] + Attributes: + data (Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsProjectData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_project_data.py index 4f5abe52..21a75d9c 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_project_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_data_relationships_project_data.py @@ -19,11 +19,10 @@ @_attrs_define class DocumentCommentsSingleGetResponseDataRelationshipsProjectData: """ - Attributes - ---------- - type : Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsProjectDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentCommentsSingleGetResponseDataRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -42,6 +41,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_links.py index ecbe2f13..7c343d42 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_get_response_links.py @@ -14,9 +14,9 @@ @_attrs_define class DocumentCommentsSingleGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/comments/MyCommentId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_patch_request.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_patch_request.py index 0d5cd196..07de9f76 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_patch_request.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_patch_request.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentCommentsSinglePatchRequest: """ - Attributes - ---------- - data : Union[Unset, DocumentCommentsSinglePatchRequestData] + Attributes: + data (Union[Unset, DocumentCommentsSinglePatchRequestData]): """ data: Union[Unset, "DocumentCommentsSinglePatchRequestData"] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_patch_request_data.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_patch_request_data.py index 2d5163ae..6fcf9065 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_patch_request_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_patch_request_data.py @@ -23,11 +23,10 @@ @_attrs_define class DocumentCommentsSinglePatchRequestData: """ - Attributes - ---------- - type : Union[Unset, DocumentCommentsSinglePatchRequestDataType] - id : Union[Unset, str] - attributes : Union[Unset, DocumentCommentsSinglePatchRequestDataAttributes] + Attributes: + type (Union[Unset, DocumentCommentsSinglePatchRequestDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/MyCommentId. + attributes (Union[Unset, DocumentCommentsSinglePatchRequestDataAttributes]): """ type: Union[Unset, DocumentCommentsSinglePatchRequestDataType] = UNSET @@ -45,6 +44,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_comments_single_patch_request_data_attributes.py b/polarion_rest_api_client/open_api_client/models/document_comments_single_patch_request_data_attributes.py index 4dfce24b..08410734 100644 --- a/polarion_rest_api_client/open_api_client/models/document_comments_single_patch_request_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/document_comments_single_patch_request_data_attributes.py @@ -14,9 +14,8 @@ @_attrs_define class DocumentCommentsSinglePatchRequestDataAttributes: """ - Attributes - ---------- - resolved : Union[Unset, bool] + Attributes: + resolved (Union[Unset, bool]): """ resolved: Union[Unset, bool] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response.py index 92e5590f..b906d9b4 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response.py @@ -29,14 +29,13 @@ @_attrs_define class DocumentPartsListGetResponse: """ - Attributes - ---------- - meta : Union[Unset, DocumentPartsListGetResponseMeta] - data : Union[Unset, List['DocumentPartsListGetResponseDataItem']] - included : Union[Unset, List['DocumentPartsListGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, DocumentPartsListGetResponseLinks] + Attributes: + meta (Union[Unset, DocumentPartsListGetResponseMeta]): + data (Union[Unset, List['DocumentPartsListGetResponseDataItem']]): + included (Union[Unset, List['DocumentPartsListGetResponseIncludedItem']]): Related entities might be returned, + see Rest API + User Guide. + links (Union[Unset, DocumentPartsListGetResponseLinks]): """ meta: Union[Unset, "DocumentPartsListGetResponseMeta"] = UNSET @@ -59,7 +58,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) included: Union[Unset, List[Dict[str, Any]]] = UNSET @@ -67,7 +65,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item.py index 653dd615..9f2603dd 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item.py @@ -32,15 +32,14 @@ @_attrs_define class DocumentPartsListGetResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, DocumentPartsListGetResponseDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, DocumentPartsListGetResponseDataItemAttributes] - relationships : Union[Unset, DocumentPartsListGetResponseDataItemRelationships] - meta : Union[Unset, DocumentPartsListGetResponseDataItemMeta] - links : Union[Unset, DocumentPartsListGetResponseDataItemLinks] + Attributes: + type (Union[Unset, DocumentPartsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/workitem_MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, DocumentPartsListGetResponseDataItemAttributes]): + relationships (Union[Unset, DocumentPartsListGetResponseDataItemRelationships]): + meta (Union[Unset, DocumentPartsListGetResponseDataItemMeta]): + links (Union[Unset, DocumentPartsListGetResponseDataItemLinks]): """ type: Union[Unset, DocumentPartsListGetResponseDataItemType] = UNSET @@ -64,7 +63,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_attributes.py index 8c474709..6a3303a2 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_attributes.py @@ -14,13 +14,13 @@ @_attrs_define class DocumentPartsListGetResponseDataItemAttributes: """ - Attributes - ---------- - content : Union[Unset, str] - external : Union[Unset, bool] - id : Union[Unset, str] - level : Union[Unset, int] - type : Union[Unset, str] + Attributes: + content (Union[Unset, str]): Example:
. + external (Union[Unset, bool]): + id (Union[Unset, str]): Example: workitem_MyWorkItemId. + level (Union[Unset, int]): + type (Union[Unset, str]): Example: workitem. """ content: Union[Unset, str] = UNSET @@ -34,9 +34,13 @@ class DocumentPartsListGetResponseDataItemAttributes: def to_dict(self) -> Dict[str, Any]: content = self.content + external = self.external + id = self.id + level = self.level + type = self.type field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_links.py index 97075fad..ed391c37 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_links.py @@ -14,9 +14,9 @@ @_attrs_define class DocumentPartsListGetResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/parts/workitem_MyWorkItemId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_meta.py index 71893616..b0d86be8 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_meta.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_meta.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentPartsListGetResponseDataItemMeta: """ - Attributes - ---------- - errors : Union[Unset, List['DocumentPartsListGetResponseDataItemMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['DocumentPartsListGetResponseDataItemMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_meta_errors_item.py index 16fb6f16..0bcf8f04 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class DocumentPartsListGetResponseDataItemMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, DocumentPartsListGetResponseDataItemMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, DocumentPartsListGetResponseDataItemMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class DocumentPartsListGetResponseDataItemMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_meta_errors_item_source.py index bd9e18f5..b965ead2 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_meta_errors_item_source.py @@ -1,13 +1,19 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.document_parts_list_get_response_data_item_meta_errors_item_source_resource import ( + DocumentPartsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + T = TypeVar( "T", bound="DocumentPartsListGetResponseDataItemMetaErrorsItemSource" ) @@ -16,24 +22,32 @@ @_attrs_define class DocumentPartsListGetResponseDataItemMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, DocumentPartsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing the + error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "DocumentPartsListGetResponseDataItemMetaErrorsItemSourceResource", + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -41,19 +55,38 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.document_parts_list_get_response_data_item_meta_errors_item_source_resource import ( + DocumentPartsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + DocumentPartsListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = DocumentPartsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + document_parts_list_get_response_data_item_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) document_parts_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..9399eaa0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="DocumentPartsListGetResponseDataItemMetaErrorsItemSourceResource", +) + + +@_attrs_define +class DocumentPartsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + document_parts_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + document_parts_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return document_parts_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships.py index eb4058ac..c14c803f 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships.py @@ -26,11 +26,10 @@ @_attrs_define class DocumentPartsListGetResponseDataItemRelationships: """ - Attributes - ---------- - next_part : Union[Unset, DocumentPartsListGetResponseDataItemRelationshipsNextPart] - previous_part : Union[Unset, DocumentPartsListGetResponseDataItemRelationshipsPreviousPart] - work_item : Union[Unset, DocumentPartsListGetResponseDataItemRelationshipsWorkItem] + Attributes: + next_part (Union[Unset, DocumentPartsListGetResponseDataItemRelationshipsNextPart]): + previous_part (Union[Unset, DocumentPartsListGetResponseDataItemRelationshipsPreviousPart]): + work_item (Union[Unset, DocumentPartsListGetResponseDataItemRelationshipsWorkItem]): """ next_part: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_next_part.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_next_part.py index 0b9fc06f..6db01930 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_next_part.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_next_part.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentPartsListGetResponseDataItemRelationshipsNextPart: """ - Attributes - ---------- - data : Union[Unset, DocumentPartsListGetResponseDataItemRelationshipsNextPartData] + Attributes: + data (Union[Unset, DocumentPartsListGetResponseDataItemRelationshipsNextPartData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_next_part_data.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_next_part_data.py index 61742af3..67002c9b 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_next_part_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_next_part_data.py @@ -19,11 +19,10 @@ @_attrs_define class DocumentPartsListGetResponseDataItemRelationshipsNextPartData: """ - Attributes - ---------- - type : Union[Unset, DocumentPartsListGetResponseDataItemRelationshipsNextPartDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentPartsListGetResponseDataItemRelationshipsNextPartDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/workitem_MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -42,6 +41,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_previous_part.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_previous_part.py index c24d9ea4..4bada2c0 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_previous_part.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_previous_part.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentPartsListGetResponseDataItemRelationshipsPreviousPart: """ - Attributes - ---------- - data : Union[Unset, DocumentPartsListGetResponseDataItemRelationshipsPreviousPartData] + Attributes: + data (Union[Unset, DocumentPartsListGetResponseDataItemRelationshipsPreviousPartData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_previous_part_data.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_previous_part_data.py index ced0cc41..cd07b70a 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_previous_part_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_previous_part_data.py @@ -20,11 +20,10 @@ @_attrs_define class DocumentPartsListGetResponseDataItemRelationshipsPreviousPartData: """ - Attributes - ---------- - type : Union[Unset, DocumentPartsListGetResponseDataItemRelationshipsPreviousPartDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentPartsListGetResponseDataItemRelationshipsPreviousPartDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/workitem_MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_work_item.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_work_item.py index ce978b28..81293df3 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_work_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_work_item.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentPartsListGetResponseDataItemRelationshipsWorkItem: """ - Attributes - ---------- - data : Union[Unset, DocumentPartsListGetResponseDataItemRelationshipsWorkItemData] + Attributes: + data (Union[Unset, DocumentPartsListGetResponseDataItemRelationshipsWorkItemData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_work_item_data.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_work_item_data.py index 70e4ba7d..fc0274ee 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_work_item_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_data_item_relationships_work_item_data.py @@ -19,11 +19,10 @@ @_attrs_define class DocumentPartsListGetResponseDataItemRelationshipsWorkItemData: """ - Attributes - ---------- - type : Union[Unset, DocumentPartsListGetResponseDataItemRelationshipsWorkItemDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentPartsListGetResponseDataItemRelationshipsWorkItemDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -42,6 +41,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_links.py index 33652d7b..ea337eca 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_links.py @@ -14,13 +14,17 @@ @_attrs_define class DocumentPartsListGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - first : Union[Unset, str] - prev : Union[Unset, str] - next_ : Union[Unset, str] - last : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/parts?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/parts?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/parts?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/parts?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/parts?page%5Bsize%5D=10&page%5Bnumber%5D=9. """ self_: Union[Unset, str] = UNSET @@ -34,9 +38,13 @@ class DocumentPartsListGetResponseLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + first = self.first + prev = self.prev + next_ = self.next_ + last = self.last field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_meta.py index b4cbe011..b1749dd7 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_meta.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_get_response_meta.py @@ -14,9 +14,8 @@ @_attrs_define class DocumentPartsListGetResponseMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request.py index 9c88ad5b..a8b16de5 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentPartsListPostRequest: """ - Attributes - ---------- - data : Union[Unset, List['DocumentPartsListPostRequestDataItem']] + Attributes: + data (Union[Unset, List['DocumentPartsListPostRequestDataItem']]): """ data: Union[Unset, List["DocumentPartsListPostRequestDataItem"]] = UNSET @@ -36,7 +35,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item.py index 8ce8d0cb..7c50fd96 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item.py @@ -26,11 +26,10 @@ @_attrs_define class DocumentPartsListPostRequestDataItem: """ - Attributes - ---------- - type : Union[Unset, DocumentPartsListPostRequestDataItemType] - attributes : Union[Unset, DocumentPartsListPostRequestDataItemAttributes] - relationships : Union[Unset, DocumentPartsListPostRequestDataItemRelationships] + Attributes: + type (Union[Unset, DocumentPartsListPostRequestDataItemType]): + attributes (Union[Unset, DocumentPartsListPostRequestDataItemAttributes]): + relationships (Union[Unset, DocumentPartsListPostRequestDataItemRelationships]): """ type: Union[Unset, DocumentPartsListPostRequestDataItemType] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_attributes.py index 08a51aca..509e9d18 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_attributes.py @@ -14,10 +14,9 @@ @_attrs_define class DocumentPartsListPostRequestDataItemAttributes: """ - Attributes - ---------- - level : Union[Unset, int] - type : Union[Unset, str] + Attributes: + level (Union[Unset, int]): + type (Union[Unset, str]): Example: workitem. """ level: Union[Unset, int] = UNSET @@ -28,6 +27,7 @@ class DocumentPartsListPostRequestDataItemAttributes: def to_dict(self) -> Dict[str, Any]: level = self.level + type = self.type field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships.py index 9d1faca9..b36ea5a0 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships.py @@ -26,11 +26,10 @@ @_attrs_define class DocumentPartsListPostRequestDataItemRelationships: """ - Attributes - ---------- - next_part : Union[Unset, DocumentPartsListPostRequestDataItemRelationshipsNextPart] - previous_part : Union[Unset, DocumentPartsListPostRequestDataItemRelationshipsPreviousPart] - work_item : Union[Unset, DocumentPartsListPostRequestDataItemRelationshipsWorkItem] + Attributes: + next_part (Union[Unset, DocumentPartsListPostRequestDataItemRelationshipsNextPart]): + previous_part (Union[Unset, DocumentPartsListPostRequestDataItemRelationshipsPreviousPart]): + work_item (Union[Unset, DocumentPartsListPostRequestDataItemRelationshipsWorkItem]): """ next_part: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_next_part.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_next_part.py index 099f7237..52d8d87b 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_next_part.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_next_part.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentPartsListPostRequestDataItemRelationshipsNextPart: """ - Attributes - ---------- - data : Union[Unset, DocumentPartsListPostRequestDataItemRelationshipsNextPartData] + Attributes: + data (Union[Unset, DocumentPartsListPostRequestDataItemRelationshipsNextPartData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_next_part_data.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_next_part_data.py index b1dcfe34..0893e1e9 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_next_part_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_next_part_data.py @@ -19,10 +19,9 @@ @_attrs_define class DocumentPartsListPostRequestDataItemRelationshipsNextPartData: """ - Attributes - ---------- - type : Union[Unset, DocumentPartsListPostRequestDataItemRelationshipsNextPartDataType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentPartsListPostRequestDataItemRelationshipsNextPartDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/workitem_MyWorkItemId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_previous_part.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_previous_part.py index fa68d6de..0598d4bf 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_previous_part.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_previous_part.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentPartsListPostRequestDataItemRelationshipsPreviousPart: """ - Attributes - ---------- - data : Union[Unset, DocumentPartsListPostRequestDataItemRelationshipsPreviousPartData] + Attributes: + data (Union[Unset, DocumentPartsListPostRequestDataItemRelationshipsPreviousPartData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_previous_part_data.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_previous_part_data.py index 61043739..b54c5cce 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_previous_part_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_previous_part_data.py @@ -20,10 +20,9 @@ @_attrs_define class DocumentPartsListPostRequestDataItemRelationshipsPreviousPartData: """ - Attributes - ---------- - type : Union[Unset, DocumentPartsListPostRequestDataItemRelationshipsPreviousPartDataType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentPartsListPostRequestDataItemRelationshipsPreviousPartDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/workitem_MyWorkItemId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_work_item.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_work_item.py index f551def0..1c5d4adb 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_work_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_work_item.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentPartsListPostRequestDataItemRelationshipsWorkItem: """ - Attributes - ---------- - data : Union[Unset, DocumentPartsListPostRequestDataItemRelationshipsWorkItemData] + Attributes: + data (Union[Unset, DocumentPartsListPostRequestDataItemRelationshipsWorkItemData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_work_item_data.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_work_item_data.py index 535eb402..36ff7588 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_work_item_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_request_data_item_relationships_work_item_data.py @@ -19,10 +19,9 @@ @_attrs_define class DocumentPartsListPostRequestDataItemRelationshipsWorkItemData: """ - Attributes - ---------- - type : Union[Unset, DocumentPartsListPostRequestDataItemRelationshipsWorkItemDataType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentPartsListPostRequestDataItemRelationshipsWorkItemDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_response.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_response.py index cc2c1f7e..89ea901f 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_response.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_response.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentPartsListPostResponse: """ - Attributes - ---------- - data : Union[Unset, List['DocumentPartsListPostResponseDataItem']] + Attributes: + data (Union[Unset, List['DocumentPartsListPostResponseDataItem']]): """ data: Union[Unset, List["DocumentPartsListPostResponseDataItem"]] = UNSET @@ -36,7 +35,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_response_data_item.py index abda428f..c82c1a80 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_response_data_item.py @@ -23,11 +23,10 @@ @_attrs_define class DocumentPartsListPostResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, DocumentPartsListPostResponseDataItemType] - id : Union[Unset, str] - links : Union[Unset, DocumentPartsListPostResponseDataItemLinks] + Attributes: + type (Union[Unset, DocumentPartsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/workitem_MyWorkItemId. + links (Union[Unset, DocumentPartsListPostResponseDataItemLinks]): """ type: Union[Unset, DocumentPartsListPostResponseDataItemType] = UNSET @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + links: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_response_data_item_links.py index 4fa61839..d2c87984 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_list_post_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_list_post_response_data_item_links.py @@ -14,9 +14,9 @@ @_attrs_define class DocumentPartsListPostResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/parts/workitem_MyWorkItemId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response.py b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response.py index d3a67f9c..296fac6d 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response.py @@ -26,13 +26,12 @@ @_attrs_define class DocumentPartsSingleGetResponse: """ - Attributes - ---------- - data : Union[Unset, DocumentPartsSingleGetResponseData] - included : Union[Unset, List['DocumentPartsSingleGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, DocumentPartsSingleGetResponseLinks] + Attributes: + data (Union[Unset, DocumentPartsSingleGetResponseData]): + included (Union[Unset, List['DocumentPartsSingleGetResponseIncludedItem']]): Related entities might be returned, + see Rest API + User Guide. + links (Union[Unset, DocumentPartsSingleGetResponseLinks]): """ data: Union[Unset, "DocumentPartsSingleGetResponseData"] = UNSET @@ -54,7 +53,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data.py index 92236657..3f13b709 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data.py @@ -32,15 +32,14 @@ @_attrs_define class DocumentPartsSingleGetResponseData: """ - Attributes - ---------- - type : Union[Unset, DocumentPartsSingleGetResponseDataType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, DocumentPartsSingleGetResponseDataAttributes] - relationships : Union[Unset, DocumentPartsSingleGetResponseDataRelationships] - meta : Union[Unset, DocumentPartsSingleGetResponseDataMeta] - links : Union[Unset, DocumentPartsSingleGetResponseDataLinks] + Attributes: + type (Union[Unset, DocumentPartsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/workitem_MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, DocumentPartsSingleGetResponseDataAttributes]): + relationships (Union[Unset, DocumentPartsSingleGetResponseDataRelationships]): + meta (Union[Unset, DocumentPartsSingleGetResponseDataMeta]): + links (Union[Unset, DocumentPartsSingleGetResponseDataLinks]): """ type: Union[Unset, DocumentPartsSingleGetResponseDataType] = UNSET @@ -64,7 +63,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_attributes.py index df64d776..e0f8f9e3 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_attributes.py @@ -14,13 +14,13 @@ @_attrs_define class DocumentPartsSingleGetResponseDataAttributes: """ - Attributes - ---------- - content : Union[Unset, str] - external : Union[Unset, bool] - id : Union[Unset, str] - level : Union[Unset, int] - type : Union[Unset, str] + Attributes: + content (Union[Unset, str]): Example:
. + external (Union[Unset, bool]): + id (Union[Unset, str]): Example: workitem_MyWorkItemId. + level (Union[Unset, int]): + type (Union[Unset, str]): Example: workitem. """ content: Union[Unset, str] = UNSET @@ -34,9 +34,13 @@ class DocumentPartsSingleGetResponseDataAttributes: def to_dict(self) -> Dict[str, Any]: content = self.content + external = self.external + id = self.id + level = self.level + type = self.type field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_links.py index 51180f82..0b2fc1e3 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_links.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_links.py @@ -14,9 +14,9 @@ @_attrs_define class DocumentPartsSingleGetResponseDataLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/parts/workitem_MyWorkItemId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_meta.py index 7fdba215..751d60b4 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_meta.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_meta.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentPartsSingleGetResponseDataMeta: """ - Attributes - ---------- - errors : Union[Unset, List['DocumentPartsSingleGetResponseDataMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['DocumentPartsSingleGetResponseDataMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_meta_errors_item.py index 22b6942c..107ed72e 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class DocumentPartsSingleGetResponseDataMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, DocumentPartsSingleGetResponseDataMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, DocumentPartsSingleGetResponseDataMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class DocumentPartsSingleGetResponseDataMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_meta_errors_item_source.py index 5d5ffaba..18452cef 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_meta_errors_item_source.py @@ -1,13 +1,19 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.document_parts_single_get_response_data_meta_errors_item_source_resource import ( + DocumentPartsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + T = TypeVar( "T", bound="DocumentPartsSingleGetResponseDataMetaErrorsItemSource" ) @@ -16,24 +22,31 @@ @_attrs_define class DocumentPartsSingleGetResponseDataMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, DocumentPartsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the + error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "DocumentPartsSingleGetResponseDataMetaErrorsItemSourceResource" + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -41,20 +54,39 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.document_parts_single_get_response_data_meta_errors_item_source_resource import ( + DocumentPartsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + DocumentPartsSingleGetResponseDataMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = DocumentPartsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + document_parts_single_get_response_data_meta_errors_item_source_obj = ( cls( pointer=pointer, parameter=parameter, + resource=resource, ) ) diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..cfb6d05e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="DocumentPartsSingleGetResponseDataMetaErrorsItemSourceResource" +) + + +@_attrs_define +class DocumentPartsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + document_parts_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + document_parts_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return document_parts_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships.py index c2ab038c..0f0dc300 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships.py @@ -26,11 +26,10 @@ @_attrs_define class DocumentPartsSingleGetResponseDataRelationships: """ - Attributes - ---------- - next_part : Union[Unset, DocumentPartsSingleGetResponseDataRelationshipsNextPart] - previous_part : Union[Unset, DocumentPartsSingleGetResponseDataRelationshipsPreviousPart] - work_item : Union[Unset, DocumentPartsSingleGetResponseDataRelationshipsWorkItem] + Attributes: + next_part (Union[Unset, DocumentPartsSingleGetResponseDataRelationshipsNextPart]): + previous_part (Union[Unset, DocumentPartsSingleGetResponseDataRelationshipsPreviousPart]): + work_item (Union[Unset, DocumentPartsSingleGetResponseDataRelationshipsWorkItem]): """ next_part: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_next_part.py b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_next_part.py index 76acf69b..264acb3a 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_next_part.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_next_part.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentPartsSingleGetResponseDataRelationshipsNextPart: """ - Attributes - ---------- - data : Union[Unset, DocumentPartsSingleGetResponseDataRelationshipsNextPartData] + Attributes: + data (Union[Unset, DocumentPartsSingleGetResponseDataRelationshipsNextPartData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_next_part_data.py b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_next_part_data.py index e7645f18..1067f88f 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_next_part_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_next_part_data.py @@ -19,11 +19,10 @@ @_attrs_define class DocumentPartsSingleGetResponseDataRelationshipsNextPartData: """ - Attributes - ---------- - type : Union[Unset, DocumentPartsSingleGetResponseDataRelationshipsNextPartDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentPartsSingleGetResponseDataRelationshipsNextPartDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/workitem_MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_previous_part.py b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_previous_part.py index 6672e960..ab8b6adf 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_previous_part.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_previous_part.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentPartsSingleGetResponseDataRelationshipsPreviousPart: """ - Attributes - ---------- - data : Union[Unset, DocumentPartsSingleGetResponseDataRelationshipsPreviousPartData] + Attributes: + data (Union[Unset, DocumentPartsSingleGetResponseDataRelationshipsPreviousPartData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_previous_part_data.py b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_previous_part_data.py index fe6df392..fa557802 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_previous_part_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_previous_part_data.py @@ -20,11 +20,10 @@ @_attrs_define class DocumentPartsSingleGetResponseDataRelationshipsPreviousPartData: """ - Attributes - ---------- - type : Union[Unset, DocumentPartsSingleGetResponseDataRelationshipsPreviousPartDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentPartsSingleGetResponseDataRelationshipsPreviousPartDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/workitem_MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_work_item.py b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_work_item.py index c23e3ce2..567f37ed 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_work_item.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_work_item.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentPartsSingleGetResponseDataRelationshipsWorkItem: """ - Attributes - ---------- - data : Union[Unset, DocumentPartsSingleGetResponseDataRelationshipsWorkItemData] + Attributes: + data (Union[Unset, DocumentPartsSingleGetResponseDataRelationshipsWorkItemData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_work_item_data.py b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_work_item_data.py index f450ff20..9cf37fb9 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_work_item_data.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_data_relationships_work_item_data.py @@ -19,11 +19,10 @@ @_attrs_define class DocumentPartsSingleGetResponseDataRelationshipsWorkItemData: """ - Attributes - ---------- - type : Union[Unset, DocumentPartsSingleGetResponseDataRelationshipsWorkItemDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentPartsSingleGetResponseDataRelationshipsWorkItemDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_links.py index 45e0b53d..64e3f8f5 100644 --- a/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/document_parts_single_get_response_links.py @@ -14,9 +14,9 @@ @_attrs_define class DocumentPartsSingleGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/parts/workitem_MyWorkItemId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/documents_list_post_request.py b/polarion_rest_api_client/open_api_client/models/documents_list_post_request.py index cfb23408..424b8ad8 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_list_post_request.py +++ b/polarion_rest_api_client/open_api_client/models/documents_list_post_request.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentsListPostRequest: """ - Attributes - ---------- - data : Union[Unset, List['DocumentsListPostRequestDataItem']] + Attributes: + data (Union[Unset, List['DocumentsListPostRequestDataItem']]): """ data: Union[Unset, List["DocumentsListPostRequestDataItem"]] = UNSET @@ -36,7 +35,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item.py index b1dd04f6..252b6eee 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item.py @@ -23,10 +23,9 @@ @_attrs_define class DocumentsListPostRequestDataItem: """ - Attributes - ---------- - type : Union[Unset, DocumentsListPostRequestDataItemType] - attributes : Union[Unset, DocumentsListPostRequestDataItemAttributes] + Attributes: + type (Union[Unset, DocumentsListPostRequestDataItemType]): + attributes (Union[Unset, DocumentsListPostRequestDataItemAttributes]): """ type: Union[Unset, DocumentsListPostRequestDataItemType] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes.py index 21eb432b..7186547e 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes.py @@ -26,18 +26,17 @@ @_attrs_define class DocumentsListPostRequestDataItemAttributes: """ - Attributes - ---------- - auto_suspect : Union[Unset, bool] - home_page_content : Union[Unset, DocumentsListPostRequestDataItemAttributesHomePageContent] - module_name : Union[Unset, str] - outline_numbering : Union[Unset, DocumentsListPostRequestDataItemAttributesOutlineNumbering] - rendering_layouts : Union[Unset, List['DocumentsListPostRequestDataItemAttributesRenderingLayoutsItem']] - status : Union[Unset, str] - structure_link_role : Union[Unset, str] - title : Union[Unset, str] - type : Union[Unset, str] - uses_outline_numbering : Union[Unset, bool] + Attributes: + auto_suspect (Union[Unset, bool]): + home_page_content (Union[Unset, DocumentsListPostRequestDataItemAttributesHomePageContent]): + module_name (Union[Unset, str]): Example: MyDocumentId. + outline_numbering (Union[Unset, DocumentsListPostRequestDataItemAttributesOutlineNumbering]): + rendering_layouts (Union[Unset, List['DocumentsListPostRequestDataItemAttributesRenderingLayoutsItem']]): + status (Union[Unset, str]): Example: draft. + structure_link_role (Union[Unset, str]): Example: relates_to. + title (Union[Unset, str]): Example: Title. + type (Union[Unset, str]): Example: req_specification. + uses_outline_numbering (Union[Unset, bool]): """ auto_suspect: Union[Unset, bool] = UNSET @@ -63,11 +62,13 @@ class DocumentsListPostRequestDataItemAttributes: def to_dict(self) -> Dict[str, Any]: auto_suspect = self.auto_suspect + home_page_content: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.home_page_content, Unset): home_page_content = self.home_page_content.to_dict() module_name = self.module_name + outline_numbering: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.outline_numbering, Unset): outline_numbering = self.outline_numbering.to_dict() @@ -77,13 +78,16 @@ def to_dict(self) -> Dict[str, Any]: rendering_layouts = [] for rendering_layouts_item_data in self.rendering_layouts: rendering_layouts_item = rendering_layouts_item_data.to_dict() - rendering_layouts.append(rendering_layouts_item) status = self.status + structure_link_role = self.structure_link_role + title = self.title + type = self.type + uses_outline_numbering = self.uses_outline_numbering field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes_home_page_content.py b/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes_home_page_content.py index 9a07e50a..2ca682ed 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes_home_page_content.py +++ b/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes_home_page_content.py @@ -19,10 +19,9 @@ @_attrs_define class DocumentsListPostRequestDataItemAttributesHomePageContent: """ - Attributes - ---------- - type : Union[Unset, DocumentsListPostRequestDataItemAttributesHomePageContentType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentsListPostRequestDataItemAttributesHomePageContentType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes_outline_numbering.py b/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes_outline_numbering.py index af7f4607..15ab66a3 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes_outline_numbering.py +++ b/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes_outline_numbering.py @@ -16,9 +16,8 @@ @_attrs_define class DocumentsListPostRequestDataItemAttributesOutlineNumbering: """ - Attributes - ---------- - prefix : Union[Unset, str] + Attributes: + prefix (Union[Unset, str]): Example: ABC. """ prefix: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes_rendering_layouts_item.py b/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes_rendering_layouts_item.py index 5c7505c9..b2139682 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes_rendering_layouts_item.py +++ b/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes_rendering_layouts_item.py @@ -22,12 +22,11 @@ @_attrs_define class DocumentsListPostRequestDataItemAttributesRenderingLayoutsItem: """ - Attributes - ---------- - type : Union[Unset, str] - label : Union[Unset, str] - layouter : Union[Unset, str] - properties : Union[Unset, List['DocumentsListPostRequestDataItemAttributesRenderingLayoutsItemPropertiesItem']] + Attributes: + type (Union[Unset, str]): Example: task. + label (Union[Unset, str]): Example: My label. + layouter (Union[Unset, str]): Example: paragraph. + properties (Union[Unset, List['DocumentsListPostRequestDataItemAttributesRenderingLayoutsItemPropertiesItem']]): """ type: Union[Unset, str] = UNSET @@ -45,14 +44,16 @@ class DocumentsListPostRequestDataItemAttributesRenderingLayoutsItem: def to_dict(self) -> Dict[str, Any]: type = self.type + label = self.label + layouter = self.layouter + properties: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.properties, Unset): properties = [] for properties_item_data in self.properties: properties_item = properties_item_data.to_dict() - properties.append(properties_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes_rendering_layouts_item_properties_item.py b/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes_rendering_layouts_item_properties_item.py index ec7c5af9..f89fc714 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes_rendering_layouts_item_properties_item.py +++ b/polarion_rest_api_client/open_api_client/models/documents_list_post_request_data_item_attributes_rendering_layouts_item_properties_item.py @@ -17,10 +17,9 @@ @_attrs_define class DocumentsListPostRequestDataItemAttributesRenderingLayoutsItemPropertiesItem: """ - Attributes - ---------- - key : Union[Unset, str] - value : Union[Unset, str] + Attributes: + key (Union[Unset, str]): Example: fieldsAtStart. + value (Union[Unset, str]): Example: id. """ key: Union[Unset, str] = UNSET @@ -31,6 +30,7 @@ class DocumentsListPostRequestDataItemAttributesRenderingLayoutsItemPropertiesIt def to_dict(self) -> Dict[str, Any]: key = self.key + value = self.value field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_list_post_response.py b/polarion_rest_api_client/open_api_client/models/documents_list_post_response.py index 18e3894e..6581069b 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_list_post_response.py +++ b/polarion_rest_api_client/open_api_client/models/documents_list_post_response.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentsListPostResponse: """ - Attributes - ---------- - data : Union[Unset, List['DocumentsListPostResponseDataItem']] + Attributes: + data (Union[Unset, List['DocumentsListPostResponseDataItem']]): """ data: Union[Unset, List["DocumentsListPostResponseDataItem"]] = UNSET @@ -36,7 +35,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/documents_list_post_response_data_item.py index fec07201..202e6d59 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_list_post_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/documents_list_post_response_data_item.py @@ -23,11 +23,10 @@ @_attrs_define class DocumentsListPostResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, DocumentsListPostResponseDataItemType] - id : Union[Unset, str] - links : Union[Unset, DocumentsListPostResponseDataItemLinks] + Attributes: + type (Union[Unset, DocumentsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId. + links (Union[Unset, DocumentsListPostResponseDataItemLinks]): """ type: Union[Unset, DocumentsListPostResponseDataItemType] = UNSET @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + links: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/documents_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/documents_list_post_response_data_item_links.py index c7cf8961..6545f477 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_list_post_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/documents_list_post_response_data_item_links.py @@ -14,9 +14,9 @@ @_attrs_define class DocumentsListPostResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response.py index dd8f04f0..c5f3c14d 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response.py @@ -26,13 +26,12 @@ @_attrs_define class DocumentsSingleGetResponse: """ - Attributes - ---------- - data : Union[Unset, DocumentsSingleGetResponseData] - included : Union[Unset, List['DocumentsSingleGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, DocumentsSingleGetResponseLinks] + Attributes: + data (Union[Unset, DocumentsSingleGetResponseData]): + included (Union[Unset, List['DocumentsSingleGetResponseIncludedItem']]): Related entities might be returned, see + Rest API + User Guide. + links (Union[Unset, DocumentsSingleGetResponseLinks]): """ data: Union[Unset, "DocumentsSingleGetResponseData"] = UNSET @@ -54,7 +53,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data.py index f693fafb..24d74eb2 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data.py @@ -32,15 +32,14 @@ @_attrs_define class DocumentsSingleGetResponseData: """ - Attributes - ---------- - type : Union[Unset, DocumentsSingleGetResponseDataType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, DocumentsSingleGetResponseDataAttributes] - relationships : Union[Unset, DocumentsSingleGetResponseDataRelationships] - meta : Union[Unset, DocumentsSingleGetResponseDataMeta] - links : Union[Unset, DocumentsSingleGetResponseDataLinks] + Attributes: + type (Union[Unset, DocumentsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, DocumentsSingleGetResponseDataAttributes]): + relationships (Union[Unset, DocumentsSingleGetResponseDataRelationships]): + meta (Union[Unset, DocumentsSingleGetResponseDataMeta]): + links (Union[Unset, DocumentsSingleGetResponseDataLinks]): """ type: Union[Unset, DocumentsSingleGetResponseDataType] = UNSET @@ -64,7 +63,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes.py index e01c349b..3ce36023 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes.py @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,28 +28,31 @@ @_attrs_define class DocumentsSingleGetResponseDataAttributes: """ - Attributes - ---------- - auto_suspect : Union[Unset, bool] - branched_with_query : Union[Unset, str] - created : Union[Unset, datetime.datetime] - derived_from_link_role : Union[Unset, str] - home_page_content : Union[Unset, DocumentsSingleGetResponseDataAttributesHomePageContent] - module_folder : Union[Unset, str] - module_name : Union[Unset, str] - outline_numbering : Union[Unset, DocumentsSingleGetResponseDataAttributesOutlineNumbering] - rendering_layouts : Union[Unset, List['DocumentsSingleGetResponseDataAttributesRenderingLayoutsItem']] - status : Union[Unset, str] - structure_link_role : Union[Unset, str] - title : Union[Unset, str] - type : Union[Unset, str] - updated : Union[Unset, datetime.datetime] - uses_outline_numbering : Union[Unset, bool] + Attributes: + auto_suspect (Union[Unset, bool]): + branched_with_initialized_fields (Union[Unset, List[str]]): + branched_with_query (Union[Unset, str]): Example: Branched with Query. + created (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + derived_fields (Union[Unset, List[str]]): + derived_from_link_role (Union[Unset, str]): Example: relates_to. + home_page_content (Union[Unset, DocumentsSingleGetResponseDataAttributesHomePageContent]): + module_folder (Union[Unset, str]): Example: MySpaceId. + module_name (Union[Unset, str]): Example: MyDocumentId. + outline_numbering (Union[Unset, DocumentsSingleGetResponseDataAttributesOutlineNumbering]): + rendering_layouts (Union[Unset, List['DocumentsSingleGetResponseDataAttributesRenderingLayoutsItem']]): + status (Union[Unset, str]): Example: draft. + structure_link_role (Union[Unset, str]): Example: relates_to. + title (Union[Unset, str]): Example: Title. + type (Union[Unset, str]): Example: req_specification. + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + uses_outline_numbering (Union[Unset, bool]): """ auto_suspect: Union[Unset, bool] = UNSET + branched_with_initialized_fields: Union[Unset, List[str]] = UNSET branched_with_query: Union[Unset, str] = UNSET created: Union[Unset, datetime.datetime] = UNSET + derived_fields: Union[Unset, List[str]] = UNSET derived_from_link_role: Union[Unset, str] = UNSET home_page_content: Union[ Unset, "DocumentsSingleGetResponseDataAttributesHomePageContent" @@ -75,18 +78,33 @@ class DocumentsSingleGetResponseDataAttributes: def to_dict(self) -> Dict[str, Any]: auto_suspect = self.auto_suspect + + branched_with_initialized_fields: Union[Unset, List[str]] = UNSET + if not isinstance(self.branched_with_initialized_fields, Unset): + branched_with_initialized_fields = ( + self.branched_with_initialized_fields + ) + branched_with_query = self.branched_with_query + created: Union[Unset, str] = UNSET if not isinstance(self.created, Unset): created = self.created.isoformat() + derived_fields: Union[Unset, List[str]] = UNSET + if not isinstance(self.derived_fields, Unset): + derived_fields = self.derived_fields + derived_from_link_role = self.derived_from_link_role + home_page_content: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.home_page_content, Unset): home_page_content = self.home_page_content.to_dict() module_folder = self.module_folder + module_name = self.module_name + outline_numbering: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.outline_numbering, Unset): outline_numbering = self.outline_numbering.to_dict() @@ -96,13 +114,16 @@ def to_dict(self) -> Dict[str, Any]: rendering_layouts = [] for rendering_layouts_item_data in self.rendering_layouts: rendering_layouts_item = rendering_layouts_item_data.to_dict() - rendering_layouts.append(rendering_layouts_item) status = self.status + structure_link_role = self.structure_link_role + title = self.title + type = self.type + updated: Union[Unset, str] = UNSET if not isinstance(self.updated, Unset): updated = self.updated.isoformat() @@ -114,10 +135,16 @@ def to_dict(self) -> Dict[str, Any]: field_dict.update({}) if auto_suspect is not UNSET: field_dict["autoSuspect"] = auto_suspect + if branched_with_initialized_fields is not UNSET: + field_dict[ + "branchedWithInitializedFields" + ] = branched_with_initialized_fields if branched_with_query is not UNSET: field_dict["branchedWithQuery"] = branched_with_query if created is not UNSET: field_dict["created"] = created + if derived_fields is not UNSET: + field_dict["derivedFields"] = derived_fields if derived_from_link_role is not UNSET: field_dict["derivedFromLinkRole"] = derived_from_link_role if home_page_content is not UNSET: @@ -160,6 +187,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() auto_suspect = d.pop("autoSuspect", UNSET) + branched_with_initialized_fields = cast( + List[str], d.pop("branchedWithInitializedFields", UNSET) + ) + branched_with_query = d.pop("branchedWithQuery", UNSET) _created = d.pop("created", UNSET) @@ -169,6 +200,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: created = isoparse(_created) + derived_fields = cast(List[str], d.pop("derivedFields", UNSET)) + derived_from_link_role = d.pop("derivedFromLinkRole", UNSET) _home_page_content = d.pop("homePageContent", UNSET) @@ -225,8 +258,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: documents_single_get_response_data_attributes_obj = cls( auto_suspect=auto_suspect, + branched_with_initialized_fields=branched_with_initialized_fields, branched_with_query=branched_with_query, created=created, + derived_fields=derived_fields, derived_from_link_role=derived_from_link_role, home_page_content=home_page_content, module_folder=module_folder, diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes_home_page_content.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes_home_page_content.py index 97d17407..df62d9fc 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes_home_page_content.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes_home_page_content.py @@ -19,10 +19,9 @@ @_attrs_define class DocumentsSingleGetResponseDataAttributesHomePageContent: """ - Attributes - ---------- - type : Union[Unset, DocumentsSingleGetResponseDataAttributesHomePageContentType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentsSingleGetResponseDataAttributesHomePageContentType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes_outline_numbering.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes_outline_numbering.py index e1465c2b..90f033ab 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes_outline_numbering.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes_outline_numbering.py @@ -16,9 +16,8 @@ @_attrs_define class DocumentsSingleGetResponseDataAttributesOutlineNumbering: """ - Attributes - ---------- - prefix : Union[Unset, str] + Attributes: + prefix (Union[Unset, str]): Example: ABC. """ prefix: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes_rendering_layouts_item.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes_rendering_layouts_item.py index ac6f0eaf..745be25b 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes_rendering_layouts_item.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes_rendering_layouts_item.py @@ -22,12 +22,11 @@ @_attrs_define class DocumentsSingleGetResponseDataAttributesRenderingLayoutsItem: """ - Attributes - ---------- - type : Union[Unset, str] - label : Union[Unset, str] - layouter : Union[Unset, str] - properties : Union[Unset, List['DocumentsSingleGetResponseDataAttributesRenderingLayoutsItemPropertiesItem']] + Attributes: + type (Union[Unset, str]): Example: task. + label (Union[Unset, str]): Example: My label. + layouter (Union[Unset, str]): Example: paragraph. + properties (Union[Unset, List['DocumentsSingleGetResponseDataAttributesRenderingLayoutsItemPropertiesItem']]): """ type: Union[Unset, str] = UNSET @@ -45,14 +44,16 @@ class DocumentsSingleGetResponseDataAttributesRenderingLayoutsItem: def to_dict(self) -> Dict[str, Any]: type = self.type + label = self.label + layouter = self.layouter + properties: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.properties, Unset): properties = [] for properties_item_data in self.properties: properties_item = properties_item_data.to_dict() - properties.append(properties_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes_rendering_layouts_item_properties_item.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes_rendering_layouts_item_properties_item.py index aa87f36e..38ce5a04 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes_rendering_layouts_item_properties_item.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_attributes_rendering_layouts_item_properties_item.py @@ -17,10 +17,9 @@ @_attrs_define class DocumentsSingleGetResponseDataAttributesRenderingLayoutsItemPropertiesItem: """ - Attributes - ---------- - key : Union[Unset, str] - value : Union[Unset, str] + Attributes: + key (Union[Unset, str]): Example: fieldsAtStart. + value (Union[Unset, str]): Example: id. """ key: Union[Unset, str] = UNSET @@ -31,6 +30,7 @@ class DocumentsSingleGetResponseDataAttributesRenderingLayoutsItemPropertiesItem def to_dict(self) -> Dict[str, Any]: key = self.key + value = self.value field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_links.py index 38772376..c785e539 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_links.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_links.py @@ -14,9 +14,9 @@ @_attrs_define class DocumentsSingleGetResponseDataLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_meta.py index 09011d76..7007f18f 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_meta.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_meta.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentsSingleGetResponseDataMeta: """ - Attributes - ---------- - errors : Union[Unset, List['DocumentsSingleGetResponseDataMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['DocumentsSingleGetResponseDataMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_meta_errors_item.py index c22d6dc5..50628f25 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class DocumentsSingleGetResponseDataMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, DocumentsSingleGetResponseDataMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, DocumentsSingleGetResponseDataMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class DocumentsSingleGetResponseDataMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_meta_errors_item_source.py index 7361f398..d3edbdc5 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_meta_errors_item_source.py @@ -1,37 +1,49 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.documents_single_get_response_data_meta_errors_item_source_resource import ( + DocumentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + T = TypeVar("T", bound="DocumentsSingleGetResponseDataMetaErrorsItemSource") @_attrs_define class DocumentsSingleGetResponseDataMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, DocumentsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "DocumentsSingleGetResponseDataMetaErrorsItemSourceResource" + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -39,19 +51,37 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.documents_single_get_response_data_meta_errors_item_source_resource import ( + DocumentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, DocumentsSingleGetResponseDataMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = DocumentsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + documents_single_get_response_data_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) documents_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..e19376f5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="DocumentsSingleGetResponseDataMetaErrorsItemSourceResource" +) + + +@_attrs_define +class DocumentsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + documents_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + documents_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return documents_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships.py index 0cd883b4..7fd4c837 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships.py @@ -41,16 +41,15 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationships: """ - Attributes - ---------- - attachments : Union[Unset, DocumentsSingleGetResponseDataRelationshipsAttachments] - author : Union[Unset, DocumentsSingleGetResponseDataRelationshipsAuthor] - branched_from : Union[Unset, DocumentsSingleGetResponseDataRelationshipsBranchedFrom] - comments : Union[Unset, DocumentsSingleGetResponseDataRelationshipsComments] - derived_from : Union[Unset, DocumentsSingleGetResponseDataRelationshipsDerivedFrom] - project : Union[Unset, DocumentsSingleGetResponseDataRelationshipsProject] - updated_by : Union[Unset, DocumentsSingleGetResponseDataRelationshipsUpdatedBy] - variant : Union[Unset, DocumentsSingleGetResponseDataRelationshipsVariant] + Attributes: + attachments (Union[Unset, DocumentsSingleGetResponseDataRelationshipsAttachments]): + author (Union[Unset, DocumentsSingleGetResponseDataRelationshipsAuthor]): + branched_from (Union[Unset, DocumentsSingleGetResponseDataRelationshipsBranchedFrom]): + comments (Union[Unset, DocumentsSingleGetResponseDataRelationshipsComments]): + derived_from (Union[Unset, DocumentsSingleGetResponseDataRelationshipsDerivedFrom]): + project (Union[Unset, DocumentsSingleGetResponseDataRelationshipsProject]): + updated_by (Union[Unset, DocumentsSingleGetResponseDataRelationshipsUpdatedBy]): + variant (Union[Unset, DocumentsSingleGetResponseDataRelationshipsVariant]): """ attachments: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_attachments.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_attachments.py index c1a68328..54ba7f0a 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_attachments.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_attachments.py @@ -28,11 +28,10 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsAttachments: """ - Attributes - ---------- - data : Union[Unset, List['DocumentsSingleGetResponseDataRelationshipsAttachmentsDataItem']] - meta : Union[Unset, DocumentsSingleGetResponseDataRelationshipsAttachmentsMeta] - links : Union[Unset, DocumentsSingleGetResponseDataRelationshipsAttachmentsLinks] + Attributes: + data (Union[Unset, List['DocumentsSingleGetResponseDataRelationshipsAttachmentsDataItem']]): + meta (Union[Unset, DocumentsSingleGetResponseDataRelationshipsAttachmentsMeta]): + links (Union[Unset, DocumentsSingleGetResponseDataRelationshipsAttachmentsLinks]): """ data: Union[ @@ -55,7 +54,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_attachments_data_item.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_attachments_data_item.py index e6615a13..c6ab6eb4 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_attachments_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_attachments_data_item.py @@ -19,11 +19,10 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsAttachmentsDataItem: """ - Attributes - ---------- - type : Union[Unset, DocumentsSingleGetResponseDataRelationshipsAttachmentsDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentsSingleGetResponseDataRelationshipsAttachmentsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/MyAttachmentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -42,6 +41,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_attachments_links.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_attachments_links.py index 83988c7f..2b762468 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_attachments_links.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_attachments_links.py @@ -16,9 +16,9 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsAttachmentsLinks: """ - Attributes - ---------- - related : Union[Unset, str] + Attributes: + related (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/attachments?revision=1234. """ related: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_attachments_meta.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_attachments_meta.py index 046bfcc7..706ece72 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_attachments_meta.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_attachments_meta.py @@ -16,9 +16,8 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsAttachmentsMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_author.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_author.py index a51c0e37..2e040c9f 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_author.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_author.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsAuthor: """ - Attributes - ---------- - data : Union[Unset, DocumentsSingleGetResponseDataRelationshipsAuthorData] + Attributes: + data (Union[Unset, DocumentsSingleGetResponseDataRelationshipsAuthorData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_author_data.py index 0ccbfe82..dcc3fafb 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_author_data.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_author_data.py @@ -17,11 +17,10 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsAuthorData: """ - Attributes - ---------- - type : Union[Unset, DocumentsSingleGetResponseDataRelationshipsAuthorDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentsSingleGetResponseDataRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -39,6 +38,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_branched_from.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_branched_from.py index 34fa2ccc..384ddefc 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_branched_from.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_branched_from.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsBranchedFrom: """ - Attributes - ---------- - data : Union[Unset, DocumentsSingleGetResponseDataRelationshipsBranchedFromData] + Attributes: + data (Union[Unset, DocumentsSingleGetResponseDataRelationshipsBranchedFromData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_branched_from_data.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_branched_from_data.py index 530d5508..869b2956 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_branched_from_data.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_branched_from_data.py @@ -19,11 +19,10 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsBranchedFromData: """ - Attributes - ---------- - type : Union[Unset, DocumentsSingleGetResponseDataRelationshipsBranchedFromDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentsSingleGetResponseDataRelationshipsBranchedFromDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_comments.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_comments.py index f0c275d2..b60647da 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_comments.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_comments.py @@ -26,11 +26,10 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsComments: """ - Attributes - ---------- - data : Union[Unset, List['DocumentsSingleGetResponseDataRelationshipsCommentsDataItem']] - meta : Union[Unset, DocumentsSingleGetResponseDataRelationshipsCommentsMeta] - links : Union[Unset, DocumentsSingleGetResponseDataRelationshipsCommentsLinks] + Attributes: + data (Union[Unset, List['DocumentsSingleGetResponseDataRelationshipsCommentsDataItem']]): + meta (Union[Unset, DocumentsSingleGetResponseDataRelationshipsCommentsMeta]): + links (Union[Unset, DocumentsSingleGetResponseDataRelationshipsCommentsLinks]): """ data: Union[ @@ -53,7 +52,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_comments_data_item.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_comments_data_item.py index 3b38ec99..6fb0c5f4 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_comments_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_comments_data_item.py @@ -19,11 +19,10 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsCommentsDataItem: """ - Attributes - ---------- - type : Union[Unset, DocumentsSingleGetResponseDataRelationshipsCommentsDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentsSingleGetResponseDataRelationshipsCommentsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_comments_links.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_comments_links.py index 32cf0e2b..a4bc9cca 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_comments_links.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_comments_links.py @@ -16,9 +16,9 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsCommentsLinks: """ - Attributes - ---------- - related : Union[Unset, str] + Attributes: + related (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/comments?revision=1234. """ related: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_comments_meta.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_comments_meta.py index 9faf150c..6afaf25c 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_comments_meta.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_comments_meta.py @@ -16,9 +16,8 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsCommentsMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_derived_from.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_derived_from.py index ec5c05d5..0c1b1671 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_derived_from.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_derived_from.py @@ -22,9 +22,8 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsDerivedFrom: """ - Attributes - ---------- - data : Union[Unset, DocumentsSingleGetResponseDataRelationshipsDerivedFromData] + Attributes: + data (Union[Unset, DocumentsSingleGetResponseDataRelationshipsDerivedFromData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_derived_from_data.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_derived_from_data.py index 1aaaefe7..17041a45 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_derived_from_data.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_derived_from_data.py @@ -19,11 +19,10 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsDerivedFromData: """ - Attributes - ---------- - type : Union[Unset, DocumentsSingleGetResponseDataRelationshipsDerivedFromDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentsSingleGetResponseDataRelationshipsDerivedFromDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_project.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_project.py index ce7a2caa..9c37bf7c 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_project.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_project.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsProject: """ - Attributes - ---------- - data : Union[Unset, DocumentsSingleGetResponseDataRelationshipsProjectData] + Attributes: + data (Union[Unset, DocumentsSingleGetResponseDataRelationshipsProjectData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_project_data.py index fd9e0341..c210272e 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_project_data.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_project_data.py @@ -19,11 +19,10 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsProjectData: """ - Attributes - ---------- - type : Union[Unset, DocumentsSingleGetResponseDataRelationshipsProjectDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentsSingleGetResponseDataRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_updated_by.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_updated_by.py index c26b1160..06ffde74 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_updated_by.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_updated_by.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsUpdatedBy: """ - Attributes - ---------- - data : Union[Unset, DocumentsSingleGetResponseDataRelationshipsUpdatedByData] + Attributes: + data (Union[Unset, DocumentsSingleGetResponseDataRelationshipsUpdatedByData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_updated_by_data.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_updated_by_data.py index 600c31ac..f11c42cb 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_updated_by_data.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_updated_by_data.py @@ -19,11 +19,10 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsUpdatedByData: """ - Attributes - ---------- - type : Union[Unset, DocumentsSingleGetResponseDataRelationshipsUpdatedByDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentsSingleGetResponseDataRelationshipsUpdatedByDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_variant.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_variant.py index 6a0ed60d..4559f8f8 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_variant.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_variant.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsVariant: """ - Attributes - ---------- - data : Union[Unset, DocumentsSingleGetResponseDataRelationshipsVariantData] + Attributes: + data (Union[Unset, DocumentsSingleGetResponseDataRelationshipsVariantData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_variant_data.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_variant_data.py index e43f7c2c..28fdcffa 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_variant_data.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_data_relationships_variant_data.py @@ -19,11 +19,10 @@ @_attrs_define class DocumentsSingleGetResponseDataRelationshipsVariantData: """ - Attributes - ---------- - type : Union[Unset, DocumentsSingleGetResponseDataRelationshipsVariantDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentsSingleGetResponseDataRelationshipsVariantDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_links.py index e52f1a73..616e0250 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_get_response_links.py @@ -14,9 +14,9 @@ @_attrs_define class DocumentsSingleGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_patch_request.py b/polarion_rest_api_client/open_api_client/models/documents_single_patch_request.py index 475bce6e..1a4364ab 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_patch_request.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_patch_request.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentsSinglePatchRequest: """ - Attributes - ---------- - data : Union[Unset, DocumentsSinglePatchRequestData] + Attributes: + data (Union[Unset, DocumentsSinglePatchRequestData]): """ data: Union[Unset, "DocumentsSinglePatchRequestData"] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data.py b/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data.py index 25231e4b..fd0ead7b 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data.py @@ -23,11 +23,10 @@ @_attrs_define class DocumentsSinglePatchRequestData: """ - Attributes - ---------- - type : Union[Unset, DocumentsSinglePatchRequestDataType] - id : Union[Unset, str] - attributes : Union[Unset, DocumentsSinglePatchRequestDataAttributes] + Attributes: + type (Union[Unset, DocumentsSinglePatchRequestDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId. + attributes (Union[Unset, DocumentsSinglePatchRequestDataAttributes]): """ type: Union[Unset, DocumentsSinglePatchRequestDataType] = UNSET @@ -45,6 +44,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes.py b/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes.py index 9ac76edd..e7e81dd7 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes.py @@ -26,16 +26,15 @@ @_attrs_define class DocumentsSinglePatchRequestDataAttributes: """ - Attributes - ---------- - auto_suspect : Union[Unset, bool] - home_page_content : Union[Unset, DocumentsSinglePatchRequestDataAttributesHomePageContent] - outline_numbering : Union[Unset, DocumentsSinglePatchRequestDataAttributesOutlineNumbering] - rendering_layouts : Union[Unset, List['DocumentsSinglePatchRequestDataAttributesRenderingLayoutsItem']] - status : Union[Unset, str] - title : Union[Unset, str] - type : Union[Unset, str] - uses_outline_numbering : Union[Unset, bool] + Attributes: + auto_suspect (Union[Unset, bool]): + home_page_content (Union[Unset, DocumentsSinglePatchRequestDataAttributesHomePageContent]): + outline_numbering (Union[Unset, DocumentsSinglePatchRequestDataAttributesOutlineNumbering]): + rendering_layouts (Union[Unset, List['DocumentsSinglePatchRequestDataAttributesRenderingLayoutsItem']]): + status (Union[Unset, str]): Example: draft. + title (Union[Unset, str]): Example: Title. + type (Union[Unset, str]): Example: req_specification. + uses_outline_numbering (Union[Unset, bool]): """ auto_suspect: Union[Unset, bool] = UNSET @@ -59,6 +58,7 @@ class DocumentsSinglePatchRequestDataAttributes: def to_dict(self) -> Dict[str, Any]: auto_suspect = self.auto_suspect + home_page_content: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.home_page_content, Unset): home_page_content = self.home_page_content.to_dict() @@ -72,12 +72,14 @@ def to_dict(self) -> Dict[str, Any]: rendering_layouts = [] for rendering_layouts_item_data in self.rendering_layouts: rendering_layouts_item = rendering_layouts_item_data.to_dict() - rendering_layouts.append(rendering_layouts_item) status = self.status + title = self.title + type = self.type + uses_outline_numbering = self.uses_outline_numbering field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes_home_page_content.py b/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes_home_page_content.py index 4e360951..d08f87ed 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes_home_page_content.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes_home_page_content.py @@ -19,10 +19,9 @@ @_attrs_define class DocumentsSinglePatchRequestDataAttributesHomePageContent: """ - Attributes - ---------- - type : Union[Unset, DocumentsSinglePatchRequestDataAttributesHomePageContentType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentsSinglePatchRequestDataAttributesHomePageContentType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes_outline_numbering.py b/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes_outline_numbering.py index 6aed1807..ac26b34e 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes_outline_numbering.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes_outline_numbering.py @@ -16,9 +16,8 @@ @_attrs_define class DocumentsSinglePatchRequestDataAttributesOutlineNumbering: """ - Attributes - ---------- - prefix : Union[Unset, str] + Attributes: + prefix (Union[Unset, str]): Example: ABC. """ prefix: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes_rendering_layouts_item.py b/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes_rendering_layouts_item.py index c89499cb..67aa5277 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes_rendering_layouts_item.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes_rendering_layouts_item.py @@ -22,12 +22,11 @@ @_attrs_define class DocumentsSinglePatchRequestDataAttributesRenderingLayoutsItem: """ - Attributes - ---------- - type : Union[Unset, str] - label : Union[Unset, str] - layouter : Union[Unset, str] - properties : Union[Unset, List['DocumentsSinglePatchRequestDataAttributesRenderingLayoutsItemPropertiesItem']] + Attributes: + type (Union[Unset, str]): Example: task. + label (Union[Unset, str]): Example: My label. + layouter (Union[Unset, str]): Example: paragraph. + properties (Union[Unset, List['DocumentsSinglePatchRequestDataAttributesRenderingLayoutsItemPropertiesItem']]): """ type: Union[Unset, str] = UNSET @@ -45,14 +44,16 @@ class DocumentsSinglePatchRequestDataAttributesRenderingLayoutsItem: def to_dict(self) -> Dict[str, Any]: type = self.type + label = self.label + layouter = self.layouter + properties: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.properties, Unset): properties = [] for properties_item_data in self.properties: properties_item = properties_item_data.to_dict() - properties.append(properties_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes_rendering_layouts_item_properties_item.py b/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes_rendering_layouts_item_properties_item.py index 4694c614..83b76f46 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes_rendering_layouts_item_properties_item.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_patch_request_data_attributes_rendering_layouts_item_properties_item.py @@ -17,10 +17,9 @@ @_attrs_define class DocumentsSinglePatchRequestDataAttributesRenderingLayoutsItemPropertiesItem: """ - Attributes - ---------- - key : Union[Unset, str] - value : Union[Unset, str] + Attributes: + key (Union[Unset, str]): Example: fieldsAtStart. + value (Union[Unset, str]): Example: id. """ key: Union[Unset, str] = UNSET @@ -31,6 +30,7 @@ class DocumentsSinglePatchRequestDataAttributesRenderingLayoutsItemPropertiesIte def to_dict(self) -> Dict[str, Any]: key = self.key + value = self.value field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_post_response.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response.py index 490e8ee3..6b20d862 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_post_response.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response.py @@ -20,9 +20,8 @@ @_attrs_define class DocumentsSinglePostResponse: """ - Attributes - ---------- - data : Union[Unset, DocumentsSinglePostResponseData] + Attributes: + data (Union[Unset, DocumentsSinglePostResponseData]): """ data: Union[Unset, "DocumentsSinglePostResponseData"] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data.py index 5fa003b3..67df339f 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data.py @@ -15,6 +15,12 @@ from ..models.documents_single_post_response_data_attributes import ( DocumentsSinglePostResponseDataAttributes, ) + from ..models.documents_single_post_response_data_links import ( + DocumentsSinglePostResponseDataLinks, + ) + from ..models.documents_single_post_response_data_relationships import ( + DocumentsSinglePostResponseDataRelationships, + ) T = TypeVar("T", bound="DocumentsSinglePostResponseData") @@ -23,11 +29,12 @@ @_attrs_define class DocumentsSinglePostResponseData: """ - Attributes - ---------- - type : Union[Unset, DocumentsSinglePostResponseDataType] - id : Union[Unset, str] - attributes : Union[Unset, DocumentsSinglePostResponseDataAttributes] + Attributes: + type (Union[Unset, DocumentsSinglePostResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId. + attributes (Union[Unset, DocumentsSinglePostResponseDataAttributes]): + relationships (Union[Unset, DocumentsSinglePostResponseDataRelationships]): + links (Union[Unset, DocumentsSinglePostResponseDataLinks]): """ type: Union[Unset, DocumentsSinglePostResponseDataType] = UNSET @@ -35,6 +42,10 @@ class DocumentsSinglePostResponseData: attributes: Union[ Unset, "DocumentsSinglePostResponseDataAttributes" ] = UNSET + relationships: Union[ + Unset, "DocumentsSinglePostResponseDataRelationships" + ] = UNSET + links: Union[Unset, "DocumentsSinglePostResponseDataLinks"] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) @@ -45,10 +56,19 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -58,6 +78,10 @@ def to_dict(self) -> Dict[str, Any]: field_dict["id"] = id if attributes is not UNSET: field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if links is not UNSET: + field_dict["links"] = links return field_dict @@ -66,6 +90,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.documents_single_post_response_data_attributes import ( DocumentsSinglePostResponseDataAttributes, ) + from ..models.documents_single_post_response_data_links import ( + DocumentsSinglePostResponseDataLinks, + ) + from ..models.documents_single_post_response_data_relationships import ( + DocumentsSinglePostResponseDataRelationships, + ) d = src_dict.copy() _type = d.pop("type", UNSET) @@ -86,10 +116,32 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: _attributes ) + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, DocumentsSinglePostResponseDataRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + DocumentsSinglePostResponseDataRelationships.from_dict( + _relationships + ) + ) + + _links = d.pop("links", UNSET) + links: Union[Unset, DocumentsSinglePostResponseDataLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = DocumentsSinglePostResponseDataLinks.from_dict(_links) + documents_single_post_response_data_obj = cls( type=type, id=id, attributes=attributes, + relationships=relationships, + links=links, ) documents_single_post_response_data_obj.additional_properties = d diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes.py index 72ecdbd0..b0fac90f 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes.py @@ -1,10 +1,12 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from dateutil.parser import isoparse from ..types import UNSET, Unset @@ -26,22 +28,34 @@ @_attrs_define class DocumentsSinglePostResponseDataAttributes: """ - Attributes - ---------- - auto_suspect : Union[Unset, bool] - home_page_content : Union[Unset, DocumentsSinglePostResponseDataAttributesHomePageContent] - outline_numbering : Union[Unset, DocumentsSinglePostResponseDataAttributesOutlineNumbering] - rendering_layouts : Union[Unset, List['DocumentsSinglePostResponseDataAttributesRenderingLayoutsItem']] - status : Union[Unset, str] - title : Union[Unset, str] - type : Union[Unset, str] - uses_outline_numbering : Union[Unset, bool] + Attributes: + auto_suspect (Union[Unset, bool]): + branched_with_initialized_fields (Union[Unset, List[str]]): + branched_with_query (Union[Unset, str]): Example: Branched with Query. + created (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + derived_fields (Union[Unset, List[str]]): + derived_from_link_role (Union[Unset, str]): Example: relates_to. + home_page_content (Union[Unset, DocumentsSinglePostResponseDataAttributesHomePageContent]): + module_folder (Union[Unset, str]): Example: MySpaceId. + outline_numbering (Union[Unset, DocumentsSinglePostResponseDataAttributesOutlineNumbering]): + rendering_layouts (Union[Unset, List['DocumentsSinglePostResponseDataAttributesRenderingLayoutsItem']]): + status (Union[Unset, str]): Example: draft. + title (Union[Unset, str]): Example: Title. + type (Union[Unset, str]): Example: req_specification. + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + uses_outline_numbering (Union[Unset, bool]): """ auto_suspect: Union[Unset, bool] = UNSET + branched_with_initialized_fields: Union[Unset, List[str]] = UNSET + branched_with_query: Union[Unset, str] = UNSET + created: Union[Unset, datetime.datetime] = UNSET + derived_fields: Union[Unset, List[str]] = UNSET + derived_from_link_role: Union[Unset, str] = UNSET home_page_content: Union[ Unset, "DocumentsSinglePostResponseDataAttributesHomePageContent" ] = UNSET + module_folder: Union[Unset, str] = UNSET outline_numbering: Union[ Unset, "DocumentsSinglePostResponseDataAttributesOutlineNumbering" ] = UNSET @@ -52,6 +66,7 @@ class DocumentsSinglePostResponseDataAttributes: status: Union[Unset, str] = UNSET title: Union[Unset, str] = UNSET type: Union[Unset, str] = UNSET + updated: Union[Unset, datetime.datetime] = UNSET uses_outline_numbering: Union[Unset, bool] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict @@ -59,10 +74,31 @@ class DocumentsSinglePostResponseDataAttributes: def to_dict(self) -> Dict[str, Any]: auto_suspect = self.auto_suspect + + branched_with_initialized_fields: Union[Unset, List[str]] = UNSET + if not isinstance(self.branched_with_initialized_fields, Unset): + branched_with_initialized_fields = ( + self.branched_with_initialized_fields + ) + + branched_with_query = self.branched_with_query + + created: Union[Unset, str] = UNSET + if not isinstance(self.created, Unset): + created = self.created.isoformat() + + derived_fields: Union[Unset, List[str]] = UNSET + if not isinstance(self.derived_fields, Unset): + derived_fields = self.derived_fields + + derived_from_link_role = self.derived_from_link_role + home_page_content: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.home_page_content, Unset): home_page_content = self.home_page_content.to_dict() + module_folder = self.module_folder + outline_numbering: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.outline_numbering, Unset): outline_numbering = self.outline_numbering.to_dict() @@ -72,12 +108,18 @@ def to_dict(self) -> Dict[str, Any]: rendering_layouts = [] for rendering_layouts_item_data in self.rendering_layouts: rendering_layouts_item = rendering_layouts_item_data.to_dict() - rendering_layouts.append(rendering_layouts_item) status = self.status + title = self.title + type = self.type + + updated: Union[Unset, str] = UNSET + if not isinstance(self.updated, Unset): + updated = self.updated.isoformat() + uses_outline_numbering = self.uses_outline_numbering field_dict: Dict[str, Any] = {} @@ -85,8 +127,22 @@ def to_dict(self) -> Dict[str, Any]: field_dict.update({}) if auto_suspect is not UNSET: field_dict["autoSuspect"] = auto_suspect + if branched_with_initialized_fields is not UNSET: + field_dict[ + "branchedWithInitializedFields" + ] = branched_with_initialized_fields + if branched_with_query is not UNSET: + field_dict["branchedWithQuery"] = branched_with_query + if created is not UNSET: + field_dict["created"] = created + if derived_fields is not UNSET: + field_dict["derivedFields"] = derived_fields + if derived_from_link_role is not UNSET: + field_dict["derivedFromLinkRole"] = derived_from_link_role if home_page_content is not UNSET: field_dict["homePageContent"] = home_page_content + if module_folder is not UNSET: + field_dict["moduleFolder"] = module_folder if outline_numbering is not UNSET: field_dict["outlineNumbering"] = outline_numbering if rendering_layouts is not UNSET: @@ -97,6 +153,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["title"] = title if type is not UNSET: field_dict["type"] = type + if updated is not UNSET: + field_dict["updated"] = updated if uses_outline_numbering is not UNSET: field_dict["usesOutlineNumbering"] = uses_outline_numbering @@ -117,6 +175,23 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() auto_suspect = d.pop("autoSuspect", UNSET) + branched_with_initialized_fields = cast( + List[str], d.pop("branchedWithInitializedFields", UNSET) + ) + + branched_with_query = d.pop("branchedWithQuery", UNSET) + + _created = d.pop("created", UNSET) + created: Union[Unset, datetime.datetime] + if isinstance(_created, Unset): + created = UNSET + else: + created = isoparse(_created) + + derived_fields = cast(List[str], d.pop("derivedFields", UNSET)) + + derived_from_link_role = d.pop("derivedFromLinkRole", UNSET) + _home_page_content = d.pop("homePageContent", UNSET) home_page_content: Union[ Unset, DocumentsSinglePostResponseDataAttributesHomePageContent @@ -128,6 +203,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: _home_page_content ) + module_folder = d.pop("moduleFolder", UNSET) + _outline_numbering = d.pop("outlineNumbering", UNSET) outline_numbering: Union[ Unset, DocumentsSinglePostResponseDataAttributesOutlineNumbering @@ -154,16 +231,30 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: type = d.pop("type", UNSET) + _updated = d.pop("updated", UNSET) + updated: Union[Unset, datetime.datetime] + if isinstance(_updated, Unset): + updated = UNSET + else: + updated = isoparse(_updated) + uses_outline_numbering = d.pop("usesOutlineNumbering", UNSET) documents_single_post_response_data_attributes_obj = cls( auto_suspect=auto_suspect, + branched_with_initialized_fields=branched_with_initialized_fields, + branched_with_query=branched_with_query, + created=created, + derived_fields=derived_fields, + derived_from_link_role=derived_from_link_role, home_page_content=home_page_content, + module_folder=module_folder, outline_numbering=outline_numbering, rendering_layouts=rendering_layouts, status=status, title=title, type=type, + updated=updated, uses_outline_numbering=uses_outline_numbering, ) diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes_home_page_content.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes_home_page_content.py index cfe5e0d9..13b1a5f3 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes_home_page_content.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes_home_page_content.py @@ -19,10 +19,9 @@ @_attrs_define class DocumentsSinglePostResponseDataAttributesHomePageContent: """ - Attributes - ---------- - type : Union[Unset, DocumentsSinglePostResponseDataAttributesHomePageContentType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, DocumentsSinglePostResponseDataAttributesHomePageContentType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes_outline_numbering.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes_outline_numbering.py index b4bdc156..29734c84 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes_outline_numbering.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes_outline_numbering.py @@ -16,9 +16,8 @@ @_attrs_define class DocumentsSinglePostResponseDataAttributesOutlineNumbering: """ - Attributes - ---------- - prefix : Union[Unset, str] + Attributes: + prefix (Union[Unset, str]): Example: ABC. """ prefix: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes_rendering_layouts_item.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes_rendering_layouts_item.py index 5a274d7a..ec8c860a 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes_rendering_layouts_item.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes_rendering_layouts_item.py @@ -22,12 +22,11 @@ @_attrs_define class DocumentsSinglePostResponseDataAttributesRenderingLayoutsItem: """ - Attributes - ---------- - type : Union[Unset, str] - label : Union[Unset, str] - layouter : Union[Unset, str] - properties : Union[Unset, List['DocumentsSinglePostResponseDataAttributesRenderingLayoutsItemPropertiesItem']] + Attributes: + type (Union[Unset, str]): Example: task. + label (Union[Unset, str]): Example: My label. + layouter (Union[Unset, str]): Example: paragraph. + properties (Union[Unset, List['DocumentsSinglePostResponseDataAttributesRenderingLayoutsItemPropertiesItem']]): """ type: Union[Unset, str] = UNSET @@ -45,14 +44,16 @@ class DocumentsSinglePostResponseDataAttributesRenderingLayoutsItem: def to_dict(self) -> Dict[str, Any]: type = self.type + label = self.label + layouter = self.layouter + properties: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.properties, Unset): properties = [] for properties_item_data in self.properties: properties_item = properties_item_data.to_dict() - properties.append(properties_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes_rendering_layouts_item_properties_item.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes_rendering_layouts_item_properties_item.py index ac730721..64500b94 100644 --- a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes_rendering_layouts_item_properties_item.py +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_attributes_rendering_layouts_item_properties_item.py @@ -17,10 +17,9 @@ @_attrs_define class DocumentsSinglePostResponseDataAttributesRenderingLayoutsItemPropertiesItem: """ - Attributes - ---------- - key : Union[Unset, str] - value : Union[Unset, str] + Attributes: + key (Union[Unset, str]): Example: fieldsAtStart. + value (Union[Unset, str]): Example: id. """ key: Union[Unset, str] = UNSET @@ -31,6 +30,7 @@ class DocumentsSinglePostResponseDataAttributesRenderingLayoutsItemPropertiesIte def to_dict(self) -> Dict[str, Any]: key = self.key + value = self.value field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_links.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_links.py new file mode 100644 index 00000000..ec5c707e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_links.py @@ -0,0 +1,64 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DocumentsSinglePostResponseDataLinks") + + +@_attrs_define +class DocumentsSinglePostResponseDataLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + documents_single_post_response_data_links_obj = cls( + self_=self_, + ) + + documents_single_post_response_data_links_obj.additional_properties = d + return documents_single_post_response_data_links_obj + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships.py new file mode 100644 index 00000000..7cc9be6e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships.py @@ -0,0 +1,292 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.documents_single_post_response_data_relationships_attachments import ( + DocumentsSinglePostResponseDataRelationshipsAttachments, + ) + from ..models.documents_single_post_response_data_relationships_author import ( + DocumentsSinglePostResponseDataRelationshipsAuthor, + ) + from ..models.documents_single_post_response_data_relationships_branched_from import ( + DocumentsSinglePostResponseDataRelationshipsBranchedFrom, + ) + from ..models.documents_single_post_response_data_relationships_comments import ( + DocumentsSinglePostResponseDataRelationshipsComments, + ) + from ..models.documents_single_post_response_data_relationships_derived_from import ( + DocumentsSinglePostResponseDataRelationshipsDerivedFrom, + ) + from ..models.documents_single_post_response_data_relationships_project import ( + DocumentsSinglePostResponseDataRelationshipsProject, + ) + from ..models.documents_single_post_response_data_relationships_updated_by import ( + DocumentsSinglePostResponseDataRelationshipsUpdatedBy, + ) + from ..models.documents_single_post_response_data_relationships_variant import ( + DocumentsSinglePostResponseDataRelationshipsVariant, + ) + + +T = TypeVar("T", bound="DocumentsSinglePostResponseDataRelationships") + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationships: + """ + Attributes: + attachments (Union[Unset, DocumentsSinglePostResponseDataRelationshipsAttachments]): + author (Union[Unset, DocumentsSinglePostResponseDataRelationshipsAuthor]): + branched_from (Union[Unset, DocumentsSinglePostResponseDataRelationshipsBranchedFrom]): + comments (Union[Unset, DocumentsSinglePostResponseDataRelationshipsComments]): + derived_from (Union[Unset, DocumentsSinglePostResponseDataRelationshipsDerivedFrom]): + project (Union[Unset, DocumentsSinglePostResponseDataRelationshipsProject]): + updated_by (Union[Unset, DocumentsSinglePostResponseDataRelationshipsUpdatedBy]): + variant (Union[Unset, DocumentsSinglePostResponseDataRelationshipsVariant]): + """ + + attachments: Union[ + Unset, "DocumentsSinglePostResponseDataRelationshipsAttachments" + ] = UNSET + author: Union[ + Unset, "DocumentsSinglePostResponseDataRelationshipsAuthor" + ] = UNSET + branched_from: Union[ + Unset, "DocumentsSinglePostResponseDataRelationshipsBranchedFrom" + ] = UNSET + comments: Union[ + Unset, "DocumentsSinglePostResponseDataRelationshipsComments" + ] = UNSET + derived_from: Union[ + Unset, "DocumentsSinglePostResponseDataRelationshipsDerivedFrom" + ] = UNSET + project: Union[ + Unset, "DocumentsSinglePostResponseDataRelationshipsProject" + ] = UNSET + updated_by: Union[ + Unset, "DocumentsSinglePostResponseDataRelationshipsUpdatedBy" + ] = UNSET + variant: Union[ + Unset, "DocumentsSinglePostResponseDataRelationshipsVariant" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + attachments: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attachments, Unset): + attachments = self.attachments.to_dict() + + author: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.author, Unset): + author = self.author.to_dict() + + branched_from: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.branched_from, Unset): + branched_from = self.branched_from.to_dict() + + comments: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.comments, Unset): + comments = self.comments.to_dict() + + derived_from: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.derived_from, Unset): + derived_from = self.derived_from.to_dict() + + project: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project, Unset): + project = self.project.to_dict() + + updated_by: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.updated_by, Unset): + updated_by = self.updated_by.to_dict() + + variant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.variant, Unset): + variant = self.variant.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attachments is not UNSET: + field_dict["attachments"] = attachments + if author is not UNSET: + field_dict["author"] = author + if branched_from is not UNSET: + field_dict["branchedFrom"] = branched_from + if comments is not UNSET: + field_dict["comments"] = comments + if derived_from is not UNSET: + field_dict["derivedFrom"] = derived_from + if project is not UNSET: + field_dict["project"] = project + if updated_by is not UNSET: + field_dict["updatedBy"] = updated_by + if variant is not UNSET: + field_dict["variant"] = variant + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.documents_single_post_response_data_relationships_attachments import ( + DocumentsSinglePostResponseDataRelationshipsAttachments, + ) + from ..models.documents_single_post_response_data_relationships_author import ( + DocumentsSinglePostResponseDataRelationshipsAuthor, + ) + from ..models.documents_single_post_response_data_relationships_branched_from import ( + DocumentsSinglePostResponseDataRelationshipsBranchedFrom, + ) + from ..models.documents_single_post_response_data_relationships_comments import ( + DocumentsSinglePostResponseDataRelationshipsComments, + ) + from ..models.documents_single_post_response_data_relationships_derived_from import ( + DocumentsSinglePostResponseDataRelationshipsDerivedFrom, + ) + from ..models.documents_single_post_response_data_relationships_project import ( + DocumentsSinglePostResponseDataRelationshipsProject, + ) + from ..models.documents_single_post_response_data_relationships_updated_by import ( + DocumentsSinglePostResponseDataRelationshipsUpdatedBy, + ) + from ..models.documents_single_post_response_data_relationships_variant import ( + DocumentsSinglePostResponseDataRelationshipsVariant, + ) + + d = src_dict.copy() + _attachments = d.pop("attachments", UNSET) + attachments: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsAttachments + ] + if isinstance(_attachments, Unset): + attachments = UNSET + else: + attachments = DocumentsSinglePostResponseDataRelationshipsAttachments.from_dict( + _attachments + ) + + _author = d.pop("author", UNSET) + author: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsAuthor + ] + if isinstance(_author, Unset): + author = UNSET + else: + author = ( + DocumentsSinglePostResponseDataRelationshipsAuthor.from_dict( + _author + ) + ) + + _branched_from = d.pop("branchedFrom", UNSET) + branched_from: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsBranchedFrom + ] + if isinstance(_branched_from, Unset): + branched_from = UNSET + else: + branched_from = DocumentsSinglePostResponseDataRelationshipsBranchedFrom.from_dict( + _branched_from + ) + + _comments = d.pop("comments", UNSET) + comments: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsComments + ] + if isinstance(_comments, Unset): + comments = UNSET + else: + comments = ( + DocumentsSinglePostResponseDataRelationshipsComments.from_dict( + _comments + ) + ) + + _derived_from = d.pop("derivedFrom", UNSET) + derived_from: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsDerivedFrom + ] + if isinstance(_derived_from, Unset): + derived_from = UNSET + else: + derived_from = DocumentsSinglePostResponseDataRelationshipsDerivedFrom.from_dict( + _derived_from + ) + + _project = d.pop("project", UNSET) + project: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsProject + ] + if isinstance(_project, Unset): + project = UNSET + else: + project = ( + DocumentsSinglePostResponseDataRelationshipsProject.from_dict( + _project + ) + ) + + _updated_by = d.pop("updatedBy", UNSET) + updated_by: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsUpdatedBy + ] + if isinstance(_updated_by, Unset): + updated_by = UNSET + else: + updated_by = DocumentsSinglePostResponseDataRelationshipsUpdatedBy.from_dict( + _updated_by + ) + + _variant = d.pop("variant", UNSET) + variant: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsVariant + ] + if isinstance(_variant, Unset): + variant = UNSET + else: + variant = ( + DocumentsSinglePostResponseDataRelationshipsVariant.from_dict( + _variant + ) + ) + + documents_single_post_response_data_relationships_obj = cls( + attachments=attachments, + author=author, + branched_from=branched_from, + comments=comments, + derived_from=derived_from, + project=project, + updated_by=updated_by, + variant=variant, + ) + + documents_single_post_response_data_relationships_obj.additional_properties = ( + d + ) + return documents_single_post_response_data_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_attachments.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_attachments.py new file mode 100644 index 00000000..980a96f7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_attachments.py @@ -0,0 +1,126 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.documents_single_post_response_data_relationships_attachments_data_item import ( + DocumentsSinglePostResponseDataRelationshipsAttachmentsDataItem, + ) + from ..models.documents_single_post_response_data_relationships_attachments_links import ( + DocumentsSinglePostResponseDataRelationshipsAttachmentsLinks, + ) + + +T = TypeVar( + "T", bound="DocumentsSinglePostResponseDataRelationshipsAttachments" +) + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationshipsAttachments: + """ + Attributes: + data (Union[Unset, List['DocumentsSinglePostResponseDataRelationshipsAttachmentsDataItem']]): + links (Union[Unset, DocumentsSinglePostResponseDataRelationshipsAttachmentsLinks]): + """ + + data: Union[ + Unset, + List[ + "DocumentsSinglePostResponseDataRelationshipsAttachmentsDataItem" + ], + ] = UNSET + links: Union[ + Unset, "DocumentsSinglePostResponseDataRelationshipsAttachmentsLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.documents_single_post_response_data_relationships_attachments_data_item import ( + DocumentsSinglePostResponseDataRelationshipsAttachmentsDataItem, + ) + from ..models.documents_single_post_response_data_relationships_attachments_links import ( + DocumentsSinglePostResponseDataRelationshipsAttachmentsLinks, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = DocumentsSinglePostResponseDataRelationshipsAttachmentsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _links = d.pop("links", UNSET) + links: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsAttachmentsLinks + ] + if isinstance(_links, Unset): + links = UNSET + else: + links = DocumentsSinglePostResponseDataRelationshipsAttachmentsLinks.from_dict( + _links + ) + + documents_single_post_response_data_relationships_attachments_obj = ( + cls( + data=data, + links=links, + ) + ) + + documents_single_post_response_data_relationships_attachments_obj.additional_properties = ( + d + ) + return ( + documents_single_post_response_data_relationships_attachments_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_attachments_data_item.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_attachments_data_item.py new file mode 100644 index 00000000..1a80aa4f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_attachments_data_item.py @@ -0,0 +1,95 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.documents_single_post_response_data_relationships_attachments_data_item_type import ( + DocumentsSinglePostResponseDataRelationshipsAttachmentsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="DocumentsSinglePostResponseDataRelationshipsAttachmentsDataItem", +) + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationshipsAttachmentsDataItem: + """ + Attributes: + type (Union[Unset, DocumentsSinglePostResponseDataRelationshipsAttachmentsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/MyAttachmentId. + """ + + type: Union[ + Unset, + DocumentsSinglePostResponseDataRelationshipsAttachmentsDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + DocumentsSinglePostResponseDataRelationshipsAttachmentsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = DocumentsSinglePostResponseDataRelationshipsAttachmentsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + documents_single_post_response_data_relationships_attachments_data_item_obj = cls( + type=type, + id=id, + ) + + documents_single_post_response_data_relationships_attachments_data_item_obj.additional_properties = ( + d + ) + return documents_single_post_response_data_relationships_attachments_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_attachments_data_item_type.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_attachments_data_item_type.py new file mode 100644 index 00000000..27ef5cf3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_attachments_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class DocumentsSinglePostResponseDataRelationshipsAttachmentsDataItemType( + str, Enum +): + DOCUMENT_ATTACHMENTS = "document_attachments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_attachments_links.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_attachments_links.py new file mode 100644 index 00000000..1c8a971e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_attachments_links.py @@ -0,0 +1,68 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="DocumentsSinglePostResponseDataRelationshipsAttachmentsLinks" +) + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationshipsAttachmentsLinks: + """ + Attributes: + related (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/attachments?revision=1234. + """ + + related: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + related = self.related + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if related is not UNSET: + field_dict["related"] = related + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + related = d.pop("related", UNSET) + + documents_single_post_response_data_relationships_attachments_links_obj = cls( + related=related, + ) + + documents_single_post_response_data_relationships_attachments_links_obj.additional_properties = ( + d + ) + return documents_single_post_response_data_relationships_attachments_links_obj + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_author.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_author.py new file mode 100644 index 00000000..bb64e2e7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_author.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.documents_single_post_response_data_relationships_author_data import ( + DocumentsSinglePostResponseDataRelationshipsAuthorData, + ) + + +T = TypeVar("T", bound="DocumentsSinglePostResponseDataRelationshipsAuthor") + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationshipsAuthor: + """ + Attributes: + data (Union[Unset, DocumentsSinglePostResponseDataRelationshipsAuthorData]): + """ + + data: Union[ + Unset, "DocumentsSinglePostResponseDataRelationshipsAuthorData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.documents_single_post_response_data_relationships_author_data import ( + DocumentsSinglePostResponseDataRelationshipsAuthorData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsAuthorData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = DocumentsSinglePostResponseDataRelationshipsAuthorData.from_dict( + _data + ) + + documents_single_post_response_data_relationships_author_obj = cls( + data=data, + ) + + documents_single_post_response_data_relationships_author_obj.additional_properties = ( + d + ) + return documents_single_post_response_data_relationships_author_obj + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_author_data.py new file mode 100644 index 00000000..01010d5f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_author_data.py @@ -0,0 +1,96 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.documents_single_post_response_data_relationships_author_data_type import ( + DocumentsSinglePostResponseDataRelationshipsAuthorDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="DocumentsSinglePostResponseDataRelationshipsAuthorData" +) + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationshipsAuthorData: + """ + Attributes: + type (Union[Unset, DocumentsSinglePostResponseDataRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + """ + + type: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsAuthorDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsAuthorDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = DocumentsSinglePostResponseDataRelationshipsAuthorDataType( + _type + ) + + id = d.pop("id", UNSET) + + documents_single_post_response_data_relationships_author_data_obj = ( + cls( + type=type, + id=id, + ) + ) + + documents_single_post_response_data_relationships_author_data_obj.additional_properties = ( + d + ) + return ( + documents_single_post_response_data_relationships_author_data_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_author_data_type.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_author_data_type.py new file mode 100644 index 00000000..d87d8a48 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_author_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class DocumentsSinglePostResponseDataRelationshipsAuthorDataType(str, Enum): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_branched_from.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_branched_from.py new file mode 100644 index 00000000..a6f44234 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_branched_from.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.documents_single_post_response_data_relationships_branched_from_data import ( + DocumentsSinglePostResponseDataRelationshipsBranchedFromData, + ) + + +T = TypeVar( + "T", bound="DocumentsSinglePostResponseDataRelationshipsBranchedFrom" +) + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationshipsBranchedFrom: + """ + Attributes: + data (Union[Unset, DocumentsSinglePostResponseDataRelationshipsBranchedFromData]): + """ + + data: Union[ + Unset, "DocumentsSinglePostResponseDataRelationshipsBranchedFromData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.documents_single_post_response_data_relationships_branched_from_data import ( + DocumentsSinglePostResponseDataRelationshipsBranchedFromData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsBranchedFromData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = DocumentsSinglePostResponseDataRelationshipsBranchedFromData.from_dict( + _data + ) + + documents_single_post_response_data_relationships_branched_from_obj = ( + cls( + data=data, + ) + ) + + documents_single_post_response_data_relationships_branched_from_obj.additional_properties = ( + d + ) + return ( + documents_single_post_response_data_relationships_branched_from_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_branched_from_data.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_branched_from_data.py new file mode 100644 index 00000000..734ea609 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_branched_from_data.py @@ -0,0 +1,93 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.documents_single_post_response_data_relationships_branched_from_data_type import ( + DocumentsSinglePostResponseDataRelationshipsBranchedFromDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="DocumentsSinglePostResponseDataRelationshipsBranchedFromData" +) + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationshipsBranchedFromData: + """ + Attributes: + type (Union[Unset, DocumentsSinglePostResponseDataRelationshipsBranchedFromDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId. + """ + + type: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsBranchedFromDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + DocumentsSinglePostResponseDataRelationshipsBranchedFromDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = DocumentsSinglePostResponseDataRelationshipsBranchedFromDataType( + _type + ) + + id = d.pop("id", UNSET) + + documents_single_post_response_data_relationships_branched_from_data_obj = cls( + type=type, + id=id, + ) + + documents_single_post_response_data_relationships_branched_from_data_obj.additional_properties = ( + d + ) + return documents_single_post_response_data_relationships_branched_from_data_obj + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_branched_from_data_type.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_branched_from_data_type.py new file mode 100644 index 00000000..2a8b7712 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_branched_from_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class DocumentsSinglePostResponseDataRelationshipsBranchedFromDataType( + str, Enum +): + DOCUMENTS = "documents" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_comments.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_comments.py new file mode 100644 index 00000000..28aecee5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_comments.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.documents_single_post_response_data_relationships_comments_data_item import ( + DocumentsSinglePostResponseDataRelationshipsCommentsDataItem, + ) + from ..models.documents_single_post_response_data_relationships_comments_links import ( + DocumentsSinglePostResponseDataRelationshipsCommentsLinks, + ) + + +T = TypeVar("T", bound="DocumentsSinglePostResponseDataRelationshipsComments") + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationshipsComments: + """ + Attributes: + data (Union[Unset, List['DocumentsSinglePostResponseDataRelationshipsCommentsDataItem']]): + links (Union[Unset, DocumentsSinglePostResponseDataRelationshipsCommentsLinks]): + """ + + data: Union[ + Unset, + List["DocumentsSinglePostResponseDataRelationshipsCommentsDataItem"], + ] = UNSET + links: Union[ + Unset, "DocumentsSinglePostResponseDataRelationshipsCommentsLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.documents_single_post_response_data_relationships_comments_data_item import ( + DocumentsSinglePostResponseDataRelationshipsCommentsDataItem, + ) + from ..models.documents_single_post_response_data_relationships_comments_links import ( + DocumentsSinglePostResponseDataRelationshipsCommentsLinks, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = DocumentsSinglePostResponseDataRelationshipsCommentsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _links = d.pop("links", UNSET) + links: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsCommentsLinks + ] + if isinstance(_links, Unset): + links = UNSET + else: + links = DocumentsSinglePostResponseDataRelationshipsCommentsLinks.from_dict( + _links + ) + + documents_single_post_response_data_relationships_comments_obj = cls( + data=data, + links=links, + ) + + documents_single_post_response_data_relationships_comments_obj.additional_properties = ( + d + ) + return documents_single_post_response_data_relationships_comments_obj + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_comments_data_item.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_comments_data_item.py new file mode 100644 index 00000000..0d9dddfe --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_comments_data_item.py @@ -0,0 +1,93 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.documents_single_post_response_data_relationships_comments_data_item_type import ( + DocumentsSinglePostResponseDataRelationshipsCommentsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="DocumentsSinglePostResponseDataRelationshipsCommentsDataItem" +) + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationshipsCommentsDataItem: + """ + Attributes: + type (Union[Unset, DocumentsSinglePostResponseDataRelationshipsCommentsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/MyCommentId. + """ + + type: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsCommentsDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + DocumentsSinglePostResponseDataRelationshipsCommentsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = DocumentsSinglePostResponseDataRelationshipsCommentsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + documents_single_post_response_data_relationships_comments_data_item_obj = cls( + type=type, + id=id, + ) + + documents_single_post_response_data_relationships_comments_data_item_obj.additional_properties = ( + d + ) + return documents_single_post_response_data_relationships_comments_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_comments_data_item_type.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_comments_data_item_type.py new file mode 100644 index 00000000..a777c3b1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_comments_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class DocumentsSinglePostResponseDataRelationshipsCommentsDataItemType( + str, Enum +): + DOCUMENT_COMMENTS = "document_comments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_comments_links.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_comments_links.py new file mode 100644 index 00000000..8370c86e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_comments_links.py @@ -0,0 +1,68 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="DocumentsSinglePostResponseDataRelationshipsCommentsLinks" +) + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationshipsCommentsLinks: + """ + Attributes: + related (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/documents/MyDocumentId/comments?revision=1234. + """ + + related: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + related = self.related + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if related is not UNSET: + field_dict["related"] = related + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + related = d.pop("related", UNSET) + + documents_single_post_response_data_relationships_comments_links_obj = cls( + related=related, + ) + + documents_single_post_response_data_relationships_comments_links_obj.additional_properties = ( + d + ) + return documents_single_post_response_data_relationships_comments_links_obj + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_derived_from.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_derived_from.py new file mode 100644 index 00000000..fdef3178 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_derived_from.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.documents_single_post_response_data_relationships_derived_from_data import ( + DocumentsSinglePostResponseDataRelationshipsDerivedFromData, + ) + + +T = TypeVar( + "T", bound="DocumentsSinglePostResponseDataRelationshipsDerivedFrom" +) + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationshipsDerivedFrom: + """ + Attributes: + data (Union[Unset, DocumentsSinglePostResponseDataRelationshipsDerivedFromData]): + """ + + data: Union[ + Unset, "DocumentsSinglePostResponseDataRelationshipsDerivedFromData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.documents_single_post_response_data_relationships_derived_from_data import ( + DocumentsSinglePostResponseDataRelationshipsDerivedFromData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsDerivedFromData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = DocumentsSinglePostResponseDataRelationshipsDerivedFromData.from_dict( + _data + ) + + documents_single_post_response_data_relationships_derived_from_obj = ( + cls( + data=data, + ) + ) + + documents_single_post_response_data_relationships_derived_from_obj.additional_properties = ( + d + ) + return ( + documents_single_post_response_data_relationships_derived_from_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_derived_from_data.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_derived_from_data.py new file mode 100644 index 00000000..f9d7e518 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_derived_from_data.py @@ -0,0 +1,93 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.documents_single_post_response_data_relationships_derived_from_data_type import ( + DocumentsSinglePostResponseDataRelationshipsDerivedFromDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="DocumentsSinglePostResponseDataRelationshipsDerivedFromData" +) + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationshipsDerivedFromData: + """ + Attributes: + type (Union[Unset, DocumentsSinglePostResponseDataRelationshipsDerivedFromDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId. + """ + + type: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsDerivedFromDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + DocumentsSinglePostResponseDataRelationshipsDerivedFromDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = DocumentsSinglePostResponseDataRelationshipsDerivedFromDataType( + _type + ) + + id = d.pop("id", UNSET) + + documents_single_post_response_data_relationships_derived_from_data_obj = cls( + type=type, + id=id, + ) + + documents_single_post_response_data_relationships_derived_from_data_obj.additional_properties = ( + d + ) + return documents_single_post_response_data_relationships_derived_from_data_obj + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_derived_from_data_type.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_derived_from_data_type.py new file mode 100644 index 00000000..7bcf399b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_derived_from_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class DocumentsSinglePostResponseDataRelationshipsDerivedFromDataType( + str, Enum +): + DOCUMENTS = "documents" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_project.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_project.py new file mode 100644 index 00000000..30b1acf5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_project.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.documents_single_post_response_data_relationships_project_data import ( + DocumentsSinglePostResponseDataRelationshipsProjectData, + ) + + +T = TypeVar("T", bound="DocumentsSinglePostResponseDataRelationshipsProject") + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationshipsProject: + """ + Attributes: + data (Union[Unset, DocumentsSinglePostResponseDataRelationshipsProjectData]): + """ + + data: Union[ + Unset, "DocumentsSinglePostResponseDataRelationshipsProjectData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.documents_single_post_response_data_relationships_project_data import ( + DocumentsSinglePostResponseDataRelationshipsProjectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsProjectData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = DocumentsSinglePostResponseDataRelationshipsProjectData.from_dict( + _data + ) + + documents_single_post_response_data_relationships_project_obj = cls( + data=data, + ) + + documents_single_post_response_data_relationships_project_obj.additional_properties = ( + d + ) + return documents_single_post_response_data_relationships_project_obj + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_project_data.py new file mode 100644 index 00000000..b405eb63 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_project_data.py @@ -0,0 +1,96 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.documents_single_post_response_data_relationships_project_data_type import ( + DocumentsSinglePostResponseDataRelationshipsProjectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="DocumentsSinglePostResponseDataRelationshipsProjectData" +) + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationshipsProjectData: + """ + Attributes: + type (Union[Unset, DocumentsSinglePostResponseDataRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + """ + + type: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsProjectDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsProjectDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = DocumentsSinglePostResponseDataRelationshipsProjectDataType( + _type + ) + + id = d.pop("id", UNSET) + + documents_single_post_response_data_relationships_project_data_obj = ( + cls( + type=type, + id=id, + ) + ) + + documents_single_post_response_data_relationships_project_data_obj.additional_properties = ( + d + ) + return ( + documents_single_post_response_data_relationships_project_data_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_project_data_type.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_project_data_type.py new file mode 100644 index 00000000..78f36908 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_project_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class DocumentsSinglePostResponseDataRelationshipsProjectDataType(str, Enum): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_updated_by.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_updated_by.py new file mode 100644 index 00000000..0451a8e8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_updated_by.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.documents_single_post_response_data_relationships_updated_by_data import ( + DocumentsSinglePostResponseDataRelationshipsUpdatedByData, + ) + + +T = TypeVar("T", bound="DocumentsSinglePostResponseDataRelationshipsUpdatedBy") + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationshipsUpdatedBy: + """ + Attributes: + data (Union[Unset, DocumentsSinglePostResponseDataRelationshipsUpdatedByData]): + """ + + data: Union[ + Unset, "DocumentsSinglePostResponseDataRelationshipsUpdatedByData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.documents_single_post_response_data_relationships_updated_by_data import ( + DocumentsSinglePostResponseDataRelationshipsUpdatedByData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsUpdatedByData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = DocumentsSinglePostResponseDataRelationshipsUpdatedByData.from_dict( + _data + ) + + documents_single_post_response_data_relationships_updated_by_obj = cls( + data=data, + ) + + documents_single_post_response_data_relationships_updated_by_obj.additional_properties = ( + d + ) + return documents_single_post_response_data_relationships_updated_by_obj + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_updated_by_data.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_updated_by_data.py new file mode 100644 index 00000000..308b2509 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_updated_by_data.py @@ -0,0 +1,95 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.documents_single_post_response_data_relationships_updated_by_data_type import ( + DocumentsSinglePostResponseDataRelationshipsUpdatedByDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="DocumentsSinglePostResponseDataRelationshipsUpdatedByData" +) + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationshipsUpdatedByData: + """ + Attributes: + type (Union[Unset, DocumentsSinglePostResponseDataRelationshipsUpdatedByDataType]): + id (Union[Unset, str]): Example: MyUserId. + """ + + type: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsUpdatedByDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + DocumentsSinglePostResponseDataRelationshipsUpdatedByDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + DocumentsSinglePostResponseDataRelationshipsUpdatedByDataType( + _type + ) + ) + + id = d.pop("id", UNSET) + + documents_single_post_response_data_relationships_updated_by_data_obj = cls( + type=type, + id=id, + ) + + documents_single_post_response_data_relationships_updated_by_data_obj.additional_properties = ( + d + ) + return documents_single_post_response_data_relationships_updated_by_data_obj + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_updated_by_data_type.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_updated_by_data_type.py new file mode 100644 index 00000000..702ad96c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_updated_by_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class DocumentsSinglePostResponseDataRelationshipsUpdatedByDataType(str, Enum): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_variant.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_variant.py new file mode 100644 index 00000000..42ea6691 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_variant.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.documents_single_post_response_data_relationships_variant_data import ( + DocumentsSinglePostResponseDataRelationshipsVariantData, + ) + + +T = TypeVar("T", bound="DocumentsSinglePostResponseDataRelationshipsVariant") + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationshipsVariant: + """ + Attributes: + data (Union[Unset, DocumentsSinglePostResponseDataRelationshipsVariantData]): + """ + + data: Union[ + Unset, "DocumentsSinglePostResponseDataRelationshipsVariantData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.documents_single_post_response_data_relationships_variant_data import ( + DocumentsSinglePostResponseDataRelationshipsVariantData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsVariantData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = DocumentsSinglePostResponseDataRelationshipsVariantData.from_dict( + _data + ) + + documents_single_post_response_data_relationships_variant_obj = cls( + data=data, + ) + + documents_single_post_response_data_relationships_variant_obj.additional_properties = ( + d + ) + return documents_single_post_response_data_relationships_variant_obj + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_variant_data.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_variant_data.py new file mode 100644 index 00000000..f35b5384 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_variant_data.py @@ -0,0 +1,96 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.documents_single_post_response_data_relationships_variant_data_type import ( + DocumentsSinglePostResponseDataRelationshipsVariantDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="DocumentsSinglePostResponseDataRelationshipsVariantData" +) + + +@_attrs_define +class DocumentsSinglePostResponseDataRelationshipsVariantData: + """ + Attributes: + type (Union[Unset, DocumentsSinglePostResponseDataRelationshipsVariantDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + """ + + type: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsVariantDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, DocumentsSinglePostResponseDataRelationshipsVariantDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = DocumentsSinglePostResponseDataRelationshipsVariantDataType( + _type + ) + + id = d.pop("id", UNSET) + + documents_single_post_response_data_relationships_variant_data_obj = ( + cls( + type=type, + id=id, + ) + ) + + documents_single_post_response_data_relationships_variant_data_obj.additional_properties = ( + d + ) + return ( + documents_single_post_response_data_relationships_variant_data_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_variant_data_type.py b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_variant_data_type.py new file mode 100644 index 00000000..30733d7b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/documents_single_post_response_data_relationships_variant_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class DocumentsSinglePostResponseDataRelationshipsVariantDataType(str, Enum): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/enum_options_action_response_body.py b/polarion_rest_api_client/open_api_client/models/enum_options_action_response_body.py index 8fa283d2..a13ee376 100644 --- a/polarion_rest_api_client/open_api_client/models/enum_options_action_response_body.py +++ b/polarion_rest_api_client/open_api_client/models/enum_options_action_response_body.py @@ -26,11 +26,10 @@ @_attrs_define class EnumOptionsActionResponseBody: """ - Attributes - ---------- - meta : Union[Unset, EnumOptionsActionResponseBodyMeta] - data : Union[Unset, List['EnumOptionsActionResponseBodyDataItem']] - links : Union[Unset, EnumOptionsActionResponseBodyLinks] + Attributes: + meta (Union[Unset, EnumOptionsActionResponseBodyMeta]): + data (Union[Unset, List['EnumOptionsActionResponseBodyDataItem']]): + links (Union[Unset, EnumOptionsActionResponseBodyLinks]): """ meta: Union[Unset, "EnumOptionsActionResponseBodyMeta"] = UNSET @@ -50,7 +49,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/enum_options_action_response_body_data_item.py b/polarion_rest_api_client/open_api_client/models/enum_options_action_response_body_data_item.py index 284ba2f0..1eb2d64f 100644 --- a/polarion_rest_api_client/open_api_client/models/enum_options_action_response_body_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/enum_options_action_response_body_data_item.py @@ -14,23 +14,22 @@ @_attrs_define class EnumOptionsActionResponseBodyDataItem: """ - Attributes - ---------- - id : Union[Unset, str] - name : Union[Unset, str] - color : Union[Unset, str] - description : Union[Unset, str] - hidden : Union[Unset, bool] - default : Union[Unset, bool] - parent : Union[Unset, bool] - opposite_name : Union[Unset, str] - column_width : Union[Unset, str] - icon_url : Union[Unset, str] - create_defect : Union[Unset, bool] - template_work_item : Union[Unset, str] - min_value : Union[Unset, float] - requires_signature_for_test_case_execution : Union[Unset, bool] - terminal : Union[Unset, bool] + Attributes: + id (Union[Unset, str]): Example: open. + name (Union[Unset, str]): Example: Open. + color (Union[Unset, str]): Example: #F9FF4D. + description (Union[Unset, str]): Example: Description. + hidden (Union[Unset, bool]): + default (Union[Unset, bool]): Example: True. + parent (Union[Unset, bool]): Example: True. + opposite_name (Union[Unset, str]): Example: Opposite Name. + column_width (Union[Unset, str]): Example: 90%. + icon_url (Union[Unset, str]): Example: /polarion/icons/default/enums/status_open.gif. + create_defect (Union[Unset, bool]): Example: True. + template_work_item (Union[Unset, str]): Example: exampleTemplate. + min_value (Union[Unset, float]): Example: 30.0. + requires_signature_for_test_case_execution (Union[Unset, bool]): Example: True. + terminal (Union[Unset, bool]): Example: True. """ id: Union[Unset, str] = UNSET @@ -54,21 +53,35 @@ class EnumOptionsActionResponseBodyDataItem: def to_dict(self) -> Dict[str, Any]: id = self.id + name = self.name + color = self.color + description = self.description + hidden = self.hidden + default = self.default + parent = self.parent + opposite_name = self.opposite_name + column_width = self.column_width + icon_url = self.icon_url + create_defect = self.create_defect + template_work_item = self.template_work_item + min_value = self.min_value + requires_signature_for_test_case_execution = ( self.requires_signature_for_test_case_execution ) + terminal = self.terminal field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/enum_options_action_response_body_links.py b/polarion_rest_api_client/open_api_client/models/enum_options_action_response_body_links.py index b81bc707..0cad0dff 100644 --- a/polarion_rest_api_client/open_api_client/models/enum_options_action_response_body_links.py +++ b/polarion_rest_api_client/open_api_client/models/enum_options_action_response_body_links.py @@ -14,13 +14,17 @@ @_attrs_define class EnumOptionsActionResponseBodyLinks: """ - Attributes - ---------- - first : Union[Unset, str] - prev : Union[Unset, str] - next_ : Union[Unset, str] - last : Union[Unset, str] - self_ : Union[Unset, str] + Attributes: + first (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/.../fields/MyField/actions/actionName?page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/.../fields/MyField/actions/actionName?page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/.../fields/MyField/actions/actionName?page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/.../fields/MyField/actions/actionName?page%5Bnumber%5D=9. + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/.../fields/MyField/actions/actionName?page%5Bsize%5D=10&page%5Bnumber%5D=5. """ first: Union[Unset, str] = UNSET @@ -34,9 +38,13 @@ class EnumOptionsActionResponseBodyLinks: def to_dict(self) -> Dict[str, Any]: first = self.first + prev = self.prev + next_ = self.next_ + last = self.last + self_ = self.self_ field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/enum_options_action_response_body_meta.py b/polarion_rest_api_client/open_api_client/models/enum_options_action_response_body_meta.py index 1a11f3fe..607b6c5f 100644 --- a/polarion_rest_api_client/open_api_client/models/enum_options_action_response_body_meta.py +++ b/polarion_rest_api_client/open_api_client/models/enum_options_action_response_body_meta.py @@ -14,9 +14,8 @@ @_attrs_define class EnumOptionsActionResponseBodyMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_list_post_request.py b/polarion_rest_api_client/open_api_client/models/enumerations_list_post_request.py index 8f43e40f..46ad34a8 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_list_post_request.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_list_post_request.py @@ -20,9 +20,8 @@ @_attrs_define class EnumerationsListPostRequest: """ - Attributes - ---------- - data : Union[Unset, List['EnumerationsListPostRequestDataItem']] + Attributes: + data (Union[Unset, List['EnumerationsListPostRequestDataItem']]): """ data: Union[Unset, List["EnumerationsListPostRequestDataItem"]] = UNSET @@ -36,7 +35,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/enumerations_list_post_request_data_item.py index bf6383a4..f3050faa 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_list_post_request_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_list_post_request_data_item.py @@ -23,10 +23,9 @@ @_attrs_define class EnumerationsListPostRequestDataItem: """ - Attributes - ---------- - type : Union[Unset, EnumerationsListPostRequestDataItemType] - attributes : Union[Unset, EnumerationsListPostRequestDataItemAttributes] + Attributes: + type (Union[Unset, EnumerationsListPostRequestDataItemType]): + attributes (Union[Unset, EnumerationsListPostRequestDataItemAttributes]): """ type: Union[Unset, EnumerationsListPostRequestDataItemType] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/enumerations_list_post_request_data_item_attributes.py index debcc83d..027d51aa 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_list_post_request_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_list_post_request_data_item_attributes.py @@ -20,12 +20,11 @@ @_attrs_define class EnumerationsListPostRequestDataItemAttributes: """ - Attributes - ---------- - enum_context : Union[Unset, str] - enum_name : Union[Unset, str] - options : Union[Unset, List['EnumerationsListPostRequestDataItemAttributesOptionsItem']] - target_type : Union[Unset, str] + Attributes: + enum_context (Union[Unset, str]): Example: id. + enum_name (Union[Unset, str]): Example: id. + options (Union[Unset, List['EnumerationsListPostRequestDataItemAttributesOptionsItem']]): + target_type (Union[Unset, str]): Example: id. """ enum_context: Union[Unset, str] = UNSET @@ -40,13 +39,14 @@ class EnumerationsListPostRequestDataItemAttributes: def to_dict(self) -> Dict[str, Any]: enum_context = self.enum_context + enum_name = self.enum_name + options: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.options, Unset): options = [] for options_item_data in self.options: options_item = options_item_data.to_dict() - options.append(options_item) target_type = self.target_type diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_list_post_request_data_item_attributes_options_item.py b/polarion_rest_api_client/open_api_client/models/enumerations_list_post_request_data_item_attributes_options_item.py index ce778291..e43732ed 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_list_post_request_data_item_attributes_options_item.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_list_post_request_data_item_attributes_options_item.py @@ -16,23 +16,22 @@ @_attrs_define class EnumerationsListPostRequestDataItemAttributesOptionsItem: """ - Attributes - ---------- - id : Union[Unset, str] - name : Union[Unset, str] - color : Union[Unset, str] - description : Union[Unset, str] - hidden : Union[Unset, bool] - default : Union[Unset, bool] - parent : Union[Unset, bool] - opposite_name : Union[Unset, str] - column_width : Union[Unset, str] - icon_url : Union[Unset, str] - create_defect : Union[Unset, bool] - template_work_item : Union[Unset, str] - min_value : Union[Unset, float] - requires_signature_for_test_case_execution : Union[Unset, bool] - terminal : Union[Unset, bool] + Attributes: + id (Union[Unset, str]): Example: open. + name (Union[Unset, str]): Example: Open. + color (Union[Unset, str]): Example: #F9FF4D. + description (Union[Unset, str]): Example: Description. + hidden (Union[Unset, bool]): + default (Union[Unset, bool]): Example: True. + parent (Union[Unset, bool]): Example: True. + opposite_name (Union[Unset, str]): Example: Opposite Name. + column_width (Union[Unset, str]): Example: 90%. + icon_url (Union[Unset, str]): Example: /polarion/icons/default/enums/status_open.gif. + create_defect (Union[Unset, bool]): Example: True. + template_work_item (Union[Unset, str]): Example: exampleTemplate. + min_value (Union[Unset, float]): Example: 30.0. + requires_signature_for_test_case_execution (Union[Unset, bool]): Example: True. + terminal (Union[Unset, bool]): Example: True. """ id: Union[Unset, str] = UNSET @@ -56,21 +55,35 @@ class EnumerationsListPostRequestDataItemAttributesOptionsItem: def to_dict(self) -> Dict[str, Any]: id = self.id + name = self.name + color = self.color + description = self.description + hidden = self.hidden + default = self.default + parent = self.parent + opposite_name = self.opposite_name + column_width = self.column_width + icon_url = self.icon_url + create_defect = self.create_defect + template_work_item = self.template_work_item + min_value = self.min_value + requires_signature_for_test_case_execution = ( self.requires_signature_for_test_case_execution ) + terminal = self.terminal field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_list_post_response.py b/polarion_rest_api_client/open_api_client/models/enumerations_list_post_response.py index 4f2b0e94..476c68ee 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_list_post_response.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_list_post_response.py @@ -20,9 +20,8 @@ @_attrs_define class EnumerationsListPostResponse: """ - Attributes - ---------- - data : Union[Unset, List['EnumerationsListPostResponseDataItem']] + Attributes: + data (Union[Unset, List['EnumerationsListPostResponseDataItem']]): """ data: Union[Unset, List["EnumerationsListPostResponseDataItem"]] = UNSET @@ -36,7 +35,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/enumerations_list_post_response_data_item.py index e7ce55bb..7f7f2470 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_list_post_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_list_post_response_data_item.py @@ -23,11 +23,10 @@ @_attrs_define class EnumerationsListPostResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, EnumerationsListPostResponseDataItemType] - id : Union[Unset, str] - links : Union[Unset, EnumerationsListPostResponseDataItemLinks] + Attributes: + type (Union[Unset, EnumerationsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: ~/status/~. + links (Union[Unset, EnumerationsListPostResponseDataItemLinks]): """ type: Union[Unset, EnumerationsListPostResponseDataItemType] = UNSET @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + links: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/enumerations_list_post_response_data_item_links.py index 92e2876c..45aa1fbb 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_list_post_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_list_post_response_data_item_links.py @@ -14,9 +14,8 @@ @_attrs_define class EnumerationsListPostResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/enumerations/%7E/status/%7E. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response.py b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response.py index 27b7ef0f..401589ef 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response.py @@ -26,13 +26,12 @@ @_attrs_define class EnumerationsSingleGetResponse: """ - Attributes - ---------- - data : Union[Unset, EnumerationsSingleGetResponseData] - included : Union[Unset, List['EnumerationsSingleGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, EnumerationsSingleGetResponseLinks] + Attributes: + data (Union[Unset, EnumerationsSingleGetResponseData]): + included (Union[Unset, List['EnumerationsSingleGetResponseIncludedItem']]): Related entities might be returned, + see Rest API + User Guide. + links (Union[Unset, EnumerationsSingleGetResponseLinks]): """ data: Union[Unset, "EnumerationsSingleGetResponseData"] = UNSET @@ -54,7 +53,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data.py index bd1657b6..37ad9daa 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data.py @@ -29,14 +29,13 @@ @_attrs_define class EnumerationsSingleGetResponseData: """ - Attributes - ---------- - type : Union[Unset, EnumerationsSingleGetResponseDataType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, EnumerationsSingleGetResponseDataAttributes] - meta : Union[Unset, EnumerationsSingleGetResponseDataMeta] - links : Union[Unset, EnumerationsSingleGetResponseDataLinks] + Attributes: + type (Union[Unset, EnumerationsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: ~/status/~. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, EnumerationsSingleGetResponseDataAttributes]): + meta (Union[Unset, EnumerationsSingleGetResponseDataMeta]): + links (Union[Unset, EnumerationsSingleGetResponseDataLinks]): """ type: Union[Unset, EnumerationsSingleGetResponseDataType] = UNSET @@ -57,7 +56,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_attributes.py index 12145d86..09accb09 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_attributes.py @@ -20,12 +20,11 @@ @_attrs_define class EnumerationsSingleGetResponseDataAttributes: """ - Attributes - ---------- - enum_context : Union[Unset, str] - enum_name : Union[Unset, str] - options : Union[Unset, List['EnumerationsSingleGetResponseDataAttributesOptionsItem']] - target_type : Union[Unset, str] + Attributes: + enum_context (Union[Unset, str]): Example: id. + enum_name (Union[Unset, str]): Example: id. + options (Union[Unset, List['EnumerationsSingleGetResponseDataAttributesOptionsItem']]): + target_type (Union[Unset, str]): Example: id. """ enum_context: Union[Unset, str] = UNSET @@ -40,13 +39,14 @@ class EnumerationsSingleGetResponseDataAttributes: def to_dict(self) -> Dict[str, Any]: enum_context = self.enum_context + enum_name = self.enum_name + options: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.options, Unset): options = [] for options_item_data in self.options: options_item = options_item_data.to_dict() - options.append(options_item) target_type = self.target_type diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_attributes_options_item.py b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_attributes_options_item.py index 3e83aef3..99b64eaa 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_attributes_options_item.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_attributes_options_item.py @@ -16,23 +16,22 @@ @_attrs_define class EnumerationsSingleGetResponseDataAttributesOptionsItem: """ - Attributes - ---------- - id : Union[Unset, str] - name : Union[Unset, str] - color : Union[Unset, str] - description : Union[Unset, str] - hidden : Union[Unset, bool] - default : Union[Unset, bool] - parent : Union[Unset, bool] - opposite_name : Union[Unset, str] - column_width : Union[Unset, str] - icon_url : Union[Unset, str] - create_defect : Union[Unset, bool] - template_work_item : Union[Unset, str] - min_value : Union[Unset, float] - requires_signature_for_test_case_execution : Union[Unset, bool] - terminal : Union[Unset, bool] + Attributes: + id (Union[Unset, str]): Example: open. + name (Union[Unset, str]): Example: Open. + color (Union[Unset, str]): Example: #F9FF4D. + description (Union[Unset, str]): Example: Description. + hidden (Union[Unset, bool]): + default (Union[Unset, bool]): Example: True. + parent (Union[Unset, bool]): Example: True. + opposite_name (Union[Unset, str]): Example: Opposite Name. + column_width (Union[Unset, str]): Example: 90%. + icon_url (Union[Unset, str]): Example: /polarion/icons/default/enums/status_open.gif. + create_defect (Union[Unset, bool]): Example: True. + template_work_item (Union[Unset, str]): Example: exampleTemplate. + min_value (Union[Unset, float]): Example: 30.0. + requires_signature_for_test_case_execution (Union[Unset, bool]): Example: True. + terminal (Union[Unset, bool]): Example: True. """ id: Union[Unset, str] = UNSET @@ -56,21 +55,35 @@ class EnumerationsSingleGetResponseDataAttributesOptionsItem: def to_dict(self) -> Dict[str, Any]: id = self.id + name = self.name + color = self.color + description = self.description + hidden = self.hidden + default = self.default + parent = self.parent + opposite_name = self.opposite_name + column_width = self.column_width + icon_url = self.icon_url + create_defect = self.create_defect + template_work_item = self.template_work_item + min_value = self.min_value + requires_signature_for_test_case_execution = ( self.requires_signature_for_test_case_execution ) + terminal = self.terminal field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_links.py index ebeda69c..c6bbe9c2 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_links.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_links.py @@ -14,9 +14,8 @@ @_attrs_define class EnumerationsSingleGetResponseDataLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/enumerations/%7E/status/%7E. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_meta.py index 48449a49..a5460a09 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_meta.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_meta.py @@ -20,9 +20,8 @@ @_attrs_define class EnumerationsSingleGetResponseDataMeta: """ - Attributes - ---------- - errors : Union[Unset, List['EnumerationsSingleGetResponseDataMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['EnumerationsSingleGetResponseDataMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_meta_errors_item.py index ee6f4acd..3716c602 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class EnumerationsSingleGetResponseDataMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, EnumerationsSingleGetResponseDataMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, EnumerationsSingleGetResponseDataMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class EnumerationsSingleGetResponseDataMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_meta_errors_item_source.py index 90a91e34..e9b00362 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_meta_errors_item_source.py @@ -1,37 +1,50 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.enumerations_single_get_response_data_meta_errors_item_source_resource import ( + EnumerationsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + T = TypeVar("T", bound="EnumerationsSingleGetResponseDataMetaErrorsItemSource") @_attrs_define class EnumerationsSingleGetResponseDataMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, EnumerationsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the + error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "EnumerationsSingleGetResponseDataMetaErrorsItemSourceResource" + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -39,20 +52,39 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.enumerations_single_get_response_data_meta_errors_item_source_resource import ( + EnumerationsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + EnumerationsSingleGetResponseDataMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = EnumerationsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + enumerations_single_get_response_data_meta_errors_item_source_obj = ( cls( pointer=pointer, parameter=parameter, + resource=resource, ) ) diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..a782bdb6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="EnumerationsSingleGetResponseDataMetaErrorsItemSourceResource" +) + + +@_attrs_define +class EnumerationsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + enumerations_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + enumerations_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return enumerations_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_links.py index 8aa241f5..28ce6539 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_single_get_response_links.py @@ -14,9 +14,8 @@ @_attrs_define class EnumerationsSingleGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/enumerations/%7E/status/%7E. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_single_patch_request.py b/polarion_rest_api_client/open_api_client/models/enumerations_single_patch_request.py index e4e53b15..1e425127 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_single_patch_request.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_single_patch_request.py @@ -20,9 +20,8 @@ @_attrs_define class EnumerationsSinglePatchRequest: """ - Attributes - ---------- - data : Union[Unset, EnumerationsSinglePatchRequestData] + Attributes: + data (Union[Unset, EnumerationsSinglePatchRequestData]): """ data: Union[Unset, "EnumerationsSinglePatchRequestData"] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_single_patch_request_data.py b/polarion_rest_api_client/open_api_client/models/enumerations_single_patch_request_data.py index c3c78f5f..2fe77089 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_single_patch_request_data.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_single_patch_request_data.py @@ -23,11 +23,10 @@ @_attrs_define class EnumerationsSinglePatchRequestData: """ - Attributes - ---------- - type : Union[Unset, EnumerationsSinglePatchRequestDataType] - id : Union[Unset, str] - attributes : Union[Unset, EnumerationsSinglePatchRequestDataAttributes] + Attributes: + type (Union[Unset, EnumerationsSinglePatchRequestDataType]): + id (Union[Unset, str]): Example: ~/status/~. + attributes (Union[Unset, EnumerationsSinglePatchRequestDataAttributes]): """ type: Union[Unset, EnumerationsSinglePatchRequestDataType] = UNSET @@ -45,6 +44,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_single_patch_request_data_attributes.py b/polarion_rest_api_client/open_api_client/models/enumerations_single_patch_request_data_attributes.py index 3597be8d..9374f38a 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_single_patch_request_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_single_patch_request_data_attributes.py @@ -20,9 +20,8 @@ @_attrs_define class EnumerationsSinglePatchRequestDataAttributes: """ - Attributes - ---------- - options : Union[Unset, List['EnumerationsSinglePatchRequestDataAttributesOptionsItem']] + Attributes: + options (Union[Unset, List['EnumerationsSinglePatchRequestDataAttributesOptionsItem']]): """ options: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: options = [] for options_item_data in self.options: options_item = options_item_data.to_dict() - options.append(options_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/enumerations_single_patch_request_data_attributes_options_item.py b/polarion_rest_api_client/open_api_client/models/enumerations_single_patch_request_data_attributes_options_item.py index 1331b71d..3c70dd57 100644 --- a/polarion_rest_api_client/open_api_client/models/enumerations_single_patch_request_data_attributes_options_item.py +++ b/polarion_rest_api_client/open_api_client/models/enumerations_single_patch_request_data_attributes_options_item.py @@ -16,23 +16,22 @@ @_attrs_define class EnumerationsSinglePatchRequestDataAttributesOptionsItem: """ - Attributes - ---------- - id : Union[Unset, str] - name : Union[Unset, str] - color : Union[Unset, str] - description : Union[Unset, str] - hidden : Union[Unset, bool] - default : Union[Unset, bool] - parent : Union[Unset, bool] - opposite_name : Union[Unset, str] - column_width : Union[Unset, str] - icon_url : Union[Unset, str] - create_defect : Union[Unset, bool] - template_work_item : Union[Unset, str] - min_value : Union[Unset, float] - requires_signature_for_test_case_execution : Union[Unset, bool] - terminal : Union[Unset, bool] + Attributes: + id (Union[Unset, str]): Example: open. + name (Union[Unset, str]): Example: Open. + color (Union[Unset, str]): Example: #F9FF4D. + description (Union[Unset, str]): Example: Description. + hidden (Union[Unset, bool]): + default (Union[Unset, bool]): Example: True. + parent (Union[Unset, bool]): Example: True. + opposite_name (Union[Unset, str]): Example: Opposite Name. + column_width (Union[Unset, str]): Example: 90%. + icon_url (Union[Unset, str]): Example: /polarion/icons/default/enums/status_open.gif. + create_defect (Union[Unset, bool]): Example: True. + template_work_item (Union[Unset, str]): Example: exampleTemplate. + min_value (Union[Unset, float]): Example: 30.0. + requires_signature_for_test_case_execution (Union[Unset, bool]): Example: True. + terminal (Union[Unset, bool]): Example: True. """ id: Union[Unset, str] = UNSET @@ -56,21 +55,35 @@ class EnumerationsSinglePatchRequestDataAttributesOptionsItem: def to_dict(self) -> Dict[str, Any]: id = self.id + name = self.name + color = self.color + description = self.description + hidden = self.hidden + default = self.default + parent = self.parent + opposite_name = self.opposite_name + column_width = self.column_width + icon_url = self.icon_url + create_defect = self.create_defect + template_work_item = self.template_work_item + min_value = self.min_value + requires_signature_for_test_case_execution = ( self.requires_signature_for_test_case_execution ) + terminal = self.terminal field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/errors.py b/polarion_rest_api_client/open_api_client/models/errors.py index e601237e..c44d0935 100644 --- a/polarion_rest_api_client/open_api_client/models/errors.py +++ b/polarion_rest_api_client/open_api_client/models/errors.py @@ -18,9 +18,8 @@ @_attrs_define class Errors: """ - Attributes - ---------- - errors : Union[Unset, List['ErrorsErrorsItem']] + Attributes: + errors (Union[Unset, List['ErrorsErrorsItem']]): """ errors: Union[Unset, List["ErrorsErrorsItem"]] = UNSET @@ -34,7 +33,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/errors_errors_item.py b/polarion_rest_api_client/open_api_client/models/errors_errors_item.py index 803f36a3..97020bb7 100644 --- a/polarion_rest_api_client/open_api_client/models/errors_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/errors_errors_item.py @@ -18,15 +18,12 @@ @_attrs_define class ErrorsErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, ErrorsErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, ErrorsErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -39,8 +36,11 @@ class ErrorsErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/errors_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/errors_errors_item_source.py index 18c46dc3..c91c7815 100644 --- a/polarion_rest_api_client/open_api_client/models/errors_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/errors_errors_item_source.py @@ -1,37 +1,47 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.errors_errors_item_source_resource import ( + ErrorsErrorsItemSourceResource, + ) + + T = TypeVar("T", bound="ErrorsErrorsItemSource") @_attrs_define class ErrorsErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, ErrorsErrorsItemSourceResource]): Resource causing the error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[Unset, "ErrorsErrorsItemSourceResource"] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -39,19 +49,33 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.errors_errors_item_source_resource import ( + ErrorsErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[Unset, ErrorsErrorsItemSourceResource] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = ErrorsErrorsItemSourceResource.from_dict(_resource) + errors_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) errors_errors_item_source_obj.additional_properties = d diff --git a/polarion_rest_api_client/open_api_client/models/errors_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/errors_errors_item_source_resource.py new file mode 100644 index 00000000..5fc7d9b0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/errors_errors_item_source_resource.py @@ -0,0 +1,73 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ErrorsErrorsItemSourceResource") + + +@_attrs_define +class ErrorsErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + errors_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + errors_errors_item_source_resource_obj.additional_properties = d + return errors_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/export_test_cases_request_body.py b/polarion_rest_api_client/open_api_client/models/export_test_cases_request_body.py new file mode 100644 index 00000000..83f62bdf --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/export_test_cases_request_body.py @@ -0,0 +1,81 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExportTestCasesRequestBody") + + +@_attrs_define +class ExportTestCasesRequestBody: + """ + Attributes: + query (Union[Unset, str]): Example: exportExcelQueryString. + sortby (Union[Unset, str]): Example: exportExcelSortByString. + template (Union[Unset, str]): Example: exportExcelTemplateName. + """ + + query: Union[Unset, str] = UNSET + sortby: Union[Unset, str] = UNSET + template: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + query = self.query + + sortby = self.sortby + + template = self.template + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if query is not UNSET: + field_dict["query"] = query + if sortby is not UNSET: + field_dict["sortby"] = sortby + if template is not UNSET: + field_dict["template"] = template + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + query = d.pop("query", UNSET) + + sortby = d.pop("sortby", UNSET) + + template = d.pop("template", UNSET) + + export_test_cases_request_body_obj = cls( + query=query, + sortby=sortby, + template=template, + ) + + export_test_cases_request_body_obj.additional_properties = d + return export_test_cases_request_body_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_delete_request.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_delete_request.py new file mode 100644 index 00000000..62c18164 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_delete_request.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.externallylinkedworkitems_list_delete_request_data_item import ( + ExternallylinkedworkitemsListDeleteRequestDataItem, + ) + + +T = TypeVar("T", bound="ExternallylinkedworkitemsListDeleteRequest") + + +@_attrs_define +class ExternallylinkedworkitemsListDeleteRequest: + """ + Attributes: + data (Union[Unset, List['ExternallylinkedworkitemsListDeleteRequestDataItem']]): + """ + + data: Union[ + Unset, List["ExternallylinkedworkitemsListDeleteRequestDataItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.externallylinkedworkitems_list_delete_request_data_item import ( + ExternallylinkedworkitemsListDeleteRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = ( + ExternallylinkedworkitemsListDeleteRequestDataItem.from_dict( + data_item_data + ) + ) + + data.append(data_item) + + externallylinkedworkitems_list_delete_request_obj = cls( + data=data, + ) + + externallylinkedworkitems_list_delete_request_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_delete_request_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_delete_request_data_item.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_delete_request_data_item.py new file mode 100644 index 00000000..0fb30f73 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_delete_request_data_item.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.externallylinkedworkitems_list_delete_request_data_item_type import ( + ExternallylinkedworkitemsListDeleteRequestDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExternallylinkedworkitemsListDeleteRequestDataItem") + + +@_attrs_define +class ExternallylinkedworkitemsListDeleteRequestDataItem: + """ + Attributes: + type (Union[Unset, ExternallylinkedworkitemsListDeleteRequestDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/parent/hostname/MyProjectId/MyLinkedWorkItemId. + """ + + type: Union[ + Unset, ExternallylinkedworkitemsListDeleteRequestDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, ExternallylinkedworkitemsListDeleteRequestDataItemType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ExternallylinkedworkitemsListDeleteRequestDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + externallylinkedworkitems_list_delete_request_data_item_obj = cls( + type=type, + id=id, + ) + + externallylinkedworkitems_list_delete_request_data_item_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_delete_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_delete_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_delete_request_data_item_type.py new file mode 100644 index 00000000..1978a088 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_delete_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class ExternallylinkedworkitemsListDeleteRequestDataItemType(str, Enum): + EXTERNALLYLINKEDWORKITEMS = "externallylinkedworkitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response.py new file mode 100644 index 00000000..88b6b4be --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response.py @@ -0,0 +1,174 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.externallylinkedworkitems_list_get_response_data_item import ( + ExternallylinkedworkitemsListGetResponseDataItem, + ) + from ..models.externallylinkedworkitems_list_get_response_included_item import ( + ExternallylinkedworkitemsListGetResponseIncludedItem, + ) + from ..models.externallylinkedworkitems_list_get_response_links import ( + ExternallylinkedworkitemsListGetResponseLinks, + ) + from ..models.externallylinkedworkitems_list_get_response_meta import ( + ExternallylinkedworkitemsListGetResponseMeta, + ) + + +T = TypeVar("T", bound="ExternallylinkedworkitemsListGetResponse") + + +@_attrs_define +class ExternallylinkedworkitemsListGetResponse: + """ + Attributes: + meta (Union[Unset, ExternallylinkedworkitemsListGetResponseMeta]): + data (Union[Unset, List['ExternallylinkedworkitemsListGetResponseDataItem']]): + included (Union[Unset, List['ExternallylinkedworkitemsListGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, ExternallylinkedworkitemsListGetResponseLinks]): + """ + + meta: Union[Unset, "ExternallylinkedworkitemsListGetResponseMeta"] = UNSET + data: Union[ + Unset, List["ExternallylinkedworkitemsListGetResponseDataItem"] + ] = UNSET + included: Union[ + Unset, List["ExternallylinkedworkitemsListGetResponseIncludedItem"] + ] = UNSET + links: Union[ + Unset, "ExternallylinkedworkitemsListGetResponseLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.externallylinkedworkitems_list_get_response_data_item import ( + ExternallylinkedworkitemsListGetResponseDataItem, + ) + from ..models.externallylinkedworkitems_list_get_response_included_item import ( + ExternallylinkedworkitemsListGetResponseIncludedItem, + ) + from ..models.externallylinkedworkitems_list_get_response_links import ( + ExternallylinkedworkitemsListGetResponseLinks, + ) + from ..models.externallylinkedworkitems_list_get_response_meta import ( + ExternallylinkedworkitemsListGetResponseMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, ExternallylinkedworkitemsListGetResponseMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = ExternallylinkedworkitemsListGetResponseMeta.from_dict( + _meta + ) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = ( + ExternallylinkedworkitemsListGetResponseDataItem.from_dict( + data_item_data + ) + ) + + data.append(data_item) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + ExternallylinkedworkitemsListGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, ExternallylinkedworkitemsListGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = ExternallylinkedworkitemsListGetResponseLinks.from_dict( + _links + ) + + externallylinkedworkitems_list_get_response_obj = cls( + meta=meta, + data=data, + included=included, + links=links, + ) + + externallylinkedworkitems_list_get_response_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item.py new file mode 100644 index 00000000..03791d62 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item.py @@ -0,0 +1,187 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.externallylinkedworkitems_list_get_response_data_item_type import ( + ExternallylinkedworkitemsListGetResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.externallylinkedworkitems_list_get_response_data_item_attributes import ( + ExternallylinkedworkitemsListGetResponseDataItemAttributes, + ) + from ..models.externallylinkedworkitems_list_get_response_data_item_links import ( + ExternallylinkedworkitemsListGetResponseDataItemLinks, + ) + from ..models.externallylinkedworkitems_list_get_response_data_item_meta import ( + ExternallylinkedworkitemsListGetResponseDataItemMeta, + ) + + +T = TypeVar("T", bound="ExternallylinkedworkitemsListGetResponseDataItem") + + +@_attrs_define +class ExternallylinkedworkitemsListGetResponseDataItem: + """ + Attributes: + type (Union[Unset, ExternallylinkedworkitemsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/parent/hostname/MyProjectId/MyLinkedWorkItemId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, ExternallylinkedworkitemsListGetResponseDataItemAttributes]): + meta (Union[Unset, ExternallylinkedworkitemsListGetResponseDataItemMeta]): + links (Union[Unset, ExternallylinkedworkitemsListGetResponseDataItemLinks]): + """ + + type: Union[ + Unset, ExternallylinkedworkitemsListGetResponseDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "ExternallylinkedworkitemsListGetResponseDataItemAttributes" + ] = UNSET + meta: Union[ + Unset, "ExternallylinkedworkitemsListGetResponseDataItemMeta" + ] = UNSET + links: Union[ + Unset, "ExternallylinkedworkitemsListGetResponseDataItemLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.externallylinkedworkitems_list_get_response_data_item_attributes import ( + ExternallylinkedworkitemsListGetResponseDataItemAttributes, + ) + from ..models.externallylinkedworkitems_list_get_response_data_item_links import ( + ExternallylinkedworkitemsListGetResponseDataItemLinks, + ) + from ..models.externallylinkedworkitems_list_get_response_data_item_meta import ( + ExternallylinkedworkitemsListGetResponseDataItemMeta, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, ExternallylinkedworkitemsListGetResponseDataItemType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ExternallylinkedworkitemsListGetResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, ExternallylinkedworkitemsListGetResponseDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ExternallylinkedworkitemsListGetResponseDataItemAttributes.from_dict( + _attributes + ) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, ExternallylinkedworkitemsListGetResponseDataItemMeta + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = ( + ExternallylinkedworkitemsListGetResponseDataItemMeta.from_dict( + _meta + ) + ) + + _links = d.pop("links", UNSET) + links: Union[ + Unset, ExternallylinkedworkitemsListGetResponseDataItemLinks + ] + if isinstance(_links, Unset): + links = UNSET + else: + links = ExternallylinkedworkitemsListGetResponseDataItemLinks.from_dict( + _links + ) + + externallylinkedworkitems_list_get_response_data_item_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + meta=meta, + links=links, + ) + + externallylinkedworkitems_list_get_response_data_item_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_get_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_attributes.py new file mode 100644 index 00000000..140ab9cf --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_attributes.py @@ -0,0 +1,76 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="ExternallylinkedworkitemsListGetResponseDataItemAttributes" +) + + +@_attrs_define +class ExternallylinkedworkitemsListGetResponseDataItemAttributes: + """ + Attributes: + role (Union[Unset, str]): Example: relates_to. + work_item_uri (Union[Unset, str]): + """ + + role: Union[Unset, str] = UNSET + work_item_uri: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + role = self.role + + work_item_uri = self.work_item_uri + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if role is not UNSET: + field_dict["role"] = role + if work_item_uri is not UNSET: + field_dict["workItemURI"] = work_item_uri + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + role = d.pop("role", UNSET) + + work_item_uri = d.pop("workItemURI", UNSET) + + externallylinkedworkitems_list_get_response_data_item_attributes_obj = cls( + role=role, + work_item_uri=work_item_uri, + ) + + externallylinkedworkitems_list_get_response_data_item_attributes_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_get_response_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_links.py new file mode 100644 index 00000000..0695836f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExternallylinkedworkitemsListGetResponseDataItemLinks") + + +@_attrs_define +class ExternallylinkedworkitemsListGetResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/externallylinkedworkitems/parent/hostname/MyProjectId/MyLinkedWorkItemId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + externallylinkedworkitems_list_get_response_data_item_links_obj = cls( + self_=self_, + ) + + externallylinkedworkitems_list_get_response_data_item_links_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_get_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_meta.py new file mode 100644 index 00000000..e4e3aa45 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_meta.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.externallylinkedworkitems_list_get_response_data_item_meta_errors_item import ( + ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItem, + ) + + +T = TypeVar("T", bound="ExternallylinkedworkitemsListGetResponseDataItemMeta") + + +@_attrs_define +class ExternallylinkedworkitemsListGetResponseDataItemMeta: + """ + Attributes: + errors (Union[Unset, List['ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItem']]): + """ + + errors: Union[ + Unset, + List["ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItem"], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.externallylinkedworkitems_list_get_response_data_item_meta_errors_item import ( + ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItem.from_dict( + errors_item_data + ) + + errors.append(errors_item) + + externallylinkedworkitems_list_get_response_data_item_meta_obj = cls( + errors=errors, + ) + + externallylinkedworkitems_list_get_response_data_item_meta_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_get_response_data_item_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_meta_errors_item.py new file mode 100644 index 00000000..c87adb48 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_meta_errors_item.py @@ -0,0 +1,120 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source import ( + ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSource, + ) + + +T = TypeVar( + "T", bound="ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItem" +) + + +@_attrs_define +class ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, + "ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source import ( + ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, + ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSource, + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSource.from_dict( + _source + ) + + externallylinkedworkitems_list_get_response_data_item_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + externallylinkedworkitems_list_get_response_data_item_meta_errors_item_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_get_response_data_item_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source.py new file mode 100644 index 00000000..66a26646 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source.py @@ -0,0 +1,112 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source_resource import ( + ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", + bound="ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSource", +) + + +@_attrs_define +class ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource + causing the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source_resource import ( + ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + + externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..cee53ab5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource", +) + + +@_attrs_define +class ExternallylinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_type.py new file mode 100644 index 00000000..c88b674c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class ExternallylinkedworkitemsListGetResponseDataItemType(str, Enum): + EXTERNALLYLINKEDWORKITEMS = "externallylinkedworkitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_included_item.py new file mode 100644 index 00000000..ab482535 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExternallylinkedworkitemsListGetResponseIncludedItem") + + +@_attrs_define +class ExternallylinkedworkitemsListGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + externallylinkedworkitems_list_get_response_included_item_obj = cls() + + externallylinkedworkitems_list_get_response_included_item_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_links.py new file mode 100644 index 00000000..44f4d742 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_links.py @@ -0,0 +1,106 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExternallylinkedworkitemsListGetResponseLinks") + + +@_attrs_define +class ExternallylinkedworkitemsListGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/externallylinkedworkitems/parent/hostname/MyProjectId?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/externallylinkedworkitems/parent/hostname/MyProjectId?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItemI + d/externallylinkedworkitems/parent/hostname/MyProjectId?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/externallylinkedworkitems/parent/hostname/MyProjectId?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItemI + d/externallylinkedworkitems/parent/hostname/MyProjectId?page%5Bsize%5D=10&page%5Bnumber%5D=9. + """ + + self_: Union[Unset, str] = UNSET + first: Union[Unset, str] = UNSET + prev: Union[Unset, str] = UNSET + next_: Union[Unset, str] = UNSET + last: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + first = self.first + + prev = self.prev + + next_ = self.next_ + + last = self.last + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if first is not UNSET: + field_dict["first"] = first + if prev is not UNSET: + field_dict["prev"] = prev + if next_ is not UNSET: + field_dict["next"] = next_ + if last is not UNSET: + field_dict["last"] = last + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + first = d.pop("first", UNSET) + + prev = d.pop("prev", UNSET) + + next_ = d.pop("next", UNSET) + + last = d.pop("last", UNSET) + + externallylinkedworkitems_list_get_response_links_obj = cls( + self_=self_, + first=first, + prev=prev, + next_=next_, + last=last, + ) + + externallylinkedworkitems_list_get_response_links_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_meta.py new file mode 100644 index 00000000..1494bf56 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_get_response_meta.py @@ -0,0 +1,65 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExternallylinkedworkitemsListGetResponseMeta") + + +@_attrs_define +class ExternallylinkedworkitemsListGetResponseMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + externallylinkedworkitems_list_get_response_meta_obj = cls( + total_count=total_count, + ) + + externallylinkedworkitems_list_get_response_meta_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_get_response_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_request.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_request.py new file mode 100644 index 00000000..71eaa7f5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_request.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.externallylinkedworkitems_list_post_request_data_item import ( + ExternallylinkedworkitemsListPostRequestDataItem, + ) + + +T = TypeVar("T", bound="ExternallylinkedworkitemsListPostRequest") + + +@_attrs_define +class ExternallylinkedworkitemsListPostRequest: + """ + Attributes: + data (Union[Unset, List['ExternallylinkedworkitemsListPostRequestDataItem']]): + """ + + data: Union[ + Unset, List["ExternallylinkedworkitemsListPostRequestDataItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.externallylinkedworkitems_list_post_request_data_item import ( + ExternallylinkedworkitemsListPostRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = ( + ExternallylinkedworkitemsListPostRequestDataItem.from_dict( + data_item_data + ) + ) + + data.append(data_item) + + externallylinkedworkitems_list_post_request_obj = cls( + data=data, + ) + + externallylinkedworkitems_list_post_request_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_post_request_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_request_data_item.py new file mode 100644 index 00000000..75f8fe37 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_request_data_item.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.externallylinkedworkitems_list_post_request_data_item_type import ( + ExternallylinkedworkitemsListPostRequestDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.externallylinkedworkitems_list_post_request_data_item_attributes import ( + ExternallylinkedworkitemsListPostRequestDataItemAttributes, + ) + + +T = TypeVar("T", bound="ExternallylinkedworkitemsListPostRequestDataItem") + + +@_attrs_define +class ExternallylinkedworkitemsListPostRequestDataItem: + """ + Attributes: + type (Union[Unset, ExternallylinkedworkitemsListPostRequestDataItemType]): + attributes (Union[Unset, ExternallylinkedworkitemsListPostRequestDataItemAttributes]): + """ + + type: Union[ + Unset, ExternallylinkedworkitemsListPostRequestDataItemType + ] = UNSET + attributes: Union[ + Unset, "ExternallylinkedworkitemsListPostRequestDataItemAttributes" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.externallylinkedworkitems_list_post_request_data_item_attributes import ( + ExternallylinkedworkitemsListPostRequestDataItemAttributes, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, ExternallylinkedworkitemsListPostRequestDataItemType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ExternallylinkedworkitemsListPostRequestDataItemType(_type) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, ExternallylinkedworkitemsListPostRequestDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ExternallylinkedworkitemsListPostRequestDataItemAttributes.from_dict( + _attributes + ) + + externallylinkedworkitems_list_post_request_data_item_obj = cls( + type=type, + attributes=attributes, + ) + + externallylinkedworkitems_list_post_request_data_item_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_post_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_request_data_item_attributes.py new file mode 100644 index 00000000..36f235f0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_request_data_item_attributes.py @@ -0,0 +1,76 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="ExternallylinkedworkitemsListPostRequestDataItemAttributes" +) + + +@_attrs_define +class ExternallylinkedworkitemsListPostRequestDataItemAttributes: + """ + Attributes: + role (Union[Unset, str]): Example: relates_to. + work_item_uri (Union[Unset, str]): + """ + + role: Union[Unset, str] = UNSET + work_item_uri: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + role = self.role + + work_item_uri = self.work_item_uri + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if role is not UNSET: + field_dict["role"] = role + if work_item_uri is not UNSET: + field_dict["workItemURI"] = work_item_uri + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + role = d.pop("role", UNSET) + + work_item_uri = d.pop("workItemURI", UNSET) + + externallylinkedworkitems_list_post_request_data_item_attributes_obj = cls( + role=role, + work_item_uri=work_item_uri, + ) + + externallylinkedworkitems_list_post_request_data_item_attributes_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_post_request_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_request_data_item_type.py new file mode 100644 index 00000000..192861d4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class ExternallylinkedworkitemsListPostRequestDataItemType(str, Enum): + EXTERNALLYLINKEDWORKITEMS = "externallylinkedworkitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_response.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_response.py new file mode 100644 index 00000000..766c7b58 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_response.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.externallylinkedworkitems_list_post_response_data_item import ( + ExternallylinkedworkitemsListPostResponseDataItem, + ) + + +T = TypeVar("T", bound="ExternallylinkedworkitemsListPostResponse") + + +@_attrs_define +class ExternallylinkedworkitemsListPostResponse: + """ + Attributes: + data (Union[Unset, List['ExternallylinkedworkitemsListPostResponseDataItem']]): + """ + + data: Union[ + Unset, List["ExternallylinkedworkitemsListPostResponseDataItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.externallylinkedworkitems_list_post_response_data_item import ( + ExternallylinkedworkitemsListPostResponseDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = ( + ExternallylinkedworkitemsListPostResponseDataItem.from_dict( + data_item_data + ) + ) + + data.append(data_item) + + externallylinkedworkitems_list_post_response_obj = cls( + data=data, + ) + + externallylinkedworkitems_list_post_response_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_post_response_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_response_data_item.py new file mode 100644 index 00000000..d885e8b5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_response_data_item.py @@ -0,0 +1,120 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.externallylinkedworkitems_list_post_response_data_item_type import ( + ExternallylinkedworkitemsListPostResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.externallylinkedworkitems_list_post_response_data_item_links import ( + ExternallylinkedworkitemsListPostResponseDataItemLinks, + ) + + +T = TypeVar("T", bound="ExternallylinkedworkitemsListPostResponseDataItem") + + +@_attrs_define +class ExternallylinkedworkitemsListPostResponseDataItem: + """ + Attributes: + type (Union[Unset, ExternallylinkedworkitemsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/parent/hostname/MyProjectId/MyLinkedWorkItemId. + links (Union[Unset, ExternallylinkedworkitemsListPostResponseDataItemLinks]): + """ + + type: Union[ + Unset, ExternallylinkedworkitemsListPostResponseDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + links: Union[ + Unset, "ExternallylinkedworkitemsListPostResponseDataItemLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.externallylinkedworkitems_list_post_response_data_item_links import ( + ExternallylinkedworkitemsListPostResponseDataItemLinks, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, ExternallylinkedworkitemsListPostResponseDataItemType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ExternallylinkedworkitemsListPostResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[ + Unset, ExternallylinkedworkitemsListPostResponseDataItemLinks + ] + if isinstance(_links, Unset): + links = UNSET + else: + links = ExternallylinkedworkitemsListPostResponseDataItemLinks.from_dict( + _links + ) + + externallylinkedworkitems_list_post_response_data_item_obj = cls( + type=type, + id=id, + links=links, + ) + + externallylinkedworkitems_list_post_response_data_item_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_post_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_response_data_item_links.py new file mode 100644 index 00000000..26aee65f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_response_data_item_links.py @@ -0,0 +1,68 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="ExternallylinkedworkitemsListPostResponseDataItemLinks" +) + + +@_attrs_define +class ExternallylinkedworkitemsListPostResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/externallylinkedworkitems/parent/hostname/MyProjectId/MyLinkedWorkItemId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + externallylinkedworkitems_list_post_response_data_item_links_obj = cls( + self_=self_, + ) + + externallylinkedworkitems_list_post_response_data_item_links_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_list_post_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_response_data_item_type.py new file mode 100644 index 00000000..786e952e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_list_post_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class ExternallylinkedworkitemsListPostResponseDataItemType(str, Enum): + EXTERNALLYLINKEDWORKITEMS = "externallylinkedworkitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response.py new file mode 100644 index 00000000..534a8281 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response.py @@ -0,0 +1,143 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.externallylinkedworkitems_single_get_response_data import ( + ExternallylinkedworkitemsSingleGetResponseData, + ) + from ..models.externallylinkedworkitems_single_get_response_included_item import ( + ExternallylinkedworkitemsSingleGetResponseIncludedItem, + ) + from ..models.externallylinkedworkitems_single_get_response_links import ( + ExternallylinkedworkitemsSingleGetResponseLinks, + ) + + +T = TypeVar("T", bound="ExternallylinkedworkitemsSingleGetResponse") + + +@_attrs_define +class ExternallylinkedworkitemsSingleGetResponse: + """ + Attributes: + data (Union[Unset, ExternallylinkedworkitemsSingleGetResponseData]): + included (Union[Unset, List['ExternallylinkedworkitemsSingleGetResponseIncludedItem']]): Related entities might + be returned, see Rest API User Guide. + links (Union[Unset, ExternallylinkedworkitemsSingleGetResponseLinks]): + """ + + data: Union[ + Unset, "ExternallylinkedworkitemsSingleGetResponseData" + ] = UNSET + included: Union[ + Unset, List["ExternallylinkedworkitemsSingleGetResponseIncludedItem"] + ] = UNSET + links: Union[ + Unset, "ExternallylinkedworkitemsSingleGetResponseLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.externallylinkedworkitems_single_get_response_data import ( + ExternallylinkedworkitemsSingleGetResponseData, + ) + from ..models.externallylinkedworkitems_single_get_response_included_item import ( + ExternallylinkedworkitemsSingleGetResponseIncludedItem, + ) + from ..models.externallylinkedworkitems_single_get_response_links import ( + ExternallylinkedworkitemsSingleGetResponseLinks, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, ExternallylinkedworkitemsSingleGetResponseData] + if isinstance(_data, Unset): + data = UNSET + else: + data = ExternallylinkedworkitemsSingleGetResponseData.from_dict( + _data + ) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ExternallylinkedworkitemsSingleGetResponseIncludedItem.from_dict( + included_item_data + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, ExternallylinkedworkitemsSingleGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = ExternallylinkedworkitemsSingleGetResponseLinks.from_dict( + _links + ) + + externallylinkedworkitems_single_get_response_obj = cls( + data=data, + included=included, + links=links, + ) + + externallylinkedworkitems_single_get_response_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_single_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data.py new file mode 100644 index 00000000..b59a2c92 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data.py @@ -0,0 +1,185 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.externallylinkedworkitems_single_get_response_data_type import ( + ExternallylinkedworkitemsSingleGetResponseDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.externallylinkedworkitems_single_get_response_data_attributes import ( + ExternallylinkedworkitemsSingleGetResponseDataAttributes, + ) + from ..models.externallylinkedworkitems_single_get_response_data_links import ( + ExternallylinkedworkitemsSingleGetResponseDataLinks, + ) + from ..models.externallylinkedworkitems_single_get_response_data_meta import ( + ExternallylinkedworkitemsSingleGetResponseDataMeta, + ) + + +T = TypeVar("T", bound="ExternallylinkedworkitemsSingleGetResponseData") + + +@_attrs_define +class ExternallylinkedworkitemsSingleGetResponseData: + """ + Attributes: + type (Union[Unset, ExternallylinkedworkitemsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/parent/hostname/MyProjectId/MyLinkedWorkItemId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, ExternallylinkedworkitemsSingleGetResponseDataAttributes]): + meta (Union[Unset, ExternallylinkedworkitemsSingleGetResponseDataMeta]): + links (Union[Unset, ExternallylinkedworkitemsSingleGetResponseDataLinks]): + """ + + type: Union[ + Unset, ExternallylinkedworkitemsSingleGetResponseDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "ExternallylinkedworkitemsSingleGetResponseDataAttributes" + ] = UNSET + meta: Union[ + Unset, "ExternallylinkedworkitemsSingleGetResponseDataMeta" + ] = UNSET + links: Union[ + Unset, "ExternallylinkedworkitemsSingleGetResponseDataLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.externallylinkedworkitems_single_get_response_data_attributes import ( + ExternallylinkedworkitemsSingleGetResponseDataAttributes, + ) + from ..models.externallylinkedworkitems_single_get_response_data_links import ( + ExternallylinkedworkitemsSingleGetResponseDataLinks, + ) + from ..models.externallylinkedworkitems_single_get_response_data_meta import ( + ExternallylinkedworkitemsSingleGetResponseDataMeta, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, ExternallylinkedworkitemsSingleGetResponseDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = ExternallylinkedworkitemsSingleGetResponseDataType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, ExternallylinkedworkitemsSingleGetResponseDataAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ExternallylinkedworkitemsSingleGetResponseDataAttributes.from_dict( + _attributes + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, ExternallylinkedworkitemsSingleGetResponseDataMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = ( + ExternallylinkedworkitemsSingleGetResponseDataMeta.from_dict( + _meta + ) + ) + + _links = d.pop("links", UNSET) + links: Union[ + Unset, ExternallylinkedworkitemsSingleGetResponseDataLinks + ] + if isinstance(_links, Unset): + links = UNSET + else: + links = ( + ExternallylinkedworkitemsSingleGetResponseDataLinks.from_dict( + _links + ) + ) + + externallylinkedworkitems_single_get_response_data_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + meta=meta, + links=links, + ) + + externallylinkedworkitems_single_get_response_data_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_single_get_response_data_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_attributes.py new file mode 100644 index 00000000..fb6c247e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_attributes.py @@ -0,0 +1,80 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="ExternallylinkedworkitemsSingleGetResponseDataAttributes" +) + + +@_attrs_define +class ExternallylinkedworkitemsSingleGetResponseDataAttributes: + """ + Attributes: + role (Union[Unset, str]): Example: relates_to. + work_item_uri (Union[Unset, str]): + """ + + role: Union[Unset, str] = UNSET + work_item_uri: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + role = self.role + + work_item_uri = self.work_item_uri + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if role is not UNSET: + field_dict["role"] = role + if work_item_uri is not UNSET: + field_dict["workItemURI"] = work_item_uri + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + role = d.pop("role", UNSET) + + work_item_uri = d.pop("workItemURI", UNSET) + + externallylinkedworkitems_single_get_response_data_attributes_obj = ( + cls( + role=role, + work_item_uri=work_item_uri, + ) + ) + + externallylinkedworkitems_single_get_response_data_attributes_obj.additional_properties = ( + d + ) + return ( + externallylinkedworkitems_single_get_response_data_attributes_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_links.py new file mode 100644 index 00000000..ef595865 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExternallylinkedworkitemsSingleGetResponseDataLinks") + + +@_attrs_define +class ExternallylinkedworkitemsSingleGetResponseDataLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/externallylinkedworkitems/parent/hostname/MyProjectId/MyLinkedWorkItemId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + externallylinkedworkitems_single_get_response_data_links_obj = cls( + self_=self_, + ) + + externallylinkedworkitems_single_get_response_data_links_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_single_get_response_data_links_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_meta.py new file mode 100644 index 00000000..d9804b94 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_meta.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.externallylinkedworkitems_single_get_response_data_meta_errors_item import ( + ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItem, + ) + + +T = TypeVar("T", bound="ExternallylinkedworkitemsSingleGetResponseDataMeta") + + +@_attrs_define +class ExternallylinkedworkitemsSingleGetResponseDataMeta: + """ + Attributes: + errors (Union[Unset, List['ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItem']]): + """ + + errors: Union[ + Unset, + List["ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItem"], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.externallylinkedworkitems_single_get_response_data_meta_errors_item import ( + ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItem.from_dict( + errors_item_data + ) + + errors.append(errors_item) + + externallylinkedworkitems_single_get_response_data_meta_obj = cls( + errors=errors, + ) + + externallylinkedworkitems_single_get_response_data_meta_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_single_get_response_data_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_meta_errors_item.py new file mode 100644 index 00000000..7b9e3d25 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_meta_errors_item.py @@ -0,0 +1,120 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.externallylinkedworkitems_single_get_response_data_meta_errors_item_source import ( + ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSource, + ) + + +T = TypeVar( + "T", bound="ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItem" +) + + +@_attrs_define +class ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, + "ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.externallylinkedworkitems_single_get_response_data_meta_errors_item_source import ( + ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, + ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSource, + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSource.from_dict( + _source + ) + + externallylinkedworkitems_single_get_response_data_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + externallylinkedworkitems_single_get_response_data_meta_errors_item_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_single_get_response_data_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_meta_errors_item_source.py new file mode 100644 index 00000000..4b163dce --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_meta_errors_item_source.py @@ -0,0 +1,112 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.externallylinkedworkitems_single_get_response_data_meta_errors_item_source_resource import ( + ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", + bound="ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSource", +) + + +@_attrs_define +class ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource + causing the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.externallylinkedworkitems_single_get_response_data_meta_errors_item_source_resource import ( + ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + + externallylinkedworkitems_single_get_response_data_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + externallylinkedworkitems_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_single_get_response_data_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..14d5d78e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource", +) + + +@_attrs_define +class ExternallylinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + externallylinkedworkitems_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + externallylinkedworkitems_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_type.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_type.py new file mode 100644 index 00000000..ce16acde --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class ExternallylinkedworkitemsSingleGetResponseDataType(str, Enum): + EXTERNALLYLINKEDWORKITEMS = "externallylinkedworkitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_included_item.py new file mode 100644 index 00000000..326f2c87 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_included_item.py @@ -0,0 +1,53 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", bound="ExternallylinkedworkitemsSingleGetResponseIncludedItem" +) + + +@_attrs_define +class ExternallylinkedworkitemsSingleGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + externallylinkedworkitems_single_get_response_included_item_obj = cls() + + externallylinkedworkitems_single_get_response_included_item_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_single_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_links.py new file mode 100644 index 00000000..79769fc5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/externallylinkedworkitems_single_get_response_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExternallylinkedworkitemsSingleGetResponseLinks") + + +@_attrs_define +class ExternallylinkedworkitemsSingleGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/externallylinkedworkitems/parent/hostname/MyProjectId/MyLinkedWorkItemId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + externallylinkedworkitems_single_get_response_links_obj = cls( + self_=self_, + ) + + externallylinkedworkitems_single_get_response_links_obj.additional_properties = ( + d + ) + return externallylinkedworkitems_single_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response.py b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response.py new file mode 100644 index 00000000..3f83d7f6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response.py @@ -0,0 +1,164 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.featureselections_list_get_response_data_item import ( + FeatureselectionsListGetResponseDataItem, + ) + from ..models.featureselections_list_get_response_included_item import ( + FeatureselectionsListGetResponseIncludedItem, + ) + from ..models.featureselections_list_get_response_links import ( + FeatureselectionsListGetResponseLinks, + ) + from ..models.featureselections_list_get_response_meta import ( + FeatureselectionsListGetResponseMeta, + ) + + +T = TypeVar("T", bound="FeatureselectionsListGetResponse") + + +@_attrs_define +class FeatureselectionsListGetResponse: + """ + Attributes: + meta (Union[Unset, FeatureselectionsListGetResponseMeta]): + data (Union[Unset, List['FeatureselectionsListGetResponseDataItem']]): + included (Union[Unset, List['FeatureselectionsListGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, FeatureselectionsListGetResponseLinks]): + """ + + meta: Union[Unset, "FeatureselectionsListGetResponseMeta"] = UNSET + data: Union[ + Unset, List["FeatureselectionsListGetResponseDataItem"] + ] = UNSET + included: Union[ + Unset, List["FeatureselectionsListGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "FeatureselectionsListGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.featureselections_list_get_response_data_item import ( + FeatureselectionsListGetResponseDataItem, + ) + from ..models.featureselections_list_get_response_included_item import ( + FeatureselectionsListGetResponseIncludedItem, + ) + from ..models.featureselections_list_get_response_links import ( + FeatureselectionsListGetResponseLinks, + ) + from ..models.featureselections_list_get_response_meta import ( + FeatureselectionsListGetResponseMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, FeatureselectionsListGetResponseMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = FeatureselectionsListGetResponseMeta.from_dict(_meta) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = FeatureselectionsListGetResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + FeatureselectionsListGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, FeatureselectionsListGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = FeatureselectionsListGetResponseLinks.from_dict(_links) + + featureselections_list_get_response_obj = cls( + meta=meta, + data=data, + included=included, + links=links, + ) + + featureselections_list_get_response_obj.additional_properties = d + return featureselections_list_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item.py new file mode 100644 index 00000000..291d6db3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item.py @@ -0,0 +1,205 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.featureselections_list_get_response_data_item_type import ( + FeatureselectionsListGetResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.featureselections_list_get_response_data_item_attributes import ( + FeatureselectionsListGetResponseDataItemAttributes, + ) + from ..models.featureselections_list_get_response_data_item_links import ( + FeatureselectionsListGetResponseDataItemLinks, + ) + from ..models.featureselections_list_get_response_data_item_meta import ( + FeatureselectionsListGetResponseDataItemMeta, + ) + from ..models.featureselections_list_get_response_data_item_relationships import ( + FeatureselectionsListGetResponseDataItemRelationships, + ) + + +T = TypeVar("T", bound="FeatureselectionsListGetResponseDataItem") + + +@_attrs_define +class FeatureselectionsListGetResponseDataItem: + """ + Attributes: + type (Union[Unset, FeatureselectionsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/included/MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, FeatureselectionsListGetResponseDataItemAttributes]): + relationships (Union[Unset, FeatureselectionsListGetResponseDataItemRelationships]): + meta (Union[Unset, FeatureselectionsListGetResponseDataItemMeta]): + links (Union[Unset, FeatureselectionsListGetResponseDataItemLinks]): + """ + + type: Union[Unset, FeatureselectionsListGetResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "FeatureselectionsListGetResponseDataItemAttributes" + ] = UNSET + relationships: Union[ + Unset, "FeatureselectionsListGetResponseDataItemRelationships" + ] = UNSET + meta: Union[Unset, "FeatureselectionsListGetResponseDataItemMeta"] = UNSET + links: Union[ + Unset, "FeatureselectionsListGetResponseDataItemLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.featureselections_list_get_response_data_item_attributes import ( + FeatureselectionsListGetResponseDataItemAttributes, + ) + from ..models.featureselections_list_get_response_data_item_links import ( + FeatureselectionsListGetResponseDataItemLinks, + ) + from ..models.featureselections_list_get_response_data_item_meta import ( + FeatureselectionsListGetResponseDataItemMeta, + ) + from ..models.featureselections_list_get_response_data_item_relationships import ( + FeatureselectionsListGetResponseDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, FeatureselectionsListGetResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = FeatureselectionsListGetResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, FeatureselectionsListGetResponseDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + FeatureselectionsListGetResponseDataItemAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, FeatureselectionsListGetResponseDataItemRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = FeatureselectionsListGetResponseDataItemRelationships.from_dict( + _relationships + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, FeatureselectionsListGetResponseDataItemMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = FeatureselectionsListGetResponseDataItemMeta.from_dict( + _meta + ) + + _links = d.pop("links", UNSET) + links: Union[Unset, FeatureselectionsListGetResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = FeatureselectionsListGetResponseDataItemLinks.from_dict( + _links + ) + + featureselections_list_get_response_data_item_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + featureselections_list_get_response_data_item_obj.additional_properties = ( + d + ) + return featureselections_list_get_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_attributes.py new file mode 100644 index 00000000..d3779a17 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_attributes.py @@ -0,0 +1,83 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.featureselections_list_get_response_data_item_attributes_selection_type import ( + FeatureselectionsListGetResponseDataItemAttributesSelectionType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeatureselectionsListGetResponseDataItemAttributes") + + +@_attrs_define +class FeatureselectionsListGetResponseDataItemAttributes: + """ + Attributes: + selection_type (Union[Unset, FeatureselectionsListGetResponseDataItemAttributesSelectionType]): Example: + excluded. + """ + + selection_type: Union[ + Unset, FeatureselectionsListGetResponseDataItemAttributesSelectionType + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + selection_type: Union[Unset, str] = UNSET + if not isinstance(self.selection_type, Unset): + selection_type = self.selection_type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if selection_type is not UNSET: + field_dict["selectionType"] = selection_type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _selection_type = d.pop("selectionType", UNSET) + selection_type: Union[ + Unset, + FeatureselectionsListGetResponseDataItemAttributesSelectionType, + ] + if isinstance(_selection_type, Unset): + selection_type = UNSET + else: + selection_type = FeatureselectionsListGetResponseDataItemAttributesSelectionType( + _selection_type + ) + + featureselections_list_get_response_data_item_attributes_obj = cls( + selection_type=selection_type, + ) + + featureselections_list_get_response_data_item_attributes_obj.additional_properties = ( + d + ) + return featureselections_list_get_response_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_attributes_selection_type.py b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_attributes_selection_type.py new file mode 100644 index 00000000..808cf1a8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_attributes_selection_type.py @@ -0,0 +1,15 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class FeatureselectionsListGetResponseDataItemAttributesSelectionType( + str, Enum +): + EXCLUDED = "excluded" + IMPLICITLY_INCLUDED = "implicitly-included" + INCLUDED = "included" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_links.py new file mode 100644 index 00000000..3719ef2f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeatureselectionsListGetResponseDataItemLinks") + + +@_attrs_define +class FeatureselectionsListGetResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/featureselections/included/MyProjectId/MyWorkItemId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + featureselections_list_get_response_data_item_links_obj = cls( + self_=self_, + ) + + featureselections_list_get_response_data_item_links_obj.additional_properties = ( + d + ) + return featureselections_list_get_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_meta.py new file mode 100644 index 00000000..e2834e60 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_meta.py @@ -0,0 +1,89 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.featureselections_list_get_response_data_item_meta_errors_item import ( + FeatureselectionsListGetResponseDataItemMetaErrorsItem, + ) + + +T = TypeVar("T", bound="FeatureselectionsListGetResponseDataItemMeta") + + +@_attrs_define +class FeatureselectionsListGetResponseDataItemMeta: + """ + Attributes: + errors (Union[Unset, List['FeatureselectionsListGetResponseDataItemMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["FeatureselectionsListGetResponseDataItemMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.featureselections_list_get_response_data_item_meta_errors_item import ( + FeatureselectionsListGetResponseDataItemMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = FeatureselectionsListGetResponseDataItemMetaErrorsItem.from_dict( + errors_item_data + ) + + errors.append(errors_item) + + featureselections_list_get_response_data_item_meta_obj = cls( + errors=errors, + ) + + featureselections_list_get_response_data_item_meta_obj.additional_properties = ( + d + ) + return featureselections_list_get_response_data_item_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_meta_errors_item.py new file mode 100644 index 00000000..e064ed01 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_meta_errors_item.py @@ -0,0 +1,122 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.featureselections_list_get_response_data_item_meta_errors_item_source import ( + FeatureselectionsListGetResponseDataItemMetaErrorsItemSource, + ) + + +T = TypeVar( + "T", bound="FeatureselectionsListGetResponseDataItemMetaErrorsItem" +) + + +@_attrs_define +class FeatureselectionsListGetResponseDataItemMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, FeatureselectionsListGetResponseDataItemMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "FeatureselectionsListGetResponseDataItemMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.featureselections_list_get_response_data_item_meta_errors_item_source import ( + FeatureselectionsListGetResponseDataItemMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, FeatureselectionsListGetResponseDataItemMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = FeatureselectionsListGetResponseDataItemMetaErrorsItemSource.from_dict( + _source + ) + + featureselections_list_get_response_data_item_meta_errors_item_obj = ( + cls( + status=status, + title=title, + detail=detail, + source=source, + ) + ) + + featureselections_list_get_response_data_item_meta_errors_item_obj.additional_properties = ( + d + ) + return ( + featureselections_list_get_response_data_item_meta_errors_item_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_meta_errors_item_source.py new file mode 100644 index 00000000..c1893c30 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_meta_errors_item_source.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.featureselections_list_get_response_data_item_meta_errors_item_source_resource import ( + FeatureselectionsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", bound="FeatureselectionsListGetResponseDataItemMetaErrorsItemSource" +) + + +@_attrs_define +class FeatureselectionsListGetResponseDataItemMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, FeatureselectionsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing + the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "FeatureselectionsListGetResponseDataItemMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.featureselections_list_get_response_data_item_meta_errors_item_source_resource import ( + FeatureselectionsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + FeatureselectionsListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = FeatureselectionsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + + featureselections_list_get_response_data_item_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + featureselections_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( + d + ) + return featureselections_list_get_response_data_item_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..bfab7abf --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="FeatureselectionsListGetResponseDataItemMetaErrorsItemSourceResource", +) + + +@_attrs_define +class FeatureselectionsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + featureselections_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + featureselections_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return featureselections_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_relationships.py new file mode 100644 index 00000000..3e9555dc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_relationships.py @@ -0,0 +1,89 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.featureselections_list_get_response_data_item_relationships_work_item import ( + FeatureselectionsListGetResponseDataItemRelationshipsWorkItem, + ) + + +T = TypeVar("T", bound="FeatureselectionsListGetResponseDataItemRelationships") + + +@_attrs_define +class FeatureselectionsListGetResponseDataItemRelationships: + """ + Attributes: + work_item (Union[Unset, FeatureselectionsListGetResponseDataItemRelationshipsWorkItem]): + """ + + work_item: Union[ + Unset, "FeatureselectionsListGetResponseDataItemRelationshipsWorkItem" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + work_item: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.work_item, Unset): + work_item = self.work_item.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if work_item is not UNSET: + field_dict["workItem"] = work_item + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.featureselections_list_get_response_data_item_relationships_work_item import ( + FeatureselectionsListGetResponseDataItemRelationshipsWorkItem, + ) + + d = src_dict.copy() + _work_item = d.pop("workItem", UNSET) + work_item: Union[ + Unset, + FeatureselectionsListGetResponseDataItemRelationshipsWorkItem, + ] + if isinstance(_work_item, Unset): + work_item = UNSET + else: + work_item = FeatureselectionsListGetResponseDataItemRelationshipsWorkItem.from_dict( + _work_item + ) + + featureselections_list_get_response_data_item_relationships_obj = cls( + work_item=work_item, + ) + + featureselections_list_get_response_data_item_relationships_obj.additional_properties = ( + d + ) + return featureselections_list_get_response_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_relationships_work_item.py b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_relationships_work_item.py new file mode 100644 index 00000000..6cfd1110 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_relationships_work_item.py @@ -0,0 +1,92 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.featureselections_list_get_response_data_item_relationships_work_item_data import ( + FeatureselectionsListGetResponseDataItemRelationshipsWorkItemData, + ) + + +T = TypeVar( + "T", bound="FeatureselectionsListGetResponseDataItemRelationshipsWorkItem" +) + + +@_attrs_define +class FeatureselectionsListGetResponseDataItemRelationshipsWorkItem: + """ + Attributes: + data (Union[Unset, FeatureselectionsListGetResponseDataItemRelationshipsWorkItemData]): + """ + + data: Union[ + Unset, + "FeatureselectionsListGetResponseDataItemRelationshipsWorkItemData", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.featureselections_list_get_response_data_item_relationships_work_item_data import ( + FeatureselectionsListGetResponseDataItemRelationshipsWorkItemData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + FeatureselectionsListGetResponseDataItemRelationshipsWorkItemData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = FeatureselectionsListGetResponseDataItemRelationshipsWorkItemData.from_dict( + _data + ) + + featureselections_list_get_response_data_item_relationships_work_item_obj = cls( + data=data, + ) + + featureselections_list_get_response_data_item_relationships_work_item_obj.additional_properties = ( + d + ) + return featureselections_list_get_response_data_item_relationships_work_item_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_relationships_work_item_data.py b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_relationships_work_item_data.py new file mode 100644 index 00000000..669bdadc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_relationships_work_item_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.featureselections_list_get_response_data_item_relationships_work_item_data_type import ( + FeatureselectionsListGetResponseDataItemRelationshipsWorkItemDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="FeatureselectionsListGetResponseDataItemRelationshipsWorkItemData", +) + + +@_attrs_define +class FeatureselectionsListGetResponseDataItemRelationshipsWorkItemData: + """ + Attributes: + type (Union[Unset, FeatureselectionsListGetResponseDataItemRelationshipsWorkItemDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + FeatureselectionsListGetResponseDataItemRelationshipsWorkItemDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + FeatureselectionsListGetResponseDataItemRelationshipsWorkItemDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = FeatureselectionsListGetResponseDataItemRelationshipsWorkItemDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + featureselections_list_get_response_data_item_relationships_work_item_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + featureselections_list_get_response_data_item_relationships_work_item_data_obj.additional_properties = ( + d + ) + return featureselections_list_get_response_data_item_relationships_work_item_data_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_relationships_work_item_data_type.py b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_relationships_work_item_data_type.py new file mode 100644 index 00000000..e8be46b1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_relationships_work_item_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class FeatureselectionsListGetResponseDataItemRelationshipsWorkItemDataType( + str, Enum +): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_type.py new file mode 100644 index 00000000..1fb6bed2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class FeatureselectionsListGetResponseDataItemType(str, Enum): + FEATURESELECTIONS = "featureselections" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_included_item.py new file mode 100644 index 00000000..89ab87b6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="FeatureselectionsListGetResponseIncludedItem") + + +@_attrs_define +class FeatureselectionsListGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + featureselections_list_get_response_included_item_obj = cls() + + featureselections_list_get_response_included_item_obj.additional_properties = ( + d + ) + return featureselections_list_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_links.py new file mode 100644 index 00000000..dccfb868 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_links.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeatureselectionsListGetResponseLinks") + + +@_attrs_define +class FeatureselectionsListGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/featureselections/included/MyProjectId?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/featureselections/included/MyProjectId?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItemI + d/featureselections/included/MyProjectId?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/featureselections/included/MyProjectId?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItemI + d/featureselections/included/MyProjectId?page%5Bsize%5D=10&page%5Bnumber%5D=9. + """ + + self_: Union[Unset, str] = UNSET + first: Union[Unset, str] = UNSET + prev: Union[Unset, str] = UNSET + next_: Union[Unset, str] = UNSET + last: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + first = self.first + + prev = self.prev + + next_ = self.next_ + + last = self.last + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if first is not UNSET: + field_dict["first"] = first + if prev is not UNSET: + field_dict["prev"] = prev + if next_ is not UNSET: + field_dict["next"] = next_ + if last is not UNSET: + field_dict["last"] = last + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + first = d.pop("first", UNSET) + + prev = d.pop("prev", UNSET) + + next_ = d.pop("next", UNSET) + + last = d.pop("last", UNSET) + + featureselections_list_get_response_links_obj = cls( + self_=self_, + first=first, + prev=prev, + next_=next_, + last=last, + ) + + featureselections_list_get_response_links_obj.additional_properties = d + return featureselections_list_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_meta.py new file mode 100644 index 00000000..d79c0523 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_list_get_response_meta.py @@ -0,0 +1,63 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeatureselectionsListGetResponseMeta") + + +@_attrs_define +class FeatureselectionsListGetResponseMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + featureselections_list_get_response_meta_obj = cls( + total_count=total_count, + ) + + featureselections_list_get_response_meta_obj.additional_properties = d + return featureselections_list_get_response_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response.py b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response.py new file mode 100644 index 00000000..79630441 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response.py @@ -0,0 +1,135 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.featureselections_single_get_response_data import ( + FeatureselectionsSingleGetResponseData, + ) + from ..models.featureselections_single_get_response_included_item import ( + FeatureselectionsSingleGetResponseIncludedItem, + ) + from ..models.featureselections_single_get_response_links import ( + FeatureselectionsSingleGetResponseLinks, + ) + + +T = TypeVar("T", bound="FeatureselectionsSingleGetResponse") + + +@_attrs_define +class FeatureselectionsSingleGetResponse: + """ + Attributes: + data (Union[Unset, FeatureselectionsSingleGetResponseData]): + included (Union[Unset, List['FeatureselectionsSingleGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, FeatureselectionsSingleGetResponseLinks]): + """ + + data: Union[Unset, "FeatureselectionsSingleGetResponseData"] = UNSET + included: Union[ + Unset, List["FeatureselectionsSingleGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "FeatureselectionsSingleGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.featureselections_single_get_response_data import ( + FeatureselectionsSingleGetResponseData, + ) + from ..models.featureselections_single_get_response_included_item import ( + FeatureselectionsSingleGetResponseIncludedItem, + ) + from ..models.featureselections_single_get_response_links import ( + FeatureselectionsSingleGetResponseLinks, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, FeatureselectionsSingleGetResponseData] + if isinstance(_data, Unset): + data = UNSET + else: + data = FeatureselectionsSingleGetResponseData.from_dict(_data) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + FeatureselectionsSingleGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, FeatureselectionsSingleGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = FeatureselectionsSingleGetResponseLinks.from_dict(_links) + + featureselections_single_get_response_obj = cls( + data=data, + included=included, + links=links, + ) + + featureselections_single_get_response_obj.additional_properties = d + return featureselections_single_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data.py new file mode 100644 index 00000000..91a3c09d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data.py @@ -0,0 +1,203 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.featureselections_single_get_response_data_type import ( + FeatureselectionsSingleGetResponseDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.featureselections_single_get_response_data_attributes import ( + FeatureselectionsSingleGetResponseDataAttributes, + ) + from ..models.featureselections_single_get_response_data_links import ( + FeatureselectionsSingleGetResponseDataLinks, + ) + from ..models.featureselections_single_get_response_data_meta import ( + FeatureselectionsSingleGetResponseDataMeta, + ) + from ..models.featureselections_single_get_response_data_relationships import ( + FeatureselectionsSingleGetResponseDataRelationships, + ) + + +T = TypeVar("T", bound="FeatureselectionsSingleGetResponseData") + + +@_attrs_define +class FeatureselectionsSingleGetResponseData: + """ + Attributes: + type (Union[Unset, FeatureselectionsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/included/MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, FeatureselectionsSingleGetResponseDataAttributes]): + relationships (Union[Unset, FeatureselectionsSingleGetResponseDataRelationships]): + meta (Union[Unset, FeatureselectionsSingleGetResponseDataMeta]): + links (Union[Unset, FeatureselectionsSingleGetResponseDataLinks]): + """ + + type: Union[Unset, FeatureselectionsSingleGetResponseDataType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "FeatureselectionsSingleGetResponseDataAttributes" + ] = UNSET + relationships: Union[ + Unset, "FeatureselectionsSingleGetResponseDataRelationships" + ] = UNSET + meta: Union[Unset, "FeatureselectionsSingleGetResponseDataMeta"] = UNSET + links: Union[Unset, "FeatureselectionsSingleGetResponseDataLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.featureselections_single_get_response_data_attributes import ( + FeatureselectionsSingleGetResponseDataAttributes, + ) + from ..models.featureselections_single_get_response_data_links import ( + FeatureselectionsSingleGetResponseDataLinks, + ) + from ..models.featureselections_single_get_response_data_meta import ( + FeatureselectionsSingleGetResponseDataMeta, + ) + from ..models.featureselections_single_get_response_data_relationships import ( + FeatureselectionsSingleGetResponseDataRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, FeatureselectionsSingleGetResponseDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = FeatureselectionsSingleGetResponseDataType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, FeatureselectionsSingleGetResponseDataAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + FeatureselectionsSingleGetResponseDataAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, FeatureselectionsSingleGetResponseDataRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + FeatureselectionsSingleGetResponseDataRelationships.from_dict( + _relationships + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, FeatureselectionsSingleGetResponseDataMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = FeatureselectionsSingleGetResponseDataMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, FeatureselectionsSingleGetResponseDataLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = FeatureselectionsSingleGetResponseDataLinks.from_dict( + _links + ) + + featureselections_single_get_response_data_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + featureselections_single_get_response_data_obj.additional_properties = ( + d + ) + return featureselections_single_get_response_data_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_attributes.py new file mode 100644 index 00000000..f7a9e1ea --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_attributes.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.featureselections_single_get_response_data_attributes_selection_type import ( + FeatureselectionsSingleGetResponseDataAttributesSelectionType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeatureselectionsSingleGetResponseDataAttributes") + + +@_attrs_define +class FeatureselectionsSingleGetResponseDataAttributes: + """ + Attributes: + selection_type (Union[Unset, FeatureselectionsSingleGetResponseDataAttributesSelectionType]): Example: + excluded. + """ + + selection_type: Union[ + Unset, FeatureselectionsSingleGetResponseDataAttributesSelectionType + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + selection_type: Union[Unset, str] = UNSET + if not isinstance(self.selection_type, Unset): + selection_type = self.selection_type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if selection_type is not UNSET: + field_dict["selectionType"] = selection_type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _selection_type = d.pop("selectionType", UNSET) + selection_type: Union[ + Unset, + FeatureselectionsSingleGetResponseDataAttributesSelectionType, + ] + if isinstance(_selection_type, Unset): + selection_type = UNSET + else: + selection_type = ( + FeatureselectionsSingleGetResponseDataAttributesSelectionType( + _selection_type + ) + ) + + featureselections_single_get_response_data_attributes_obj = cls( + selection_type=selection_type, + ) + + featureselections_single_get_response_data_attributes_obj.additional_properties = ( + d + ) + return featureselections_single_get_response_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_attributes_selection_type.py b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_attributes_selection_type.py new file mode 100644 index 00000000..86b4a16e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_attributes_selection_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class FeatureselectionsSingleGetResponseDataAttributesSelectionType(str, Enum): + EXCLUDED = "excluded" + IMPLICITLY_INCLUDED = "implicitly-included" + INCLUDED = "included" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_links.py new file mode 100644 index 00000000..43fc71f7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeatureselectionsSingleGetResponseDataLinks") + + +@_attrs_define +class FeatureselectionsSingleGetResponseDataLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/featureselections/included/MyProjectId/MyWorkItemId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + featureselections_single_get_response_data_links_obj = cls( + self_=self_, + ) + + featureselections_single_get_response_data_links_obj.additional_properties = ( + d + ) + return featureselections_single_get_response_data_links_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_meta.py new file mode 100644 index 00000000..b61e28df --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_meta.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.featureselections_single_get_response_data_meta_errors_item import ( + FeatureselectionsSingleGetResponseDataMetaErrorsItem, + ) + + +T = TypeVar("T", bound="FeatureselectionsSingleGetResponseDataMeta") + + +@_attrs_define +class FeatureselectionsSingleGetResponseDataMeta: + """ + Attributes: + errors (Union[Unset, List['FeatureselectionsSingleGetResponseDataMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["FeatureselectionsSingleGetResponseDataMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.featureselections_single_get_response_data_meta_errors_item import ( + FeatureselectionsSingleGetResponseDataMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ( + FeatureselectionsSingleGetResponseDataMetaErrorsItem.from_dict( + errors_item_data + ) + ) + + errors.append(errors_item) + + featureselections_single_get_response_data_meta_obj = cls( + errors=errors, + ) + + featureselections_single_get_response_data_meta_obj.additional_properties = ( + d + ) + return featureselections_single_get_response_data_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_meta_errors_item.py new file mode 100644 index 00000000..857abce6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_meta_errors_item.py @@ -0,0 +1,116 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.featureselections_single_get_response_data_meta_errors_item_source import ( + FeatureselectionsSingleGetResponseDataMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="FeatureselectionsSingleGetResponseDataMetaErrorsItem") + + +@_attrs_define +class FeatureselectionsSingleGetResponseDataMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, FeatureselectionsSingleGetResponseDataMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "FeatureselectionsSingleGetResponseDataMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.featureselections_single_get_response_data_meta_errors_item_source import ( + FeatureselectionsSingleGetResponseDataMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, FeatureselectionsSingleGetResponseDataMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = FeatureselectionsSingleGetResponseDataMetaErrorsItemSource.from_dict( + _source + ) + + featureselections_single_get_response_data_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + featureselections_single_get_response_data_meta_errors_item_obj.additional_properties = ( + d + ) + return featureselections_single_get_response_data_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_meta_errors_item_source.py new file mode 100644 index 00000000..1fcc18d7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_meta_errors_item_source.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.featureselections_single_get_response_data_meta_errors_item_source_resource import ( + FeatureselectionsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", bound="FeatureselectionsSingleGetResponseDataMetaErrorsItemSource" +) + + +@_attrs_define +class FeatureselectionsSingleGetResponseDataMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, FeatureselectionsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing + the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "FeatureselectionsSingleGetResponseDataMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.featureselections_single_get_response_data_meta_errors_item_source_resource import ( + FeatureselectionsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + FeatureselectionsSingleGetResponseDataMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = FeatureselectionsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + + featureselections_single_get_response_data_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + featureselections_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( + d + ) + return featureselections_single_get_response_data_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..ed6ce2c8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="FeatureselectionsSingleGetResponseDataMetaErrorsItemSourceResource", +) + + +@_attrs_define +class FeatureselectionsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + featureselections_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + featureselections_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return featureselections_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_relationships.py new file mode 100644 index 00000000..28486ee8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_relationships.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.featureselections_single_get_response_data_relationships_work_item import ( + FeatureselectionsSingleGetResponseDataRelationshipsWorkItem, + ) + + +T = TypeVar("T", bound="FeatureselectionsSingleGetResponseDataRelationships") + + +@_attrs_define +class FeatureselectionsSingleGetResponseDataRelationships: + """ + Attributes: + work_item (Union[Unset, FeatureselectionsSingleGetResponseDataRelationshipsWorkItem]): + """ + + work_item: Union[ + Unset, "FeatureselectionsSingleGetResponseDataRelationshipsWorkItem" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + work_item: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.work_item, Unset): + work_item = self.work_item.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if work_item is not UNSET: + field_dict["workItem"] = work_item + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.featureselections_single_get_response_data_relationships_work_item import ( + FeatureselectionsSingleGetResponseDataRelationshipsWorkItem, + ) + + d = src_dict.copy() + _work_item = d.pop("workItem", UNSET) + work_item: Union[ + Unset, FeatureselectionsSingleGetResponseDataRelationshipsWorkItem + ] + if isinstance(_work_item, Unset): + work_item = UNSET + else: + work_item = FeatureselectionsSingleGetResponseDataRelationshipsWorkItem.from_dict( + _work_item + ) + + featureselections_single_get_response_data_relationships_obj = cls( + work_item=work_item, + ) + + featureselections_single_get_response_data_relationships_obj.additional_properties = ( + d + ) + return featureselections_single_get_response_data_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_relationships_work_item.py b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_relationships_work_item.py new file mode 100644 index 00000000..17e8bf4a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_relationships_work_item.py @@ -0,0 +1,92 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.featureselections_single_get_response_data_relationships_work_item_data import ( + FeatureselectionsSingleGetResponseDataRelationshipsWorkItemData, + ) + + +T = TypeVar( + "T", bound="FeatureselectionsSingleGetResponseDataRelationshipsWorkItem" +) + + +@_attrs_define +class FeatureselectionsSingleGetResponseDataRelationshipsWorkItem: + """ + Attributes: + data (Union[Unset, FeatureselectionsSingleGetResponseDataRelationshipsWorkItemData]): + """ + + data: Union[ + Unset, + "FeatureselectionsSingleGetResponseDataRelationshipsWorkItemData", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.featureselections_single_get_response_data_relationships_work_item_data import ( + FeatureselectionsSingleGetResponseDataRelationshipsWorkItemData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + FeatureselectionsSingleGetResponseDataRelationshipsWorkItemData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = FeatureselectionsSingleGetResponseDataRelationshipsWorkItemData.from_dict( + _data + ) + + featureselections_single_get_response_data_relationships_work_item_obj = cls( + data=data, + ) + + featureselections_single_get_response_data_relationships_work_item_obj.additional_properties = ( + d + ) + return featureselections_single_get_response_data_relationships_work_item_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_relationships_work_item_data.py b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_relationships_work_item_data.py new file mode 100644 index 00000000..e1dd7bd0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_relationships_work_item_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.featureselections_single_get_response_data_relationships_work_item_data_type import ( + FeatureselectionsSingleGetResponseDataRelationshipsWorkItemDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="FeatureselectionsSingleGetResponseDataRelationshipsWorkItemData", +) + + +@_attrs_define +class FeatureselectionsSingleGetResponseDataRelationshipsWorkItemData: + """ + Attributes: + type (Union[Unset, FeatureselectionsSingleGetResponseDataRelationshipsWorkItemDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + FeatureselectionsSingleGetResponseDataRelationshipsWorkItemDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + FeatureselectionsSingleGetResponseDataRelationshipsWorkItemDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = FeatureselectionsSingleGetResponseDataRelationshipsWorkItemDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + featureselections_single_get_response_data_relationships_work_item_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + featureselections_single_get_response_data_relationships_work_item_data_obj.additional_properties = ( + d + ) + return featureselections_single_get_response_data_relationships_work_item_data_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_relationships_work_item_data_type.py b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_relationships_work_item_data_type.py new file mode 100644 index 00000000..bcfbf0d3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_relationships_work_item_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class FeatureselectionsSingleGetResponseDataRelationshipsWorkItemDataType( + str, Enum +): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_type.py b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_type.py new file mode 100644 index 00000000..4f904cad --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class FeatureselectionsSingleGetResponseDataType(str, Enum): + FEATURESELECTIONS = "featureselections" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_included_item.py new file mode 100644 index 00000000..4508731b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="FeatureselectionsSingleGetResponseIncludedItem") + + +@_attrs_define +class FeatureselectionsSingleGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + featureselections_single_get_response_included_item_obj = cls() + + featureselections_single_get_response_included_item_obj.additional_properties = ( + d + ) + return featureselections_single_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_links.py new file mode 100644 index 00000000..8891e2d3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/featureselections_single_get_response_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeatureselectionsSingleGetResponseLinks") + + +@_attrs_define +class FeatureselectionsSingleGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/featureselections/included/MyProjectId/MyWorkItemId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + featureselections_single_get_response_links_obj = cls( + self_=self_, + ) + + featureselections_single_get_response_links_obj.additional_properties = ( + d + ) + return featureselections_single_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response.py b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response.py index d8f03cf2..b9753930 100644 --- a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response.py @@ -26,13 +26,12 @@ @_attrs_define class GlobalrolesSingleGetResponse: """ - Attributes - ---------- - data : Union[Unset, GlobalrolesSingleGetResponseData] - included : Union[Unset, List['GlobalrolesSingleGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, GlobalrolesSingleGetResponseLinks] + Attributes: + data (Union[Unset, GlobalrolesSingleGetResponseData]): + included (Union[Unset, List['GlobalrolesSingleGetResponseIncludedItem']]): Related entities might be returned, + see Rest API + User Guide. + links (Union[Unset, GlobalrolesSingleGetResponseLinks]): """ data: Union[Unset, "GlobalrolesSingleGetResponseData"] = UNSET @@ -54,7 +53,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data.py index 4ec50439..55b222f4 100644 --- a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data.py +++ b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data.py @@ -29,13 +29,12 @@ @_attrs_define class GlobalrolesSingleGetResponseData: """ - Attributes - ---------- - type : Union[Unset, GlobalrolesSingleGetResponseDataType] - id : Union[Unset, str] - relationships : Union[Unset, GlobalrolesSingleGetResponseDataRelationships] - meta : Union[Unset, GlobalrolesSingleGetResponseDataMeta] - links : Union[Unset, GlobalrolesSingleGetResponseDataLinks] + Attributes: + type (Union[Unset, GlobalrolesSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyRoleId. + relationships (Union[Unset, GlobalrolesSingleGetResponseDataRelationships]): + meta (Union[Unset, GlobalrolesSingleGetResponseDataMeta]): + links (Union[Unset, GlobalrolesSingleGetResponseDataLinks]): """ type: Union[Unset, GlobalrolesSingleGetResponseDataType] = UNSET @@ -55,6 +54,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + relationships: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.relationships, Unset): relationships = self.relationships.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_links.py index 7f8a30e6..c82f142c 100644 --- a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_links.py +++ b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_links.py @@ -14,9 +14,8 @@ @_attrs_define class GlobalrolesSingleGetResponseDataLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/roles/MyRoleId. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_meta.py index 86311020..564a6a8a 100644 --- a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_meta.py +++ b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_meta.py @@ -20,9 +20,8 @@ @_attrs_define class GlobalrolesSingleGetResponseDataMeta: """ - Attributes - ---------- - errors : Union[Unset, List['GlobalrolesSingleGetResponseDataMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['GlobalrolesSingleGetResponseDataMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_meta_errors_item.py index 372c8b9a..017ddfb4 100644 --- a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class GlobalrolesSingleGetResponseDataMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, GlobalrolesSingleGetResponseDataMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, GlobalrolesSingleGetResponseDataMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class GlobalrolesSingleGetResponseDataMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_meta_errors_item_source.py index b9b47719..415b6a8f 100644 --- a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_meta_errors_item_source.py @@ -1,37 +1,50 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.globalroles_single_get_response_data_meta_errors_item_source_resource import ( + GlobalrolesSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + T = TypeVar("T", bound="GlobalrolesSingleGetResponseDataMetaErrorsItemSource") @_attrs_define class GlobalrolesSingleGetResponseDataMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, GlobalrolesSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the + error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "GlobalrolesSingleGetResponseDataMetaErrorsItemSourceResource" + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -39,19 +52,37 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.globalroles_single_get_response_data_meta_errors_item_source_resource import ( + GlobalrolesSingleGetResponseDataMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, GlobalrolesSingleGetResponseDataMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = GlobalrolesSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + globalroles_single_get_response_data_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) globalroles_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..168cd417 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="GlobalrolesSingleGetResponseDataMetaErrorsItemSourceResource" +) + + +@_attrs_define +class GlobalrolesSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + globalroles_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + globalroles_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return globalroles_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_relationships.py index 2bd21908..033d5cf7 100644 --- a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_relationships.py @@ -20,9 +20,8 @@ @_attrs_define class GlobalrolesSingleGetResponseDataRelationships: """ - Attributes - ---------- - users : Union[Unset, GlobalrolesSingleGetResponseDataRelationshipsUsers] + Attributes: + users (Union[Unset, GlobalrolesSingleGetResponseDataRelationshipsUsers]): """ users: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_relationships_users.py b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_relationships_users.py index 8d4ef6ba..e6abf14f 100644 --- a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_relationships_users.py +++ b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_relationships_users.py @@ -23,10 +23,9 @@ @_attrs_define class GlobalrolesSingleGetResponseDataRelationshipsUsers: """ - Attributes - ---------- - data : Union[Unset, List['GlobalrolesSingleGetResponseDataRelationshipsUsersDataItem']] - meta : Union[Unset, GlobalrolesSingleGetResponseDataRelationshipsUsersMeta] + Attributes: + data (Union[Unset, List['GlobalrolesSingleGetResponseDataRelationshipsUsersDataItem']]): + meta (Union[Unset, GlobalrolesSingleGetResponseDataRelationshipsUsersMeta]): """ data: Union[ @@ -46,7 +45,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_relationships_users_data_item.py b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_relationships_users_data_item.py index bd34e043..dab43585 100644 --- a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_relationships_users_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_relationships_users_data_item.py @@ -19,10 +19,9 @@ @_attrs_define class GlobalrolesSingleGetResponseDataRelationshipsUsersDataItem: """ - Attributes - ---------- - type : Union[Unset, GlobalrolesSingleGetResponseDataRelationshipsUsersDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, GlobalrolesSingleGetResponseDataRelationshipsUsersDataItemType]): + id (Union[Unset, str]): Example: MyUserId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_relationships_users_meta.py b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_relationships_users_meta.py index dd9ce37d..93020751 100644 --- a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_relationships_users_meta.py +++ b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_data_relationships_users_meta.py @@ -16,9 +16,8 @@ @_attrs_define class GlobalrolesSingleGetResponseDataRelationshipsUsersMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_links.py index 31b80c7f..acf610d4 100644 --- a/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/globalroles_single_get_response_links.py @@ -14,9 +14,8 @@ @_attrs_define class GlobalrolesSingleGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/roles/MyRoleId. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/icons_list_get_response.py b/polarion_rest_api_client/open_api_client/models/icons_list_get_response.py index fbc6036a..cf9affc4 100644 --- a/polarion_rest_api_client/open_api_client/models/icons_list_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/icons_list_get_response.py @@ -27,14 +27,13 @@ @_attrs_define class IconsListGetResponse: """ - Attributes - ---------- - meta : Union[Unset, IconsListGetResponseMeta] - data : Union[Unset, List['IconsListGetResponseDataItem']] - included : Union[Unset, List['IconsListGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, IconsListGetResponseLinks] + Attributes: + meta (Union[Unset, IconsListGetResponseMeta]): + data (Union[Unset, List['IconsListGetResponseDataItem']]): + included (Union[Unset, List['IconsListGetResponseIncludedItem']]): Related entities might be returned, see Rest API User + Guide. + links (Union[Unset, IconsListGetResponseLinks]): """ meta: Union[Unset, "IconsListGetResponseMeta"] = UNSET @@ -55,7 +54,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) included: Union[Unset, List[Dict[str, Any]]] = UNSET @@ -63,7 +61,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item.py index 166e64b6..800873cd 100644 --- a/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item.py @@ -29,14 +29,13 @@ @_attrs_define class IconsListGetResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, IconsListGetResponseDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, IconsListGetResponseDataItemAttributes] - meta : Union[Unset, IconsListGetResponseDataItemMeta] - links : Union[Unset, IconsListGetResponseDataItemLinks] + Attributes: + type (Union[Unset, IconsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: default/example.gif. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, IconsListGetResponseDataItemAttributes]): + meta (Union[Unset, IconsListGetResponseDataItemMeta]): + links (Union[Unset, IconsListGetResponseDataItemLinks]): """ type: Union[Unset, IconsListGetResponseDataItemType] = UNSET @@ -55,7 +54,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_attributes.py index 3db8ee55..2bba6af1 100644 --- a/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_attributes.py @@ -14,13 +14,14 @@ @_attrs_define class IconsListGetResponseDataItemAttributes: """ - Attributes - ---------- - icon_url : Union[Unset, str] - path : Union[Unset, str] + Attributes: + icon_url (Union[Unset, str]): Example: pathexample. + id (Union[Unset, str]): Example: pathexample. + path (Union[Unset, str]): Example: pathexample. """ icon_url: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET path: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict @@ -28,6 +29,9 @@ class IconsListGetResponseDataItemAttributes: def to_dict(self) -> Dict[str, Any]: icon_url = self.icon_url + + id = self.id + path = self.path field_dict: Dict[str, Any] = {} @@ -35,6 +39,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict.update({}) if icon_url is not UNSET: field_dict["iconUrl"] = icon_url + if id is not UNSET: + field_dict["id"] = id if path is not UNSET: field_dict["path"] = path @@ -45,10 +51,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() icon_url = d.pop("iconUrl", UNSET) + id = d.pop("id", UNSET) + path = d.pop("path", UNSET) icons_list_get_response_data_item_attributes_obj = cls( icon_url=icon_url, + id=id, path=path, ) diff --git a/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_links.py index 21efc31b..24bd6c35 100644 --- a/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_links.py @@ -14,9 +14,8 @@ @_attrs_define class IconsListGetResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/enumerations/defaulticons/example.gif. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_meta.py index 95996083..8aa4a8e4 100644 --- a/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_meta.py +++ b/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_meta.py @@ -20,9 +20,8 @@ @_attrs_define class IconsListGetResponseDataItemMeta: """ - Attributes - ---------- - errors : Union[Unset, List['IconsListGetResponseDataItemMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['IconsListGetResponseDataItemMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_meta_errors_item.py index fb62d3ca..acac926e 100644 --- a/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class IconsListGetResponseDataItemMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, IconsListGetResponseDataItemMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, IconsListGetResponseDataItemMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class IconsListGetResponseDataItemMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_meta_errors_item_source.py index 70ac6592..23257359 100644 --- a/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_meta_errors_item_source.py @@ -1,37 +1,49 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.icons_list_get_response_data_item_meta_errors_item_source_resource import ( + IconsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + T = TypeVar("T", bound="IconsListGetResponseDataItemMetaErrorsItemSource") @_attrs_define class IconsListGetResponseDataItemMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, IconsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing the error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "IconsListGetResponseDataItemMetaErrorsItemSourceResource" + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -39,19 +51,37 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.icons_list_get_response_data_item_meta_errors_item_source_resource import ( + IconsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, IconsListGetResponseDataItemMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = IconsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + icons_list_get_response_data_item_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) icons_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..dd4766b3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/icons_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="IconsListGetResponseDataItemMetaErrorsItemSourceResource" +) + + +@_attrs_define +class IconsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + icons_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + icons_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return icons_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/icons_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/icons_list_get_response_links.py index 3d227495..a120c971 100644 --- a/polarion_rest_api_client/open_api_client/models/icons_list_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/icons_list_get_response_links.py @@ -14,13 +14,17 @@ @_attrs_define class IconsListGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - first : Union[Unset, str] - prev : Union[Unset, str] - next_ : Union[Unset, str] - last : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/enumerations/defaulticons?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/enumerations/defaulticons?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/enumerations/defaulticons?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/enumerations/defaulticons?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/enumerations/defaulticons?page%5Bsize%5D=10&page%5Bnumber%5D=9. """ self_: Union[Unset, str] = UNSET @@ -34,9 +38,13 @@ class IconsListGetResponseLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + first = self.first + prev = self.prev + next_ = self.next_ + last = self.last field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/icons_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/icons_list_get_response_meta.py index 5bdfcd92..793c27b6 100644 --- a/polarion_rest_api_client/open_api_client/models/icons_list_get_response_meta.py +++ b/polarion_rest_api_client/open_api_client/models/icons_list_get_response_meta.py @@ -14,9 +14,8 @@ @_attrs_define class IconsListGetResponseMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/icons_list_post_request.py b/polarion_rest_api_client/open_api_client/models/icons_list_post_request.py new file mode 100644 index 00000000..dde6613e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/icons_list_post_request.py @@ -0,0 +1,83 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.icons_list_post_request_data_item import ( + IconsListPostRequestDataItem, + ) + + +T = TypeVar("T", bound="IconsListPostRequest") + + +@_attrs_define +class IconsListPostRequest: + """ + Attributes: + data (Union[Unset, List['IconsListPostRequestDataItem']]): + """ + + data: Union[Unset, List["IconsListPostRequestDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.icons_list_post_request_data_item import ( + IconsListPostRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = IconsListPostRequestDataItem.from_dict(data_item_data) + + data.append(data_item) + + icons_list_post_request_obj = cls( + data=data, + ) + + icons_list_post_request_obj.additional_properties = d + return icons_list_post_request_obj + + @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/polarion_rest_api_client/open_api_client/models/icons_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/icons_list_post_request_data_item.py new file mode 100644 index 00000000..c28338d6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/icons_list_post_request_data_item.py @@ -0,0 +1,73 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.icons_list_post_request_data_item_type import ( + IconsListPostRequestDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="IconsListPostRequestDataItem") + + +@_attrs_define +class IconsListPostRequestDataItem: + """ + Attributes: + type (Union[Unset, IconsListPostRequestDataItemType]): + """ + + type: Union[Unset, IconsListPostRequestDataItemType] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, IconsListPostRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = IconsListPostRequestDataItemType(_type) + + icons_list_post_request_data_item_obj = cls( + type=type, + ) + + icons_list_post_request_data_item_obj.additional_properties = d + return icons_list_post_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/icons_list_post_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/icons_list_post_request_data_item_type.py new file mode 100644 index 00000000..859599ee --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/icons_list_post_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class IconsListPostRequestDataItemType(str, Enum): + ICONS = "icons" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/icons_list_post_response.py b/polarion_rest_api_client/open_api_client/models/icons_list_post_response.py new file mode 100644 index 00000000..5834739d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/icons_list_post_response.py @@ -0,0 +1,83 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.icons_list_post_response_data_item import ( + IconsListPostResponseDataItem, + ) + + +T = TypeVar("T", bound="IconsListPostResponse") + + +@_attrs_define +class IconsListPostResponse: + """ + Attributes: + data (Union[Unset, List['IconsListPostResponseDataItem']]): + """ + + data: Union[Unset, List["IconsListPostResponseDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.icons_list_post_response_data_item import ( + IconsListPostResponseDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = IconsListPostResponseDataItem.from_dict(data_item_data) + + data.append(data_item) + + icons_list_post_response_obj = cls( + data=data, + ) + + icons_list_post_response_obj.additional_properties = d + return icons_list_post_response_obj + + @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/polarion_rest_api_client/open_api_client/models/icons_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/icons_list_post_response_data_item.py new file mode 100644 index 00000000..460fa2f3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/icons_list_post_response_data_item.py @@ -0,0 +1,108 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.icons_list_post_response_data_item_type import ( + IconsListPostResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.icons_list_post_response_data_item_links import ( + IconsListPostResponseDataItemLinks, + ) + + +T = TypeVar("T", bound="IconsListPostResponseDataItem") + + +@_attrs_define +class IconsListPostResponseDataItem: + """ + Attributes: + type (Union[Unset, IconsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: default/example.gif. + links (Union[Unset, IconsListPostResponseDataItemLinks]): + """ + + type: Union[Unset, IconsListPostResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + links: Union[Unset, "IconsListPostResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.icons_list_post_response_data_item_links import ( + IconsListPostResponseDataItemLinks, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, IconsListPostResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = IconsListPostResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[Unset, IconsListPostResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = IconsListPostResponseDataItemLinks.from_dict(_links) + + icons_list_post_response_data_item_obj = cls( + type=type, + id=id, + links=links, + ) + + icons_list_post_response_data_item_obj.additional_properties = d + return icons_list_post_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/icons_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/icons_list_post_response_data_item_links.py new file mode 100644 index 00000000..1147b323 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/icons_list_post_response_data_item_links.py @@ -0,0 +1,63 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="IconsListPostResponseDataItemLinks") + + +@_attrs_define +class IconsListPostResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/enumerations/defaulticons/example.gif. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + icons_list_post_response_data_item_links_obj = cls( + self_=self_, + ) + + icons_list_post_response_data_item_links_obj.additional_properties = d + return icons_list_post_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/icons_list_post_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/icons_list_post_response_data_item_type.py new file mode 100644 index 00000000..90fd0436 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/icons_list_post_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class IconsListPostResponseDataItemType(str, Enum): + ICONS = "icons" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/icons_single_get_response.py b/polarion_rest_api_client/open_api_client/models/icons_single_get_response.py index f801cfc0..b9f1c326 100644 --- a/polarion_rest_api_client/open_api_client/models/icons_single_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/icons_single_get_response.py @@ -26,13 +26,12 @@ @_attrs_define class IconsSingleGetResponse: """ - Attributes - ---------- - data : Union[Unset, IconsSingleGetResponseData] - included : Union[Unset, List['IconsSingleGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, IconsSingleGetResponseLinks] + Attributes: + data (Union[Unset, IconsSingleGetResponseData]): + included (Union[Unset, List['IconsSingleGetResponseIncludedItem']]): Related entities might be returned, see Rest API User + Guide. + links (Union[Unset, IconsSingleGetResponseLinks]): """ data: Union[Unset, "IconsSingleGetResponseData"] = UNSET @@ -52,7 +51,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data.py index 905a0f3a..69a30b37 100644 --- a/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data.py +++ b/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data.py @@ -29,14 +29,13 @@ @_attrs_define class IconsSingleGetResponseData: """ - Attributes - ---------- - type : Union[Unset, IconsSingleGetResponseDataType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, IconsSingleGetResponseDataAttributes] - meta : Union[Unset, IconsSingleGetResponseDataMeta] - links : Union[Unset, IconsSingleGetResponseDataLinks] + Attributes: + type (Union[Unset, IconsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: default/example.gif. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, IconsSingleGetResponseDataAttributes]): + meta (Union[Unset, IconsSingleGetResponseDataMeta]): + links (Union[Unset, IconsSingleGetResponseDataLinks]): """ type: Union[Unset, IconsSingleGetResponseDataType] = UNSET @@ -55,7 +54,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_attributes.py index 464234ac..2153927a 100644 --- a/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_attributes.py @@ -14,13 +14,14 @@ @_attrs_define class IconsSingleGetResponseDataAttributes: """ - Attributes - ---------- - icon_url : Union[Unset, str] - path : Union[Unset, str] + Attributes: + icon_url (Union[Unset, str]): Example: pathexample. + id (Union[Unset, str]): Example: pathexample. + path (Union[Unset, str]): Example: pathexample. """ icon_url: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET path: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict @@ -28,6 +29,9 @@ class IconsSingleGetResponseDataAttributes: def to_dict(self) -> Dict[str, Any]: icon_url = self.icon_url + + id = self.id + path = self.path field_dict: Dict[str, Any] = {} @@ -35,6 +39,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict.update({}) if icon_url is not UNSET: field_dict["iconUrl"] = icon_url + if id is not UNSET: + field_dict["id"] = id if path is not UNSET: field_dict["path"] = path @@ -45,10 +51,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() icon_url = d.pop("iconUrl", UNSET) + id = d.pop("id", UNSET) + path = d.pop("path", UNSET) icons_single_get_response_data_attributes_obj = cls( icon_url=icon_url, + id=id, path=path, ) diff --git a/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_links.py index dbaf0df9..714c4f64 100644 --- a/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_links.py +++ b/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_links.py @@ -14,9 +14,8 @@ @_attrs_define class IconsSingleGetResponseDataLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/enumerations/defaulticons/example.gif. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_meta.py index 8b48eef1..c9878c00 100644 --- a/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_meta.py +++ b/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_meta.py @@ -20,9 +20,8 @@ @_attrs_define class IconsSingleGetResponseDataMeta: """ - Attributes - ---------- - errors : Union[Unset, List['IconsSingleGetResponseDataMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['IconsSingleGetResponseDataMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_meta_errors_item.py index 240ae752..19a01baf 100644 --- a/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class IconsSingleGetResponseDataMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, IconsSingleGetResponseDataMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, IconsSingleGetResponseDataMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class IconsSingleGetResponseDataMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_meta_errors_item_source.py index c759e08a..0c1c66e8 100644 --- a/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_meta_errors_item_source.py @@ -1,37 +1,49 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.icons_single_get_response_data_meta_errors_item_source_resource import ( + IconsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + T = TypeVar("T", bound="IconsSingleGetResponseDataMetaErrorsItemSource") @_attrs_define class IconsSingleGetResponseDataMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, IconsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "IconsSingleGetResponseDataMetaErrorsItemSourceResource" + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -39,19 +51,37 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.icons_single_get_response_data_meta_errors_item_source_resource import ( + IconsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, IconsSingleGetResponseDataMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = IconsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + icons_single_get_response_data_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) icons_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..298df315 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/icons_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,81 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="IconsSingleGetResponseDataMetaErrorsItemSourceResource" +) + + +@_attrs_define +class IconsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + icons_single_get_response_data_meta_errors_item_source_resource_obj = ( + cls( + id=id, + type=type, + ) + ) + + icons_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return ( + icons_single_get_response_data_meta_errors_item_source_resource_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/icons_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/icons_single_get_response_links.py index ee935d7b..5febf4dd 100644 --- a/polarion_rest_api_client/open_api_client/models/icons_single_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/icons_single_get_response_links.py @@ -14,9 +14,8 @@ @_attrs_define class IconsSingleGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/enumerations/defaulticons/example.gif. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/import_test_results_request_body.py b/polarion_rest_api_client/open_api_client/models/import_test_results_request_body.py new file mode 100644 index 00000000..feef97a5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/import_test_results_request_body.py @@ -0,0 +1,72 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ImportTestResultsRequestBody") + + +@_attrs_define +class ImportTestResultsRequestBody: + """ + Attributes: + retest (Union[Unset, bool]): + defect_template_id (Union[Unset, str]): Example: MyProjectId/MyDefectId. + """ + + retest: Union[Unset, bool] = UNSET + defect_template_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + retest = self.retest + + defect_template_id = self.defect_template_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if retest is not UNSET: + field_dict["retest"] = retest + if defect_template_id is not UNSET: + field_dict["defectTemplateId"] = defect_template_id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + retest = d.pop("retest", UNSET) + + defect_template_id = d.pop("defectTemplateId", UNSET) + + import_test_results_request_body_obj = cls( + retest=retest, + defect_template_id=defect_template_id, + ) + + import_test_results_request_body_obj.additional_properties = d + return import_test_results_request_body_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_delete_request.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_delete_request.py new file mode 100644 index 00000000..28f0de27 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_delete_request.py @@ -0,0 +1,87 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.linkedoslcresources_list_delete_request_data_item import ( + LinkedoslcresourcesListDeleteRequestDataItem, + ) + + +T = TypeVar("T", bound="LinkedoslcresourcesListDeleteRequest") + + +@_attrs_define +class LinkedoslcresourcesListDeleteRequest: + """ + Attributes: + data (Union[Unset, List['LinkedoslcresourcesListDeleteRequestDataItem']]): + """ + + data: Union[ + Unset, List["LinkedoslcresourcesListDeleteRequestDataItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.linkedoslcresources_list_delete_request_data_item import ( + LinkedoslcresourcesListDeleteRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = LinkedoslcresourcesListDeleteRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + linkedoslcresources_list_delete_request_obj = cls( + data=data, + ) + + linkedoslcresources_list_delete_request_obj.additional_properties = d + return linkedoslcresources_list_delete_request_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_delete_request_data_item.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_delete_request_data_item.py new file mode 100644 index 00000000..38e6cebd --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_delete_request_data_item.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.linkedoslcresources_list_delete_request_data_item_type import ( + LinkedoslcresourcesListDeleteRequestDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LinkedoslcresourcesListDeleteRequestDataItem") + + +@_attrs_define +class LinkedoslcresourcesListDeleteRequestDataItem: + """ + Attributes: + type (Union[Unset, LinkedoslcresourcesListDeleteRequestDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/http://server-host- + name/ns/cm#relatedChangeRequest/http://server-host-name/application- + path/oslc/services/projects/MyProjectId/workitems/MyWorkItemId. + """ + + type: Union[ + Unset, LinkedoslcresourcesListDeleteRequestDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, LinkedoslcresourcesListDeleteRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = LinkedoslcresourcesListDeleteRequestDataItemType(_type) + + id = d.pop("id", UNSET) + + linkedoslcresources_list_delete_request_data_item_obj = cls( + type=type, + id=id, + ) + + linkedoslcresources_list_delete_request_data_item_obj.additional_properties = ( + d + ) + return linkedoslcresources_list_delete_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_delete_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_delete_request_data_item_type.py new file mode 100644 index 00000000..82f68518 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_delete_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class LinkedoslcresourcesListDeleteRequestDataItemType(str, Enum): + LINKEDOSLCRESOURCES = "linkedoslcresources" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response.py new file mode 100644 index 00000000..9dcf0434 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response.py @@ -0,0 +1,142 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.linkedoslcresources_list_get_response_data_item import ( + LinkedoslcresourcesListGetResponseDataItem, + ) + from ..models.linkedoslcresources_list_get_response_included_item import ( + LinkedoslcresourcesListGetResponseIncludedItem, + ) + from ..models.linkedoslcresources_list_get_response_meta import ( + LinkedoslcresourcesListGetResponseMeta, + ) + + +T = TypeVar("T", bound="LinkedoslcresourcesListGetResponse") + + +@_attrs_define +class LinkedoslcresourcesListGetResponse: + """ + Attributes: + meta (Union[Unset, LinkedoslcresourcesListGetResponseMeta]): + data (Union[Unset, List['LinkedoslcresourcesListGetResponseDataItem']]): + included (Union[Unset, List['LinkedoslcresourcesListGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + """ + + meta: Union[Unset, "LinkedoslcresourcesListGetResponseMeta"] = UNSET + data: Union[ + Unset, List["LinkedoslcresourcesListGetResponseDataItem"] + ] = UNSET + included: Union[ + Unset, List["LinkedoslcresourcesListGetResponseIncludedItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.linkedoslcresources_list_get_response_data_item import ( + LinkedoslcresourcesListGetResponseDataItem, + ) + from ..models.linkedoslcresources_list_get_response_included_item import ( + LinkedoslcresourcesListGetResponseIncludedItem, + ) + from ..models.linkedoslcresources_list_get_response_meta import ( + LinkedoslcresourcesListGetResponseMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, LinkedoslcresourcesListGetResponseMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = LinkedoslcresourcesListGetResponseMeta.from_dict(_meta) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = LinkedoslcresourcesListGetResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + LinkedoslcresourcesListGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + linkedoslcresources_list_get_response_obj = cls( + meta=meta, + data=data, + included=included, + ) + + linkedoslcresources_list_get_response_obj.additional_properties = d + return linkedoslcresources_list_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item.py new file mode 100644 index 00000000..fa337b87 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item.py @@ -0,0 +1,181 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.linkedoslcresources_list_get_response_data_item_type import ( + LinkedoslcresourcesListGetResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.linkedoslcresources_list_get_response_data_item_attributes import ( + LinkedoslcresourcesListGetResponseDataItemAttributes, + ) + from ..models.linkedoslcresources_list_get_response_data_item_links import ( + LinkedoslcresourcesListGetResponseDataItemLinks, + ) + from ..models.linkedoslcresources_list_get_response_data_item_meta import ( + LinkedoslcresourcesListGetResponseDataItemMeta, + ) + + +T = TypeVar("T", bound="LinkedoslcresourcesListGetResponseDataItem") + + +@_attrs_define +class LinkedoslcresourcesListGetResponseDataItem: + """ + Attributes: + type (Union[Unset, LinkedoslcresourcesListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/http://server-host- + name/ns/cm#relatedChangeRequest/http://server-host-name/application- + path/oslc/services/projects/MyProjectId/workitems/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, LinkedoslcresourcesListGetResponseDataItemAttributes]): + meta (Union[Unset, LinkedoslcresourcesListGetResponseDataItemMeta]): + links (Union[Unset, LinkedoslcresourcesListGetResponseDataItemLinks]): + """ + + type: Union[Unset, LinkedoslcresourcesListGetResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "LinkedoslcresourcesListGetResponseDataItemAttributes" + ] = UNSET + meta: Union[ + Unset, "LinkedoslcresourcesListGetResponseDataItemMeta" + ] = UNSET + links: Union[ + Unset, "LinkedoslcresourcesListGetResponseDataItemLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.linkedoslcresources_list_get_response_data_item_attributes import ( + LinkedoslcresourcesListGetResponseDataItemAttributes, + ) + from ..models.linkedoslcresources_list_get_response_data_item_links import ( + LinkedoslcresourcesListGetResponseDataItemLinks, + ) + from ..models.linkedoslcresources_list_get_response_data_item_meta import ( + LinkedoslcresourcesListGetResponseDataItemMeta, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, LinkedoslcresourcesListGetResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = LinkedoslcresourcesListGetResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, LinkedoslcresourcesListGetResponseDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + LinkedoslcresourcesListGetResponseDataItemAttributes.from_dict( + _attributes + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, LinkedoslcresourcesListGetResponseDataItemMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = LinkedoslcresourcesListGetResponseDataItemMeta.from_dict( + _meta + ) + + _links = d.pop("links", UNSET) + links: Union[Unset, LinkedoslcresourcesListGetResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = LinkedoslcresourcesListGetResponseDataItemLinks.from_dict( + _links + ) + + linkedoslcresources_list_get_response_data_item_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + meta=meta, + links=links, + ) + + linkedoslcresources_list_get_response_data_item_obj.additional_properties = ( + d + ) + return linkedoslcresources_list_get_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_attributes.py new file mode 100644 index 00000000..f0a86303 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_attributes.py @@ -0,0 +1,83 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LinkedoslcresourcesListGetResponseDataItemAttributes") + + +@_attrs_define +class LinkedoslcresourcesListGetResponseDataItemAttributes: + """ + Attributes: + label (Union[Unset, str]): Example: Label. + role (Union[Unset, str]): Example: http://open-services.net/ns/cm#relatedChangeRequest. + uri (Union[Unset, str]): Example: Uri. + """ + + label: Union[Unset, str] = UNSET + role: Union[Unset, str] = UNSET + uri: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + label = self.label + + role = self.role + + uri = self.uri + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if label is not UNSET: + field_dict["label"] = label + if role is not UNSET: + field_dict["role"] = role + if uri is not UNSET: + field_dict["uri"] = uri + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + label = d.pop("label", UNSET) + + role = d.pop("role", UNSET) + + uri = d.pop("uri", UNSET) + + linkedoslcresources_list_get_response_data_item_attributes_obj = cls( + label=label, + role=role, + uri=uri, + ) + + linkedoslcresources_list_get_response_data_item_attributes_obj.additional_properties = ( + d + ) + return linkedoslcresources_list_get_response_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_links.py new file mode 100644 index 00000000..f036e6ac --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_links.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="LinkedoslcresourcesListGetResponseDataItemLinks") + + +@_attrs_define +class LinkedoslcresourcesListGetResponseDataItemLinks: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + linkedoslcresources_list_get_response_data_item_links_obj = cls() + + linkedoslcresources_list_get_response_data_item_links_obj.additional_properties = ( + d + ) + return linkedoslcresources_list_get_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_meta.py new file mode 100644 index 00000000..4cc57496 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_meta.py @@ -0,0 +1,89 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.linkedoslcresources_list_get_response_data_item_meta_errors_item import ( + LinkedoslcresourcesListGetResponseDataItemMetaErrorsItem, + ) + + +T = TypeVar("T", bound="LinkedoslcresourcesListGetResponseDataItemMeta") + + +@_attrs_define +class LinkedoslcresourcesListGetResponseDataItemMeta: + """ + Attributes: + errors (Union[Unset, List['LinkedoslcresourcesListGetResponseDataItemMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["LinkedoslcresourcesListGetResponseDataItemMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.linkedoslcresources_list_get_response_data_item_meta_errors_item import ( + LinkedoslcresourcesListGetResponseDataItemMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = LinkedoslcresourcesListGetResponseDataItemMetaErrorsItem.from_dict( + errors_item_data + ) + + errors.append(errors_item) + + linkedoslcresources_list_get_response_data_item_meta_obj = cls( + errors=errors, + ) + + linkedoslcresources_list_get_response_data_item_meta_obj.additional_properties = ( + d + ) + return linkedoslcresources_list_get_response_data_item_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_meta_errors_item.py new file mode 100644 index 00000000..0616ac78 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_meta_errors_item.py @@ -0,0 +1,119 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.linkedoslcresources_list_get_response_data_item_meta_errors_item_source import ( + LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSource, + ) + + +T = TypeVar( + "T", bound="LinkedoslcresourcesListGetResponseDataItemMetaErrorsItem" +) + + +@_attrs_define +class LinkedoslcresourcesListGetResponseDataItemMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.linkedoslcresources_list_get_response_data_item_meta_errors_item_source import ( + LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, + LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSource, + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSource.from_dict( + _source + ) + + linkedoslcresources_list_get_response_data_item_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + linkedoslcresources_list_get_response_data_item_meta_errors_item_obj.additional_properties = ( + d + ) + return linkedoslcresources_list_get_response_data_item_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_meta_errors_item_source.py new file mode 100644 index 00000000..784ed3ce --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_meta_errors_item_source.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.linkedoslcresources_list_get_response_data_item_meta_errors_item_source_resource import ( + LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", bound="LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSource" +) + + +@_attrs_define +class LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSourceResource]): Resource + causing the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.linkedoslcresources_list_get_response_data_item_meta_errors_item_source_resource import ( + LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + + linkedoslcresources_list_get_response_data_item_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + linkedoslcresources_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( + d + ) + return linkedoslcresources_list_get_response_data_item_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..eec61d08 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSourceResource", +) + + +@_attrs_define +class LinkedoslcresourcesListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + linkedoslcresources_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + linkedoslcresources_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return linkedoslcresources_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_type.py new file mode 100644 index 00000000..a5419544 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class LinkedoslcresourcesListGetResponseDataItemType(str, Enum): + LINKEDOSLCRESOURCES = "linkedoslcresources" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_included_item.py new file mode 100644 index 00000000..aeb80d03 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="LinkedoslcresourcesListGetResponseIncludedItem") + + +@_attrs_define +class LinkedoslcresourcesListGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + linkedoslcresources_list_get_response_included_item_obj = cls() + + linkedoslcresources_list_get_response_included_item_obj.additional_properties = ( + d + ) + return linkedoslcresources_list_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_meta.py new file mode 100644 index 00000000..395087af --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_get_response_meta.py @@ -0,0 +1,65 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LinkedoslcresourcesListGetResponseMeta") + + +@_attrs_define +class LinkedoslcresourcesListGetResponseMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + linkedoslcresources_list_get_response_meta_obj = cls( + total_count=total_count, + ) + + linkedoslcresources_list_get_response_meta_obj.additional_properties = ( + d + ) + return linkedoslcresources_list_get_response_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_request.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_request.py new file mode 100644 index 00000000..b239b205 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_request.py @@ -0,0 +1,87 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.linkedoslcresources_list_post_request_data_item import ( + LinkedoslcresourcesListPostRequestDataItem, + ) + + +T = TypeVar("T", bound="LinkedoslcresourcesListPostRequest") + + +@_attrs_define +class LinkedoslcresourcesListPostRequest: + """ + Attributes: + data (Union[Unset, List['LinkedoslcresourcesListPostRequestDataItem']]): + """ + + data: Union[ + Unset, List["LinkedoslcresourcesListPostRequestDataItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.linkedoslcresources_list_post_request_data_item import ( + LinkedoslcresourcesListPostRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = LinkedoslcresourcesListPostRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + linkedoslcresources_list_post_request_obj = cls( + data=data, + ) + + linkedoslcresources_list_post_request_obj.additional_properties = d + return linkedoslcresources_list_post_request_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_request_data_item.py new file mode 100644 index 00000000..1049df81 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_request_data_item.py @@ -0,0 +1,109 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.linkedoslcresources_list_post_request_data_item_type import ( + LinkedoslcresourcesListPostRequestDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.linkedoslcresources_list_post_request_data_item_attributes import ( + LinkedoslcresourcesListPostRequestDataItemAttributes, + ) + + +T = TypeVar("T", bound="LinkedoslcresourcesListPostRequestDataItem") + + +@_attrs_define +class LinkedoslcresourcesListPostRequestDataItem: + """ + Attributes: + type (Union[Unset, LinkedoslcresourcesListPostRequestDataItemType]): + attributes (Union[Unset, LinkedoslcresourcesListPostRequestDataItemAttributes]): + """ + + type: Union[Unset, LinkedoslcresourcesListPostRequestDataItemType] = UNSET + attributes: Union[ + Unset, "LinkedoslcresourcesListPostRequestDataItemAttributes" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.linkedoslcresources_list_post_request_data_item_attributes import ( + LinkedoslcresourcesListPostRequestDataItemAttributes, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, LinkedoslcresourcesListPostRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = LinkedoslcresourcesListPostRequestDataItemType(_type) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, LinkedoslcresourcesListPostRequestDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + LinkedoslcresourcesListPostRequestDataItemAttributes.from_dict( + _attributes + ) + ) + + linkedoslcresources_list_post_request_data_item_obj = cls( + type=type, + attributes=attributes, + ) + + linkedoslcresources_list_post_request_data_item_obj.additional_properties = ( + d + ) + return linkedoslcresources_list_post_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_request_data_item_attributes.py new file mode 100644 index 00000000..e26d2e19 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_request_data_item_attributes.py @@ -0,0 +1,83 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LinkedoslcresourcesListPostRequestDataItemAttributes") + + +@_attrs_define +class LinkedoslcresourcesListPostRequestDataItemAttributes: + """ + Attributes: + label (Union[Unset, str]): Example: Label. + role (Union[Unset, str]): Example: http://open-services.net/ns/cm#relatedChangeRequest. + uri (Union[Unset, str]): Example: Uri. + """ + + label: Union[Unset, str] = UNSET + role: Union[Unset, str] = UNSET + uri: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + label = self.label + + role = self.role + + uri = self.uri + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if label is not UNSET: + field_dict["label"] = label + if role is not UNSET: + field_dict["role"] = role + if uri is not UNSET: + field_dict["uri"] = uri + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + label = d.pop("label", UNSET) + + role = d.pop("role", UNSET) + + uri = d.pop("uri", UNSET) + + linkedoslcresources_list_post_request_data_item_attributes_obj = cls( + label=label, + role=role, + uri=uri, + ) + + linkedoslcresources_list_post_request_data_item_attributes_obj.additional_properties = ( + d + ) + return linkedoslcresources_list_post_request_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_request_data_item_type.py new file mode 100644 index 00000000..ff6e1734 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class LinkedoslcresourcesListPostRequestDataItemType(str, Enum): + LINKEDOSLCRESOURCES = "linkedoslcresources" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_response.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_response.py new file mode 100644 index 00000000..e3c01007 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_response.py @@ -0,0 +1,87 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.linkedoslcresources_list_post_response_data_item import ( + LinkedoslcresourcesListPostResponseDataItem, + ) + + +T = TypeVar("T", bound="LinkedoslcresourcesListPostResponse") + + +@_attrs_define +class LinkedoslcresourcesListPostResponse: + """ + Attributes: + data (Union[Unset, List['LinkedoslcresourcesListPostResponseDataItem']]): + """ + + data: Union[ + Unset, List["LinkedoslcresourcesListPostResponseDataItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.linkedoslcresources_list_post_response_data_item import ( + LinkedoslcresourcesListPostResponseDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = LinkedoslcresourcesListPostResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + linkedoslcresources_list_post_response_obj = cls( + data=data, + ) + + linkedoslcresources_list_post_response_obj.additional_properties = d + return linkedoslcresources_list_post_response_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_response_data_item.py new file mode 100644 index 00000000..e863ee63 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_response_data_item.py @@ -0,0 +1,116 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.linkedoslcresources_list_post_response_data_item_type import ( + LinkedoslcresourcesListPostResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.linkedoslcresources_list_post_response_data_item_links import ( + LinkedoslcresourcesListPostResponseDataItemLinks, + ) + + +T = TypeVar("T", bound="LinkedoslcresourcesListPostResponseDataItem") + + +@_attrs_define +class LinkedoslcresourcesListPostResponseDataItem: + """ + Attributes: + type (Union[Unset, LinkedoslcresourcesListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/http://server-host- + name/ns/cm#relatedChangeRequest/http://server-host-name/application- + path/oslc/services/projects/MyProjectId/workitems/MyWorkItemId. + links (Union[Unset, LinkedoslcresourcesListPostResponseDataItemLinks]): + """ + + type: Union[Unset, LinkedoslcresourcesListPostResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + links: Union[ + Unset, "LinkedoslcresourcesListPostResponseDataItemLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.linkedoslcresources_list_post_response_data_item_links import ( + LinkedoslcresourcesListPostResponseDataItemLinks, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, LinkedoslcresourcesListPostResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = LinkedoslcresourcesListPostResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[Unset, LinkedoslcresourcesListPostResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = LinkedoslcresourcesListPostResponseDataItemLinks.from_dict( + _links + ) + + linkedoslcresources_list_post_response_data_item_obj = cls( + type=type, + id=id, + links=links, + ) + + linkedoslcresources_list_post_response_data_item_obj.additional_properties = ( + d + ) + return linkedoslcresources_list_post_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_response_data_item_links.py new file mode 100644 index 00000000..aa989da1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_response_data_item_links.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="LinkedoslcresourcesListPostResponseDataItemLinks") + + +@_attrs_define +class LinkedoslcresourcesListPostResponseDataItemLinks: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + linkedoslcresources_list_post_response_data_item_links_obj = cls() + + linkedoslcresources_list_post_response_data_item_links_obj.additional_properties = ( + d + ) + return linkedoslcresources_list_post_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_response_data_item_type.py new file mode 100644 index 00000000..d00a4ad1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedoslcresources_list_post_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class LinkedoslcresourcesListPostResponseDataItemType(str, Enum): + LINKEDOSLCRESOURCES = "linkedoslcresources" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_delete_request.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_delete_request.py index bcf8f7df..2d99abcf 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_delete_request.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_delete_request.py @@ -20,9 +20,8 @@ @_attrs_define class LinkedworkitemsListDeleteRequest: """ - Attributes - ---------- - data : Union[Unset, List['LinkedworkitemsListDeleteRequestDataItem']] + Attributes: + data (Union[Unset, List['LinkedworkitemsListDeleteRequestDataItem']]): """ data: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_delete_request_data_item.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_delete_request_data_item.py index a85645b9..ed14892a 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_delete_request_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_delete_request_data_item.py @@ -17,10 +17,9 @@ @_attrs_define class LinkedworkitemsListDeleteRequestDataItem: """ - Attributes - ---------- - type : Union[Unset, LinkedworkitemsListDeleteRequestDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, LinkedworkitemsListDeleteRequestDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/parent/MyProjectId/MyLinkedWorkItemId. """ type: Union[Unset, LinkedworkitemsListDeleteRequestDataItemType] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response.py index 74fc52ae..066ad35f 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response.py @@ -29,14 +29,13 @@ @_attrs_define class LinkedworkitemsListGetResponse: """ - Attributes - ---------- - meta : Union[Unset, LinkedworkitemsListGetResponseMeta] - data : Union[Unset, List['LinkedworkitemsListGetResponseDataItem']] - included : Union[Unset, List['LinkedworkitemsListGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, LinkedworkitemsListGetResponseLinks] + Attributes: + meta (Union[Unset, LinkedworkitemsListGetResponseMeta]): + data (Union[Unset, List['LinkedworkitemsListGetResponseDataItem']]): + included (Union[Unset, List['LinkedworkitemsListGetResponseIncludedItem']]): Related entities might be returned, + see Rest API + User Guide. + links (Union[Unset, LinkedworkitemsListGetResponseLinks]): """ meta: Union[Unset, "LinkedworkitemsListGetResponseMeta"] = UNSET @@ -59,7 +58,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) included: Union[Unset, List[Dict[str, Any]]] = UNSET @@ -67,7 +65,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item.py index 098facde..fe293c35 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item.py @@ -32,15 +32,14 @@ @_attrs_define class LinkedworkitemsListGetResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, LinkedworkitemsListGetResponseDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, LinkedworkitemsListGetResponseDataItemAttributes] - relationships : Union[Unset, LinkedworkitemsListGetResponseDataItemRelationships] - meta : Union[Unset, LinkedworkitemsListGetResponseDataItemMeta] - links : Union[Unset, LinkedworkitemsListGetResponseDataItemLinks] + Attributes: + type (Union[Unset, LinkedworkitemsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/parent/MyProjectId/MyLinkedWorkItemId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, LinkedworkitemsListGetResponseDataItemAttributes]): + relationships (Union[Unset, LinkedworkitemsListGetResponseDataItemRelationships]): + meta (Union[Unset, LinkedworkitemsListGetResponseDataItemMeta]): + links (Union[Unset, LinkedworkitemsListGetResponseDataItemLinks]): """ type: Union[Unset, LinkedworkitemsListGetResponseDataItemType] = UNSET @@ -64,7 +63,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_attributes.py index df255611..b5b39ef5 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_attributes.py @@ -14,11 +14,10 @@ @_attrs_define class LinkedworkitemsListGetResponseDataItemAttributes: """ - Attributes - ---------- - revision : Union[Unset, str] - role : Union[Unset, str] - suspect : Union[Unset, bool] + Attributes: + revision (Union[Unset, str]): Example: 1234. + role (Union[Unset, str]): Example: relates_to. + suspect (Union[Unset, bool]): """ revision: Union[Unset, str] = UNSET @@ -30,7 +29,9 @@ class LinkedworkitemsListGetResponseDataItemAttributes: def to_dict(self) -> Dict[str, Any]: revision = self.revision + role = self.role + suspect = self.suspect field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_links.py index cf09f4f9..24fa5cae 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_links.py @@ -14,9 +14,9 @@ @_attrs_define class LinkedworkitemsListGetResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/linkedworkitems/parent/MyProjectId/MyLinkedWorkItemId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_meta.py index 1e5b35f3..b9c22972 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_meta.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_meta.py @@ -20,9 +20,8 @@ @_attrs_define class LinkedworkitemsListGetResponseDataItemMeta: """ - Attributes - ---------- - errors : Union[Unset, List['LinkedworkitemsListGetResponseDataItemMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['LinkedworkitemsListGetResponseDataItemMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_meta_errors_item.py index 0d0b11ef..7a2b6ef7 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class LinkedworkitemsListGetResponseDataItemMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, LinkedworkitemsListGetResponseDataItemMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, LinkedworkitemsListGetResponseDataItemMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class LinkedworkitemsListGetResponseDataItemMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_meta_errors_item_source.py index 70f524ca..83f097f0 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_meta_errors_item_source.py @@ -1,13 +1,19 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.linkedworkitems_list_get_response_data_item_meta_errors_item_source_resource import ( + LinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + T = TypeVar( "T", bound="LinkedworkitemsListGetResponseDataItemMetaErrorsItemSource" ) @@ -16,24 +22,32 @@ @_attrs_define class LinkedworkitemsListGetResponseDataItemMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, LinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing + the error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "LinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource", + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -41,19 +55,38 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.linkedworkitems_list_get_response_data_item_meta_errors_item_source_resource import ( + LinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + LinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = LinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + linkedworkitems_list_get_response_data_item_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) linkedworkitems_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..997bd8ce --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="LinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource", +) + + +@_attrs_define +class LinkedworkitemsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + linkedworkitems_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + linkedworkitems_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return linkedworkitems_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_relationships.py index 4cc6dee7..6b024dd6 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_relationships.py @@ -20,9 +20,8 @@ @_attrs_define class LinkedworkitemsListGetResponseDataItemRelationships: """ - Attributes - ---------- - work_item : Union[Unset, LinkedworkitemsListGetResponseDataItemRelationshipsWorkItem] + Attributes: + work_item (Union[Unset, LinkedworkitemsListGetResponseDataItemRelationshipsWorkItem]): """ work_item: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_relationships_work_item.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_relationships_work_item.py index f9707779..8c075b8b 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_relationships_work_item.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_relationships_work_item.py @@ -22,9 +22,8 @@ @_attrs_define class LinkedworkitemsListGetResponseDataItemRelationshipsWorkItem: """ - Attributes - ---------- - data : Union[Unset, LinkedworkitemsListGetResponseDataItemRelationshipsWorkItemData] + Attributes: + data (Union[Unset, LinkedworkitemsListGetResponseDataItemRelationshipsWorkItemData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_relationships_work_item_data.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_relationships_work_item_data.py index 209f4024..2279ebb8 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_relationships_work_item_data.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_data_item_relationships_work_item_data.py @@ -20,11 +20,10 @@ @_attrs_define class LinkedworkitemsListGetResponseDataItemRelationshipsWorkItemData: """ - Attributes - ---------- - type : Union[Unset, LinkedworkitemsListGetResponseDataItemRelationshipsWorkItemDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, LinkedworkitemsListGetResponseDataItemRelationshipsWorkItemDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_links.py index 92bfb013..56976fd2 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_links.py @@ -14,13 +14,17 @@ @_attrs_define class LinkedworkitemsListGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - first : Union[Unset, str] - prev : Union[Unset, str] - next_ : Union[Unset, str] - last : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/linkedworkitems/parent/MyProjectId?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/linkedworkitems/parent/MyProjectId?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItemI + d/linkedworkitems/parent/MyProjectId?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/linkedworkitems/parent/MyProjectId?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItemI + d/linkedworkitems/parent/MyProjectId?page%5Bsize%5D=10&page%5Bnumber%5D=9. """ self_: Union[Unset, str] = UNSET @@ -34,9 +38,13 @@ class LinkedworkitemsListGetResponseLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + first = self.first + prev = self.prev + next_ = self.next_ + last = self.last field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_meta.py index 7fffedba..9e52214b 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_meta.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_get_response_meta.py @@ -14,9 +14,8 @@ @_attrs_define class LinkedworkitemsListGetResponseMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request.py index 3fa8b891..205946cb 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request.py @@ -20,9 +20,8 @@ @_attrs_define class LinkedworkitemsListPostRequest: """ - Attributes - ---------- - data : Union[Unset, List['LinkedworkitemsListPostRequestDataItem']] + Attributes: + data (Union[Unset, List['LinkedworkitemsListPostRequestDataItem']]): """ data: Union[Unset, List["LinkedworkitemsListPostRequestDataItem"]] = UNSET @@ -36,7 +35,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item.py index 66bd2f06..c7553ef7 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item.py @@ -26,11 +26,10 @@ @_attrs_define class LinkedworkitemsListPostRequestDataItem: """ - Attributes - ---------- - type : Union[Unset, LinkedworkitemsListPostRequestDataItemType] - attributes : Union[Unset, LinkedworkitemsListPostRequestDataItemAttributes] - relationships : Union[Unset, LinkedworkitemsListPostRequestDataItemRelationships] + Attributes: + type (Union[Unset, LinkedworkitemsListPostRequestDataItemType]): + attributes (Union[Unset, LinkedworkitemsListPostRequestDataItemAttributes]): + relationships (Union[Unset, LinkedworkitemsListPostRequestDataItemRelationships]): """ type: Union[Unset, LinkedworkitemsListPostRequestDataItemType] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item_attributes.py index 12e5cd11..029f56f5 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item_attributes.py @@ -14,11 +14,10 @@ @_attrs_define class LinkedworkitemsListPostRequestDataItemAttributes: """ - Attributes - ---------- - revision : Union[Unset, str] - role : Union[Unset, str] - suspect : Union[Unset, bool] + Attributes: + revision (Union[Unset, str]): Example: 1234. + role (Union[Unset, str]): Example: relates_to. + suspect (Union[Unset, bool]): """ revision: Union[Unset, str] = UNSET @@ -30,7 +29,9 @@ class LinkedworkitemsListPostRequestDataItemAttributes: def to_dict(self) -> Dict[str, Any]: revision = self.revision + role = self.role + suspect = self.suspect field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item_relationships.py index 9365e191..5a9c2827 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item_relationships.py @@ -20,9 +20,8 @@ @_attrs_define class LinkedworkitemsListPostRequestDataItemRelationships: """ - Attributes - ---------- - work_item : Union[Unset, LinkedworkitemsListPostRequestDataItemRelationshipsWorkItem] + Attributes: + work_item (Union[Unset, LinkedworkitemsListPostRequestDataItemRelationshipsWorkItem]): """ work_item: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item_relationships_work_item.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item_relationships_work_item.py index d75c394b..0cb5a9cf 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item_relationships_work_item.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item_relationships_work_item.py @@ -22,9 +22,8 @@ @_attrs_define class LinkedworkitemsListPostRequestDataItemRelationshipsWorkItem: """ - Attributes - ---------- - data : Union[Unset, LinkedworkitemsListPostRequestDataItemRelationshipsWorkItemData] + Attributes: + data (Union[Unset, LinkedworkitemsListPostRequestDataItemRelationshipsWorkItemData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item_relationships_work_item_data.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item_relationships_work_item_data.py index 6bc9d79c..4a3db30a 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item_relationships_work_item_data.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_request_data_item_relationships_work_item_data.py @@ -20,10 +20,9 @@ @_attrs_define class LinkedworkitemsListPostRequestDataItemRelationshipsWorkItemData: """ - Attributes - ---------- - type : Union[Unset, LinkedworkitemsListPostRequestDataItemRelationshipsWorkItemDataType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, LinkedworkitemsListPostRequestDataItemRelationshipsWorkItemDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_response.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_response.py index da51f40f..b4f82b60 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_response.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_response.py @@ -20,9 +20,8 @@ @_attrs_define class LinkedworkitemsListPostResponse: """ - Attributes - ---------- - data : Union[Unset, List['LinkedworkitemsListPostResponseDataItem']] + Attributes: + data (Union[Unset, List['LinkedworkitemsListPostResponseDataItem']]): """ data: Union[Unset, List["LinkedworkitemsListPostResponseDataItem"]] = UNSET @@ -36,7 +35,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_response_data_item.py index 3bbf2640..53694d28 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_response_data_item.py @@ -23,11 +23,10 @@ @_attrs_define class LinkedworkitemsListPostResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, LinkedworkitemsListPostResponseDataItemType] - id : Union[Unset, str] - links : Union[Unset, LinkedworkitemsListPostResponseDataItemLinks] + Attributes: + type (Union[Unset, LinkedworkitemsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/parent/MyProjectId/MyLinkedWorkItemId. + links (Union[Unset, LinkedworkitemsListPostResponseDataItemLinks]): """ type: Union[Unset, LinkedworkitemsListPostResponseDataItemType] = UNSET @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + links: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_response_data_item_links.py index 407a4954..e9d1e823 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_list_post_response_data_item_links.py @@ -14,9 +14,9 @@ @_attrs_define class LinkedworkitemsListPostResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/linkedworkitems/parent/MyProjectId/MyLinkedWorkItemId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response.py index 34aa5ce9..e726d446 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response.py @@ -26,13 +26,12 @@ @_attrs_define class LinkedworkitemsSingleGetResponse: """ - Attributes - ---------- - data : Union[Unset, LinkedworkitemsSingleGetResponseData] - included : Union[Unset, List['LinkedworkitemsSingleGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, LinkedworkitemsSingleGetResponseLinks] + Attributes: + data (Union[Unset, LinkedworkitemsSingleGetResponseData]): + included (Union[Unset, List['LinkedworkitemsSingleGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, LinkedworkitemsSingleGetResponseLinks]): """ data: Union[Unset, "LinkedworkitemsSingleGetResponseData"] = UNSET @@ -54,7 +53,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data.py index 65789343..c7e76697 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data.py @@ -32,15 +32,14 @@ @_attrs_define class LinkedworkitemsSingleGetResponseData: """ - Attributes - ---------- - type : Union[Unset, LinkedworkitemsSingleGetResponseDataType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, LinkedworkitemsSingleGetResponseDataAttributes] - relationships : Union[Unset, LinkedworkitemsSingleGetResponseDataRelationships] - meta : Union[Unset, LinkedworkitemsSingleGetResponseDataMeta] - links : Union[Unset, LinkedworkitemsSingleGetResponseDataLinks] + Attributes: + type (Union[Unset, LinkedworkitemsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/parent/MyProjectId/MyLinkedWorkItemId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, LinkedworkitemsSingleGetResponseDataAttributes]): + relationships (Union[Unset, LinkedworkitemsSingleGetResponseDataRelationships]): + meta (Union[Unset, LinkedworkitemsSingleGetResponseDataMeta]): + links (Union[Unset, LinkedworkitemsSingleGetResponseDataLinks]): """ type: Union[Unset, LinkedworkitemsSingleGetResponseDataType] = UNSET @@ -64,7 +63,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_attributes.py index 8a311276..678269e7 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_attributes.py @@ -14,11 +14,10 @@ @_attrs_define class LinkedworkitemsSingleGetResponseDataAttributes: """ - Attributes - ---------- - revision : Union[Unset, str] - role : Union[Unset, str] - suspect : Union[Unset, bool] + Attributes: + revision (Union[Unset, str]): Example: 1234. + role (Union[Unset, str]): Example: relates_to. + suspect (Union[Unset, bool]): """ revision: Union[Unset, str] = UNSET @@ -30,7 +29,9 @@ class LinkedworkitemsSingleGetResponseDataAttributes: def to_dict(self) -> Dict[str, Any]: revision = self.revision + role = self.role + suspect = self.suspect field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_links.py index 771fa51e..5377ac3c 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_links.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_links.py @@ -14,9 +14,9 @@ @_attrs_define class LinkedworkitemsSingleGetResponseDataLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/linkedworkitems/parent/MyProjectId/MyLinkedWorkItemId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_meta.py index dfcb7d08..585564ae 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_meta.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_meta.py @@ -20,9 +20,8 @@ @_attrs_define class LinkedworkitemsSingleGetResponseDataMeta: """ - Attributes - ---------- - errors : Union[Unset, List['LinkedworkitemsSingleGetResponseDataMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['LinkedworkitemsSingleGetResponseDataMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_meta_errors_item.py index 27f26782..0c6cabe2 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class LinkedworkitemsSingleGetResponseDataMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, LinkedworkitemsSingleGetResponseDataMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, LinkedworkitemsSingleGetResponseDataMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class LinkedworkitemsSingleGetResponseDataMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_meta_errors_item_source.py index 71af1f70..b9b45b5b 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_meta_errors_item_source.py @@ -1,13 +1,19 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.linkedworkitems_single_get_response_data_meta_errors_item_source_resource import ( + LinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + T = TypeVar( "T", bound="LinkedworkitemsSingleGetResponseDataMetaErrorsItemSource" ) @@ -16,24 +22,32 @@ @_attrs_define class LinkedworkitemsSingleGetResponseDataMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, LinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the + error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "LinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource", + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -41,19 +55,38 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.linkedworkitems_single_get_response_data_meta_errors_item_source_resource import ( + LinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + LinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = LinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + linkedworkitems_single_get_response_data_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) linkedworkitems_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..86eddc75 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="LinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource", +) + + +@_attrs_define +class LinkedworkitemsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + linkedworkitems_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + linkedworkitems_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return linkedworkitems_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_relationships.py index 9cd68458..c3581ff1 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_relationships.py @@ -20,9 +20,8 @@ @_attrs_define class LinkedworkitemsSingleGetResponseDataRelationships: """ - Attributes - ---------- - work_item : Union[Unset, LinkedworkitemsSingleGetResponseDataRelationshipsWorkItem] + Attributes: + work_item (Union[Unset, LinkedworkitemsSingleGetResponseDataRelationshipsWorkItem]): """ work_item: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_relationships_work_item.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_relationships_work_item.py index 8ba9e501..93e1917f 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_relationships_work_item.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_relationships_work_item.py @@ -22,9 +22,8 @@ @_attrs_define class LinkedworkitemsSingleGetResponseDataRelationshipsWorkItem: """ - Attributes - ---------- - data : Union[Unset, LinkedworkitemsSingleGetResponseDataRelationshipsWorkItemData] + Attributes: + data (Union[Unset, LinkedworkitemsSingleGetResponseDataRelationshipsWorkItemData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_relationships_work_item_data.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_relationships_work_item_data.py index 517cd7a6..c5ee558d 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_relationships_work_item_data.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_data_relationships_work_item_data.py @@ -19,11 +19,10 @@ @_attrs_define class LinkedworkitemsSingleGetResponseDataRelationshipsWorkItemData: """ - Attributes - ---------- - type : Union[Unset, LinkedworkitemsSingleGetResponseDataRelationshipsWorkItemDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, LinkedworkitemsSingleGetResponseDataRelationshipsWorkItemDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -42,6 +41,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_links.py index c4898526..03554cde 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_get_response_links.py @@ -14,9 +14,9 @@ @_attrs_define class LinkedworkitemsSingleGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/linkedworkitems/parent/MyProjectId/MyLinkedWorkItemId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_patch_request.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_patch_request.py index ae0fb824..cbff49dc 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_patch_request.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_patch_request.py @@ -20,9 +20,8 @@ @_attrs_define class LinkedworkitemsSinglePatchRequest: """ - Attributes - ---------- - data : Union[Unset, LinkedworkitemsSinglePatchRequestData] + Attributes: + data (Union[Unset, LinkedworkitemsSinglePatchRequestData]): """ data: Union[Unset, "LinkedworkitemsSinglePatchRequestData"] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_patch_request_data.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_patch_request_data.py index f033ae68..82434979 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_patch_request_data.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_patch_request_data.py @@ -23,11 +23,10 @@ @_attrs_define class LinkedworkitemsSinglePatchRequestData: """ - Attributes - ---------- - type : Union[Unset, LinkedworkitemsSinglePatchRequestDataType] - id : Union[Unset, str] - attributes : Union[Unset, LinkedworkitemsSinglePatchRequestDataAttributes] + Attributes: + type (Union[Unset, LinkedworkitemsSinglePatchRequestDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/parent/MyProjectId/MyLinkedWorkItemId. + attributes (Union[Unset, LinkedworkitemsSinglePatchRequestDataAttributes]): """ type: Union[Unset, LinkedworkitemsSinglePatchRequestDataType] = UNSET @@ -45,6 +44,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_patch_request_data_attributes.py b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_patch_request_data_attributes.py index aeb56c50..0eddf108 100644 --- a/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_patch_request_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/linkedworkitems_single_patch_request_data_attributes.py @@ -14,10 +14,9 @@ @_attrs_define class LinkedworkitemsSinglePatchRequestDataAttributes: """ - Attributes - ---------- - revision : Union[Unset, str] - suspect : Union[Unset, bool] + Attributes: + revision (Union[Unset, str]): Example: 1234. + suspect (Union[Unset, bool]): """ revision: Union[Unset, str] = UNSET @@ -28,6 +27,7 @@ class LinkedworkitemsSinglePatchRequestDataAttributes: def to_dict(self) -> Dict[str, Any]: revision = self.revision + suspect = self.suspect field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/move_project_request_body.py b/polarion_rest_api_client/open_api_client/models/move_project_request_body.py new file mode 100644 index 00000000..ba161a1f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/move_project_request_body.py @@ -0,0 +1,63 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MoveProjectRequestBody") + + +@_attrs_define +class MoveProjectRequestBody: + """ + Attributes: + location (Union[Unset, str]): Location of the new Project to be created. Example: MyLocation. + """ + + location: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + location = self.location + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if location is not UNSET: + field_dict["location"] = location + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + location = d.pop("location", UNSET) + + move_project_request_body_obj = cls( + location=location, + ) + + move_project_request_body_obj.additional_properties = d + return move_project_request_body_obj + + @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/polarion_rest_api_client/open_api_client/models/move_work_item_to_document_request_body.py b/polarion_rest_api_client/open_api_client/models/move_work_item_to_document_request_body.py index 8116f60c..cb9fe00e 100644 --- a/polarion_rest_api_client/open_api_client/models/move_work_item_to_document_request_body.py +++ b/polarion_rest_api_client/open_api_client/models/move_work_item_to_document_request_body.py @@ -14,11 +14,10 @@ @_attrs_define class MoveWorkItemToDocumentRequestBody: """ - Attributes - ---------- - target_document : Union[Unset, str] - previous_part : Union[Unset, str] - next_part : Union[Unset, str] + Attributes: + target_document (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId. + previous_part (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/workitem_MyWorkItemId. + next_part (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId/workitem_MyWorkItemId. """ target_document: Union[Unset, str] = UNSET @@ -30,7 +29,9 @@ class MoveWorkItemToDocumentRequestBody: def to_dict(self) -> Dict[str, Any]: target_document = self.target_document + previous_part = self.previous_part + next_part = self.next_part field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_request.py b/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_request.py index 044cec94..19064b2c 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_request.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_request.py @@ -20,9 +20,8 @@ @_attrs_define class PageAttachmentsListPostRequest: """ - Attributes - ---------- - data : Union[Unset, List['PageAttachmentsListPostRequestDataItem']] + Attributes: + data (Union[Unset, List['PageAttachmentsListPostRequestDataItem']]): """ data: Union[Unset, List["PageAttachmentsListPostRequestDataItem"]] = UNSET @@ -36,7 +35,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_request_data_item.py index 13516484..c928b762 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_request_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_request_data_item.py @@ -23,11 +23,10 @@ @_attrs_define class PageAttachmentsListPostRequestDataItem: """ - Attributes - ---------- - type : Union[Unset, PageAttachmentsListPostRequestDataItemType] - lid : Union[Unset, str] - attributes : Union[Unset, PageAttachmentsListPostRequestDataItemAttributes] + Attributes: + type (Union[Unset, PageAttachmentsListPostRequestDataItemType]): + lid (Union[Unset, str]): + attributes (Union[Unset, PageAttachmentsListPostRequestDataItemAttributes]): """ type: Union[Unset, PageAttachmentsListPostRequestDataItemType] = UNSET @@ -45,6 +44,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value lid = self.lid + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_request_data_item_attributes.py index 24dbc21d..92da2859 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_request_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_request_data_item_attributes.py @@ -14,10 +14,9 @@ @_attrs_define class PageAttachmentsListPostRequestDataItemAttributes: """ - Attributes - ---------- - file_name : Union[Unset, str] - title : Union[Unset, str] + Attributes: + file_name (Union[Unset, str]): Example: File Name. + title (Union[Unset, str]): Example: Title. """ file_name: Union[Unset, str] = UNSET @@ -28,6 +27,7 @@ class PageAttachmentsListPostRequestDataItemAttributes: def to_dict(self) -> Dict[str, Any]: file_name = self.file_name + title = self.title field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_response.py b/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_response.py index f89b7e06..e5570db6 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_response.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_response.py @@ -20,9 +20,8 @@ @_attrs_define class PageAttachmentsListPostResponse: """ - Attributes - ---------- - data : Union[Unset, List['PageAttachmentsListPostResponseDataItem']] + Attributes: + data (Union[Unset, List['PageAttachmentsListPostResponseDataItem']]): """ data: Union[Unset, List["PageAttachmentsListPostResponseDataItem"]] = UNSET @@ -36,7 +35,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_response_data_item.py index 87b83ce5..d1d59cfd 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_response_data_item.py @@ -23,11 +23,10 @@ @_attrs_define class PageAttachmentsListPostResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, PageAttachmentsListPostResponseDataItemType] - id : Union[Unset, str] - links : Union[Unset, PageAttachmentsListPostResponseDataItemLinks] + Attributes: + type (Union[Unset, PageAttachmentsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyRichPageId/MyAttachmentId. + links (Union[Unset, PageAttachmentsListPostResponseDataItemLinks]): """ type: Union[Unset, PageAttachmentsListPostResponseDataItemType] = UNSET @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + links: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_response_data_item_links.py index 83081025..7f3712b2 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_list_post_response_data_item_links.py @@ -14,10 +14,11 @@ @_attrs_define class PageAttachmentsListPostResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - content : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/pages/MyRichPageId/attachments/MyAttachmentId?revision=1234. + content (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/pages/MyRichPageId/attachments/MyAttachmentId/content?revision=1234. """ self_: Union[Unset, str] = UNSET @@ -28,6 +29,7 @@ class PageAttachmentsListPostResponseDataItemLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + content = self.content field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response.py b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response.py index bbb899ae..88c2172b 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response.py @@ -26,13 +26,12 @@ @_attrs_define class PageAttachmentsSingleGetResponse: """ - Attributes - ---------- - data : Union[Unset, PageAttachmentsSingleGetResponseData] - included : Union[Unset, List['PageAttachmentsSingleGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, PageAttachmentsSingleGetResponseLinks] + Attributes: + data (Union[Unset, PageAttachmentsSingleGetResponseData]): + included (Union[Unset, List['PageAttachmentsSingleGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, PageAttachmentsSingleGetResponseLinks]): """ data: Union[Unset, "PageAttachmentsSingleGetResponseData"] = UNSET @@ -54,7 +53,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data.py index 4b4d154c..69e8f0a6 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data.py @@ -32,15 +32,14 @@ @_attrs_define class PageAttachmentsSingleGetResponseData: """ - Attributes - ---------- - type : Union[Unset, PageAttachmentsSingleGetResponseDataType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, PageAttachmentsSingleGetResponseDataAttributes] - relationships : Union[Unset, PageAttachmentsSingleGetResponseDataRelationships] - meta : Union[Unset, PageAttachmentsSingleGetResponseDataMeta] - links : Union[Unset, PageAttachmentsSingleGetResponseDataLinks] + Attributes: + type (Union[Unset, PageAttachmentsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyRichPageId/MyAttachmentId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, PageAttachmentsSingleGetResponseDataAttributes]): + relationships (Union[Unset, PageAttachmentsSingleGetResponseDataRelationships]): + meta (Union[Unset, PageAttachmentsSingleGetResponseDataMeta]): + links (Union[Unset, PageAttachmentsSingleGetResponseDataLinks]): """ type: Union[Unset, PageAttachmentsSingleGetResponseDataType] = UNSET @@ -64,7 +63,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_attributes.py index 3f0302c1..ff21d91f 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_attributes.py @@ -16,13 +16,12 @@ @_attrs_define class PageAttachmentsSingleGetResponseDataAttributes: """ - Attributes - ---------- - file_name : Union[Unset, str] - id : Union[Unset, str] - length : Union[Unset, int] - title : Union[Unset, str] - updated : Union[Unset, datetime.datetime] + Attributes: + file_name (Union[Unset, str]): Example: File Name. + id (Union[Unset, str]): Example: MyAttachmentId. + length (Union[Unset, int]): + title (Union[Unset, str]): Example: Title. + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. """ file_name: Union[Unset, str] = UNSET @@ -36,9 +35,13 @@ class PageAttachmentsSingleGetResponseDataAttributes: def to_dict(self) -> Dict[str, Any]: file_name = self.file_name + id = self.id + length = self.length + title = self.title + updated: Union[Unset, str] = UNSET if not isinstance(self.updated, Unset): updated = self.updated.isoformat() diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_links.py index a6844a96..b220ba21 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_links.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_links.py @@ -14,10 +14,11 @@ @_attrs_define class PageAttachmentsSingleGetResponseDataLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - content : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/pages/MyRichPageId/attachments/MyAttachmentId?revision=1234. + content (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/pages/MyRichPageId/attachments/MyAttachmentId/content?revision=1234. """ self_: Union[Unset, str] = UNSET @@ -28,6 +29,7 @@ class PageAttachmentsSingleGetResponseDataLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + content = self.content field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_meta.py index ff1356a1..ab8e04be 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_meta.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_meta.py @@ -20,9 +20,8 @@ @_attrs_define class PageAttachmentsSingleGetResponseDataMeta: """ - Attributes - ---------- - errors : Union[Unset, List['PageAttachmentsSingleGetResponseDataMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['PageAttachmentsSingleGetResponseDataMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_meta_errors_item.py index 0d33f208..e26a51e7 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class PageAttachmentsSingleGetResponseDataMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, PageAttachmentsSingleGetResponseDataMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, PageAttachmentsSingleGetResponseDataMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class PageAttachmentsSingleGetResponseDataMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_meta_errors_item_source.py index 321769ad..154e29b9 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_meta_errors_item_source.py @@ -1,13 +1,19 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.page_attachments_single_get_response_data_meta_errors_item_source_resource import ( + PageAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + T = TypeVar( "T", bound="PageAttachmentsSingleGetResponseDataMetaErrorsItemSource" ) @@ -16,24 +22,32 @@ @_attrs_define class PageAttachmentsSingleGetResponseDataMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, PageAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the + error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "PageAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource", + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -41,19 +55,38 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.page_attachments_single_get_response_data_meta_errors_item_source_resource import ( + PageAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + PageAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = PageAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + page_attachments_single_get_response_data_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) page_attachments_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..485506cc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="PageAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource", +) + + +@_attrs_define +class PageAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + page_attachments_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + page_attachments_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return page_attachments_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships.py index 610376c6..d1297c61 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships.py @@ -23,10 +23,9 @@ @_attrs_define class PageAttachmentsSingleGetResponseDataRelationships: """ - Attributes - ---------- - author : Union[Unset, PageAttachmentsSingleGetResponseDataRelationshipsAuthor] - project : Union[Unset, PageAttachmentsSingleGetResponseDataRelationshipsProject] + Attributes: + author (Union[Unset, PageAttachmentsSingleGetResponseDataRelationshipsAuthor]): + project (Union[Unset, PageAttachmentsSingleGetResponseDataRelationshipsProject]): """ author: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships_author.py b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships_author.py index 263921a5..0dddb2d1 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships_author.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships_author.py @@ -22,9 +22,8 @@ @_attrs_define class PageAttachmentsSingleGetResponseDataRelationshipsAuthor: """ - Attributes - ---------- - data : Union[Unset, PageAttachmentsSingleGetResponseDataRelationshipsAuthorData] + Attributes: + data (Union[Unset, PageAttachmentsSingleGetResponseDataRelationshipsAuthorData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships_author_data.py index 01f0a363..4e1d1053 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships_author_data.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships_author_data.py @@ -19,11 +19,10 @@ @_attrs_define class PageAttachmentsSingleGetResponseDataRelationshipsAuthorData: """ - Attributes - ---------- - type : Union[Unset, PageAttachmentsSingleGetResponseDataRelationshipsAuthorDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, PageAttachmentsSingleGetResponseDataRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships_project.py b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships_project.py index 973f804f..559dcec4 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships_project.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships_project.py @@ -22,9 +22,8 @@ @_attrs_define class PageAttachmentsSingleGetResponseDataRelationshipsProject: """ - Attributes - ---------- - data : Union[Unset, PageAttachmentsSingleGetResponseDataRelationshipsProjectData] + Attributes: + data (Union[Unset, PageAttachmentsSingleGetResponseDataRelationshipsProjectData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships_project_data.py index 23c326d6..c5dfffce 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships_project_data.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_data_relationships_project_data.py @@ -19,11 +19,10 @@ @_attrs_define class PageAttachmentsSingleGetResponseDataRelationshipsProjectData: """ - Attributes - ---------- - type : Union[Unset, PageAttachmentsSingleGetResponseDataRelationshipsProjectDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, PageAttachmentsSingleGetResponseDataRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_links.py index e33ca5e0..c79a4cc8 100644 --- a/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/page_attachments_single_get_response_links.py @@ -14,9 +14,9 @@ @_attrs_define class PageAttachmentsSingleGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/pages/MyRichPageId/attachments/MyAttachmentId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_get_response.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response.py index d2cb9e65..c0d87a49 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response.py @@ -26,13 +26,12 @@ @_attrs_define class PagesSingleGetResponse: """ - Attributes - ---------- - data : Union[Unset, PagesSingleGetResponseData] - included : Union[Unset, List['PagesSingleGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, PagesSingleGetResponseLinks] + Attributes: + data (Union[Unset, PagesSingleGetResponseData]): + included (Union[Unset, List['PagesSingleGetResponseIncludedItem']]): Related entities might be returned, see Rest API User + Guide. + links (Union[Unset, PagesSingleGetResponseLinks]): """ data: Union[Unset, "PagesSingleGetResponseData"] = UNSET @@ -52,7 +51,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data.py index 1649b98e..803c349f 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data.py @@ -32,15 +32,14 @@ @_attrs_define class PagesSingleGetResponseData: """ - Attributes - ---------- - type : Union[Unset, PagesSingleGetResponseDataType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, PagesSingleGetResponseDataAttributes] - relationships : Union[Unset, PagesSingleGetResponseDataRelationships] - meta : Union[Unset, PagesSingleGetResponseDataMeta] - links : Union[Unset, PagesSingleGetResponseDataLinks] + Attributes: + type (Union[Unset, PagesSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyRichPageId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, PagesSingleGetResponseDataAttributes]): + relationships (Union[Unset, PagesSingleGetResponseDataRelationships]): + meta (Union[Unset, PagesSingleGetResponseDataMeta]): + links (Union[Unset, PagesSingleGetResponseDataLinks]): """ type: Union[Unset, PagesSingleGetResponseDataType] = UNSET @@ -62,7 +61,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_attributes.py index 4afd2082..03857c79 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_attributes.py @@ -16,13 +16,12 @@ @_attrs_define class PagesSingleGetResponseDataAttributes: """ - Attributes - ---------- - created : Union[Unset, datetime.datetime] - page_name : Union[Unset, str] - space_id : Union[Unset, str] - title : Union[Unset, str] - updated : Union[Unset, datetime.datetime] + Attributes: + created (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + page_name (Union[Unset, str]): Example: MyRichPageId. + space_id (Union[Unset, str]): Example: MySpaceId. + title (Union[Unset, str]): Example: Title. + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. """ created: Union[Unset, datetime.datetime] = UNSET @@ -40,8 +39,11 @@ def to_dict(self) -> Dict[str, Any]: created = self.created.isoformat() page_name = self.page_name + space_id = self.space_id + title = self.title + updated: Union[Unset, str] = UNSET if not isinstance(self.updated, Unset): updated = self.updated.isoformat() diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_links.py index 7fed10df..b09b102e 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_links.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_links.py @@ -14,9 +14,9 @@ @_attrs_define class PagesSingleGetResponseDataLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/pages/MyRichPageId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_meta.py index 3e5db089..96c09ade 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_meta.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_meta.py @@ -20,9 +20,8 @@ @_attrs_define class PagesSingleGetResponseDataMeta: """ - Attributes - ---------- - errors : Union[Unset, List['PagesSingleGetResponseDataMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['PagesSingleGetResponseDataMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_meta_errors_item.py index 8805f3b1..cab31826 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class PagesSingleGetResponseDataMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, PagesSingleGetResponseDataMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, PagesSingleGetResponseDataMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class PagesSingleGetResponseDataMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_meta_errors_item_source.py index 1e1ec11d..41675a9c 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_meta_errors_item_source.py @@ -1,37 +1,49 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.pages_single_get_response_data_meta_errors_item_source_resource import ( + PagesSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + T = TypeVar("T", bound="PagesSingleGetResponseDataMetaErrorsItemSource") @_attrs_define class PagesSingleGetResponseDataMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, PagesSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "PagesSingleGetResponseDataMetaErrorsItemSourceResource" + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -39,19 +51,37 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.pages_single_get_response_data_meta_errors_item_source_resource import ( + PagesSingleGetResponseDataMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, PagesSingleGetResponseDataMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = PagesSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + pages_single_get_response_data_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) pages_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..4a859d38 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,81 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="PagesSingleGetResponseDataMetaErrorsItemSourceResource" +) + + +@_attrs_define +class PagesSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + pages_single_get_response_data_meta_errors_item_source_resource_obj = ( + cls( + id=id, + type=type, + ) + ) + + pages_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return ( + pages_single_get_response_data_meta_errors_item_source_resource_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships.py index 9056827c..88e54c00 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships.py @@ -29,12 +29,11 @@ @_attrs_define class PagesSingleGetResponseDataRelationships: """ - Attributes - ---------- - attachments : Union[Unset, PagesSingleGetResponseDataRelationshipsAttachments] - author : Union[Unset, PagesSingleGetResponseDataRelationshipsAuthor] - project : Union[Unset, PagesSingleGetResponseDataRelationshipsProject] - updated_by : Union[Unset, PagesSingleGetResponseDataRelationshipsUpdatedBy] + Attributes: + attachments (Union[Unset, PagesSingleGetResponseDataRelationshipsAttachments]): + author (Union[Unset, PagesSingleGetResponseDataRelationshipsAuthor]): + project (Union[Unset, PagesSingleGetResponseDataRelationshipsProject]): + updated_by (Union[Unset, PagesSingleGetResponseDataRelationshipsUpdatedBy]): """ attachments: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_attachments.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_attachments.py index 7fcb9b2b..f56b08cc 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_attachments.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_attachments.py @@ -23,10 +23,9 @@ @_attrs_define class PagesSingleGetResponseDataRelationshipsAttachments: """ - Attributes - ---------- - data : Union[Unset, List['PagesSingleGetResponseDataRelationshipsAttachmentsDataItem']] - meta : Union[Unset, PagesSingleGetResponseDataRelationshipsAttachmentsMeta] + Attributes: + data (Union[Unset, List['PagesSingleGetResponseDataRelationshipsAttachmentsDataItem']]): + meta (Union[Unset, PagesSingleGetResponseDataRelationshipsAttachmentsMeta]): """ data: Union[ @@ -46,7 +45,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_attachments_data_item.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_attachments_data_item.py index 398962d8..977c68b8 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_attachments_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_attachments_data_item.py @@ -19,11 +19,10 @@ @_attrs_define class PagesSingleGetResponseDataRelationshipsAttachmentsDataItem: """ - Attributes - ---------- - type : Union[Unset, PagesSingleGetResponseDataRelationshipsAttachmentsDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, PagesSingleGetResponseDataRelationshipsAttachmentsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyRichPageId/MyAttachmentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_attachments_meta.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_attachments_meta.py index 00278a70..5e3d10a9 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_attachments_meta.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_attachments_meta.py @@ -16,9 +16,8 @@ @_attrs_define class PagesSingleGetResponseDataRelationshipsAttachmentsMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_author.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_author.py index dc5e99da..ebf0d710 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_author.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_author.py @@ -20,9 +20,8 @@ @_attrs_define class PagesSingleGetResponseDataRelationshipsAuthor: """ - Attributes - ---------- - data : Union[Unset, PagesSingleGetResponseDataRelationshipsAuthorData] + Attributes: + data (Union[Unset, PagesSingleGetResponseDataRelationshipsAuthorData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_author_data.py index 2c7ee270..cb4c91e3 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_author_data.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_author_data.py @@ -17,11 +17,10 @@ @_attrs_define class PagesSingleGetResponseDataRelationshipsAuthorData: """ - Attributes - ---------- - type : Union[Unset, PagesSingleGetResponseDataRelationshipsAuthorDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, PagesSingleGetResponseDataRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -39,6 +38,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_project.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_project.py index df2e81e5..e15f6f2f 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_project.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_project.py @@ -20,9 +20,8 @@ @_attrs_define class PagesSingleGetResponseDataRelationshipsProject: """ - Attributes - ---------- - data : Union[Unset, PagesSingleGetResponseDataRelationshipsProjectData] + Attributes: + data (Union[Unset, PagesSingleGetResponseDataRelationshipsProjectData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_project_data.py index 3dc7d2a5..a7766082 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_project_data.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_project_data.py @@ -17,11 +17,10 @@ @_attrs_define class PagesSingleGetResponseDataRelationshipsProjectData: """ - Attributes - ---------- - type : Union[Unset, PagesSingleGetResponseDataRelationshipsProjectDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, PagesSingleGetResponseDataRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -39,6 +38,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_updated_by.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_updated_by.py index b074ede3..1825aefd 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_updated_by.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_updated_by.py @@ -20,9 +20,8 @@ @_attrs_define class PagesSingleGetResponseDataRelationshipsUpdatedBy: """ - Attributes - ---------- - data : Union[Unset, PagesSingleGetResponseDataRelationshipsUpdatedByData] + Attributes: + data (Union[Unset, PagesSingleGetResponseDataRelationshipsUpdatedByData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_updated_by_data.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_updated_by_data.py index eee00a3c..69cb2951 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_updated_by_data.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_data_relationships_updated_by_data.py @@ -17,11 +17,10 @@ @_attrs_define class PagesSingleGetResponseDataRelationshipsUpdatedByData: """ - Attributes - ---------- - type : Union[Unset, PagesSingleGetResponseDataRelationshipsUpdatedByDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, PagesSingleGetResponseDataRelationshipsUpdatedByDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -39,6 +38,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_links.py index a495923d..57c7f761 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_get_response_links.py @@ -14,9 +14,9 @@ @_attrs_define class PagesSingleGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/spaces/MySpaceId/pages/MyRichPageId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_patch_request.py b/polarion_rest_api_client/open_api_client/models/pages_single_patch_request.py index 8224dcfd..8fcd9ab3 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_patch_request.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_patch_request.py @@ -20,9 +20,8 @@ @_attrs_define class PagesSinglePatchRequest: """ - Attributes - ---------- - data : Union[Unset, PagesSinglePatchRequestData] + Attributes: + data (Union[Unset, PagesSinglePatchRequestData]): """ data: Union[Unset, "PagesSinglePatchRequestData"] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_patch_request_data.py b/polarion_rest_api_client/open_api_client/models/pages_single_patch_request_data.py index 8b03b159..8c24e69d 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_patch_request_data.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_patch_request_data.py @@ -23,11 +23,10 @@ @_attrs_define class PagesSinglePatchRequestData: """ - Attributes - ---------- - type : Union[Unset, PagesSinglePatchRequestDataType] - id : Union[Unset, str] - attributes : Union[Unset, PagesSinglePatchRequestDataAttributes] + Attributes: + type (Union[Unset, PagesSinglePatchRequestDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyRichPageId. + attributes (Union[Unset, PagesSinglePatchRequestDataAttributes]): """ type: Union[Unset, PagesSinglePatchRequestDataType] = UNSET @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/pages_single_patch_request_data_attributes.py b/polarion_rest_api_client/open_api_client/models/pages_single_patch_request_data_attributes.py index e5b17d74..08f666b6 100644 --- a/polarion_rest_api_client/open_api_client/models/pages_single_patch_request_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/pages_single_patch_request_data_attributes.py @@ -14,9 +14,8 @@ @_attrs_define class PagesSinglePatchRequestDataAttributes: """ - Attributes - ---------- - title : Union[Unset, str] + Attributes: + title (Union[Unset, str]): Example: Title. """ title: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/pagination.py b/polarion_rest_api_client/open_api_client/models/pagination.py index 9964c089..0878212b 100644 --- a/polarion_rest_api_client/open_api_client/models/pagination.py +++ b/polarion_rest_api_client/open_api_client/models/pagination.py @@ -14,11 +14,10 @@ @_attrs_define class Pagination: """ - Attributes - ---------- - page_size : Union[Unset, int] - page_number : Union[Unset, int] - calculated_offset : Union[Unset, int] + Attributes: + page_size (Union[Unset, int]): + page_number (Union[Unset, int]): + calculated_offset (Union[Unset, int]): """ page_size: Union[Unset, int] = UNSET @@ -30,7 +29,9 @@ class Pagination: def to_dict(self) -> Dict[str, Any]: page_size = self.page_size + page_number = self.page_number + calculated_offset = self.calculated_offset field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/patch_document_attachments_request_body.py b/polarion_rest_api_client/open_api_client/models/patch_document_attachments_request_body.py index 2b759b8f..dc434fa9 100644 --- a/polarion_rest_api_client/open_api_client/models/patch_document_attachments_request_body.py +++ b/polarion_rest_api_client/open_api_client/models/patch_document_attachments_request_body.py @@ -22,11 +22,9 @@ @_attrs_define class PatchDocumentAttachmentsRequestBody: """ - Attributes - ---------- - resource : DocumentAttachmentsSinglePatchRequest - content : Union[Unset, File] - attachments content + Attributes: + resource (DocumentAttachmentsSinglePatchRequest): + content (Union[Unset, File]): attachments content """ resource: "DocumentAttachmentsSinglePatchRequest" diff --git a/polarion_rest_api_client/open_api_client/models/patch_test_run_attachments_request_body.py b/polarion_rest_api_client/open_api_client/models/patch_test_run_attachments_request_body.py new file mode 100644 index 00000000..872b201e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/patch_test_run_attachments_request_body.py @@ -0,0 +1,123 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import json +from io import BytesIO +from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, File, FileJsonType, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_single_patch_request import ( + TestrunAttachmentsSinglePatchRequest, + ) + + +T = TypeVar("T", bound="PatchTestRunAttachmentsRequestBody") + + +@_attrs_define +class PatchTestRunAttachmentsRequestBody: + """ + Attributes: + resource (TestrunAttachmentsSinglePatchRequest): + content (Union[Unset, File]): attachments content + """ + + resource: "TestrunAttachmentsSinglePatchRequest" + content: Union[Unset, File] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + resource = self.resource.to_dict() + + content: Union[Unset, FileJsonType] = UNSET + if not isinstance(self.content, Unset): + content = self.content.to_tuple() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "resource": resource, + } + ) + if content is not UNSET: + field_dict["content"] = content + + return field_dict + + def to_multipart(self) -> List[Tuple[str, Any]]: + field_list: List[Tuple[str, Any]] = [] + resource = ( + None, + json.dumps(self.resource.to_dict()).encode(), + "text/plain", + ) + + field_list.append(("resource", resource)) + content: Union[Unset, FileJsonType] = UNSET + if not isinstance(self.content, Unset): + content = self.content.to_tuple() + + if content is not UNSET: + field_list.append(("content", content)) + + field_dict: Dict[str, Any] = {} + field_dict.update( + { + key: (None, str(value).encode(), "text/plain") + for key, value in self.additional_properties.items() + } + ) + + field_list += list(field_dict.items()) + + return field_list + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_single_patch_request import ( + TestrunAttachmentsSinglePatchRequest, + ) + + d = src_dict.copy() + resource = TestrunAttachmentsSinglePatchRequest.from_dict( + d.pop("resource") + ) + + _content = d.pop("content", UNSET) + content: Union[Unset, File] + if isinstance(_content, Unset): + content = UNSET + else: + content = File(payload=BytesIO(_content)) + + patch_test_run_attachments_request_body_obj = cls( + resource=resource, + content=content, + ) + + patch_test_run_attachments_request_body_obj.additional_properties = d + return patch_test_run_attachments_request_body_obj + + @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/polarion_rest_api_client/open_api_client/models/patch_work_item_attachments_request_body.py b/polarion_rest_api_client/open_api_client/models/patch_work_item_attachments_request_body.py index 36330aaf..359ccaf5 100644 --- a/polarion_rest_api_client/open_api_client/models/patch_work_item_attachments_request_body.py +++ b/polarion_rest_api_client/open_api_client/models/patch_work_item_attachments_request_body.py @@ -22,11 +22,9 @@ @_attrs_define class PatchWorkItemAttachmentsRequestBody: """ - Attributes - ---------- - resource : WorkitemAttachmentsSinglePatchRequest - content : Union[Unset, File] - attachments content + Attributes: + resource (WorkitemAttachmentsSinglePatchRequest): + content (Union[Unset, File]): attachments content """ resource: "WorkitemAttachmentsSinglePatchRequest" diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_delete_request.py b/polarion_rest_api_client/open_api_client/models/plans_list_delete_request.py new file mode 100644 index 00000000..5c90e3ab --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_delete_request.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_delete_request_data_item import ( + PlansListDeleteRequestDataItem, + ) + + +T = TypeVar("T", bound="PlansListDeleteRequest") + + +@_attrs_define +class PlansListDeleteRequest: + """ + Attributes: + data (Union[Unset, List['PlansListDeleteRequestDataItem']]): + """ + + data: Union[Unset, List["PlansListDeleteRequestDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_delete_request_data_item import ( + PlansListDeleteRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = PlansListDeleteRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + plans_list_delete_request_obj = cls( + data=data, + ) + + plans_list_delete_request_obj.additional_properties = d + return plans_list_delete_request_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_delete_request_data_item.py b/polarion_rest_api_client/open_api_client/models/plans_list_delete_request_data_item.py new file mode 100644 index 00000000..06cb15d2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_delete_request_data_item.py @@ -0,0 +1,82 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_list_delete_request_data_item_type import ( + PlansListDeleteRequestDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansListDeleteRequestDataItem") + + +@_attrs_define +class PlansListDeleteRequestDataItem: + """ + Attributes: + type (Union[Unset, PlansListDeleteRequestDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyPlanId. + """ + + type: Union[Unset, PlansListDeleteRequestDataItemType] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, PlansListDeleteRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansListDeleteRequestDataItemType(_type) + + id = d.pop("id", UNSET) + + plans_list_delete_request_data_item_obj = cls( + type=type, + id=id, + ) + + plans_list_delete_request_data_item_obj.additional_properties = d + return plans_list_delete_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_delete_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_delete_request_data_item_type.py new file mode 100644 index 00000000..06134bed --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_delete_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListDeleteRequestDataItemType(str, Enum): + PLANS = "plans" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_get_response.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response.py new file mode 100644 index 00000000..61268c92 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response.py @@ -0,0 +1,154 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_get_response_data_item import ( + PlansListGetResponseDataItem, + ) + from ..models.plans_list_get_response_included_item import ( + PlansListGetResponseIncludedItem, + ) + from ..models.plans_list_get_response_links import ( + PlansListGetResponseLinks, + ) + from ..models.plans_list_get_response_meta import PlansListGetResponseMeta + + +T = TypeVar("T", bound="PlansListGetResponse") + + +@_attrs_define +class PlansListGetResponse: + """ + Attributes: + meta (Union[Unset, PlansListGetResponseMeta]): + data (Union[Unset, List['PlansListGetResponseDataItem']]): + included (Union[Unset, List['PlansListGetResponseIncludedItem']]): Related entities might be returned, see Rest API User + Guide. + links (Union[Unset, PlansListGetResponseLinks]): + """ + + meta: Union[Unset, "PlansListGetResponseMeta"] = UNSET + data: Union[Unset, List["PlansListGetResponseDataItem"]] = UNSET + included: Union[Unset, List["PlansListGetResponseIncludedItem"]] = UNSET + links: Union[Unset, "PlansListGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_get_response_data_item import ( + PlansListGetResponseDataItem, + ) + from ..models.plans_list_get_response_included_item import ( + PlansListGetResponseIncludedItem, + ) + from ..models.plans_list_get_response_links import ( + PlansListGetResponseLinks, + ) + from ..models.plans_list_get_response_meta import ( + PlansListGetResponseMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, PlansListGetResponseMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = PlansListGetResponseMeta.from_dict(_meta) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = PlansListGetResponseDataItem.from_dict(data_item_data) + + data.append(data_item) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = PlansListGetResponseIncludedItem.from_dict( + included_item_data + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, PlansListGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = PlansListGetResponseLinks.from_dict(_links) + + plans_list_get_response_obj = cls( + meta=meta, + data=data, + included=included, + links=links, + ) + + plans_list_get_response_obj.additional_properties = d + return plans_list_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item.py new file mode 100644 index 00000000..f0f8f6c6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item.py @@ -0,0 +1,191 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_list_get_response_data_item_type import ( + PlansListGetResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_get_response_data_item_attributes import ( + PlansListGetResponseDataItemAttributes, + ) + from ..models.plans_list_get_response_data_item_links import ( + PlansListGetResponseDataItemLinks, + ) + from ..models.plans_list_get_response_data_item_meta import ( + PlansListGetResponseDataItemMeta, + ) + from ..models.plans_list_get_response_data_item_relationships import ( + PlansListGetResponseDataItemRelationships, + ) + + +T = TypeVar("T", bound="PlansListGetResponseDataItem") + + +@_attrs_define +class PlansListGetResponseDataItem: + """ + Attributes: + type (Union[Unset, PlansListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyPlanId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, PlansListGetResponseDataItemAttributes]): + relationships (Union[Unset, PlansListGetResponseDataItemRelationships]): + meta (Union[Unset, PlansListGetResponseDataItemMeta]): + links (Union[Unset, PlansListGetResponseDataItemLinks]): + """ + + type: Union[Unset, PlansListGetResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[Unset, "PlansListGetResponseDataItemAttributes"] = UNSET + relationships: Union[ + Unset, "PlansListGetResponseDataItemRelationships" + ] = UNSET + meta: Union[Unset, "PlansListGetResponseDataItemMeta"] = UNSET + links: Union[Unset, "PlansListGetResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_get_response_data_item_attributes import ( + PlansListGetResponseDataItemAttributes, + ) + from ..models.plans_list_get_response_data_item_links import ( + PlansListGetResponseDataItemLinks, + ) + from ..models.plans_list_get_response_data_item_meta import ( + PlansListGetResponseDataItemMeta, + ) + from ..models.plans_list_get_response_data_item_relationships import ( + PlansListGetResponseDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, PlansListGetResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansListGetResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, PlansListGetResponseDataItemAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = PlansListGetResponseDataItemAttributes.from_dict( + _attributes + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[Unset, PlansListGetResponseDataItemRelationships] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + PlansListGetResponseDataItemRelationships.from_dict( + _relationships + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, PlansListGetResponseDataItemMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = PlansListGetResponseDataItemMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, PlansListGetResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = PlansListGetResponseDataItemLinks.from_dict(_links) + + plans_list_get_response_data_item_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + plans_list_get_response_data_item_obj.additional_properties = d + return plans_list_get_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes.py new file mode 100644 index 00000000..a703f3d3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes.py @@ -0,0 +1,362 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.plans_list_get_response_data_item_attributes_calculation_type import ( + PlansListGetResponseDataItemAttributesCalculationType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_get_response_data_item_attributes_description import ( + PlansListGetResponseDataItemAttributesDescription, + ) + from ..models.plans_list_get_response_data_item_attributes_home_page_content import ( + PlansListGetResponseDataItemAttributesHomePageContent, + ) + + +T = TypeVar("T", bound="PlansListGetResponseDataItemAttributes") + + +@_attrs_define +class PlansListGetResponseDataItemAttributes: + """ + Attributes: + allowed_types (Union[Unset, List[str]]): + calculation_type (Union[Unset, PlansListGetResponseDataItemAttributesCalculationType]): Example: timeBased. + capacity (Union[Unset, float]): + color (Union[Unset, str]): Example: Color. + created (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + default_estimate (Union[Unset, float]): + description (Union[Unset, PlansListGetResponseDataItemAttributesDescription]): + due_date (Union[Unset, datetime.date]): Example: 1970-01-01. + estimation_field (Union[Unset, str]): Example: Estimation Field. + finished_on (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + home_page_content (Union[Unset, PlansListGetResponseDataItemAttributesHomePageContent]): + id (Union[Unset, str]): Example: ID. + is_template (Union[Unset, bool]): + name (Union[Unset, str]): Example: Name. + previous_time_spent (Union[Unset, str]): Example: 5 1/2d. + prioritization_field (Union[Unset, str]): Example: Prioritization Field. + sort_order (Union[Unset, int]): + start_date (Union[Unset, datetime.date]): Example: 1970-01-01. + started_on (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + status (Union[Unset, str]): + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + use_report_from_template (Union[Unset, bool]): + """ + + allowed_types: Union[Unset, List[str]] = UNSET + calculation_type: Union[ + Unset, PlansListGetResponseDataItemAttributesCalculationType + ] = UNSET + capacity: Union[Unset, float] = UNSET + color: Union[Unset, str] = UNSET + created: Union[Unset, datetime.datetime] = UNSET + default_estimate: Union[Unset, float] = UNSET + description: Union[ + Unset, "PlansListGetResponseDataItemAttributesDescription" + ] = UNSET + due_date: Union[Unset, datetime.date] = UNSET + estimation_field: Union[Unset, str] = UNSET + finished_on: Union[Unset, datetime.datetime] = UNSET + home_page_content: Union[ + Unset, "PlansListGetResponseDataItemAttributesHomePageContent" + ] = UNSET + id: Union[Unset, str] = UNSET + is_template: Union[Unset, bool] = UNSET + name: Union[Unset, str] = UNSET + previous_time_spent: Union[Unset, str] = UNSET + prioritization_field: Union[Unset, str] = UNSET + sort_order: Union[Unset, int] = UNSET + start_date: Union[Unset, datetime.date] = UNSET + started_on: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, str] = UNSET + updated: Union[Unset, datetime.datetime] = UNSET + use_report_from_template: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + allowed_types: Union[Unset, List[str]] = UNSET + if not isinstance(self.allowed_types, Unset): + allowed_types = self.allowed_types + + calculation_type: Union[Unset, str] = UNSET + if not isinstance(self.calculation_type, Unset): + calculation_type = self.calculation_type.value + + capacity = self.capacity + + color = self.color + + created: Union[Unset, str] = UNSET + if not isinstance(self.created, Unset): + created = self.created.isoformat() + + default_estimate = self.default_estimate + + description: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.description, Unset): + description = self.description.to_dict() + + due_date: Union[Unset, str] = UNSET + if not isinstance(self.due_date, Unset): + due_date = self.due_date.isoformat() + + estimation_field = self.estimation_field + + finished_on: Union[Unset, str] = UNSET + if not isinstance(self.finished_on, Unset): + finished_on = self.finished_on.isoformat() + + home_page_content: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.home_page_content, Unset): + home_page_content = self.home_page_content.to_dict() + + id = self.id + + is_template = self.is_template + + name = self.name + + previous_time_spent = self.previous_time_spent + + prioritization_field = self.prioritization_field + + sort_order = self.sort_order + + start_date: Union[Unset, str] = UNSET + if not isinstance(self.start_date, Unset): + start_date = self.start_date.isoformat() + + started_on: Union[Unset, str] = UNSET + if not isinstance(self.started_on, Unset): + started_on = self.started_on.isoformat() + + status = self.status + + updated: Union[Unset, str] = UNSET + if not isinstance(self.updated, Unset): + updated = self.updated.isoformat() + + use_report_from_template = self.use_report_from_template + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if allowed_types is not UNSET: + field_dict["allowedTypes"] = allowed_types + if calculation_type is not UNSET: + field_dict["calculationType"] = calculation_type + if capacity is not UNSET: + field_dict["capacity"] = capacity + if color is not UNSET: + field_dict["color"] = color + if created is not UNSET: + field_dict["created"] = created + if default_estimate is not UNSET: + field_dict["defaultEstimate"] = default_estimate + if description is not UNSET: + field_dict["description"] = description + if due_date is not UNSET: + field_dict["dueDate"] = due_date + if estimation_field is not UNSET: + field_dict["estimationField"] = estimation_field + if finished_on is not UNSET: + field_dict["finishedOn"] = finished_on + if home_page_content is not UNSET: + field_dict["homePageContent"] = home_page_content + if id is not UNSET: + field_dict["id"] = id + if is_template is not UNSET: + field_dict["isTemplate"] = is_template + if name is not UNSET: + field_dict["name"] = name + if previous_time_spent is not UNSET: + field_dict["previousTimeSpent"] = previous_time_spent + if prioritization_field is not UNSET: + field_dict["prioritizationField"] = prioritization_field + if sort_order is not UNSET: + field_dict["sortOrder"] = sort_order + if start_date is not UNSET: + field_dict["startDate"] = start_date + if started_on is not UNSET: + field_dict["startedOn"] = started_on + if status is not UNSET: + field_dict["status"] = status + if updated is not UNSET: + field_dict["updated"] = updated + if use_report_from_template is not UNSET: + field_dict["useReportFromTemplate"] = use_report_from_template + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_get_response_data_item_attributes_description import ( + PlansListGetResponseDataItemAttributesDescription, + ) + from ..models.plans_list_get_response_data_item_attributes_home_page_content import ( + PlansListGetResponseDataItemAttributesHomePageContent, + ) + + d = src_dict.copy() + allowed_types = cast(List[str], d.pop("allowedTypes", UNSET)) + + _calculation_type = d.pop("calculationType", UNSET) + calculation_type: Union[ + Unset, PlansListGetResponseDataItemAttributesCalculationType + ] + if isinstance(_calculation_type, Unset): + calculation_type = UNSET + else: + calculation_type = ( + PlansListGetResponseDataItemAttributesCalculationType( + _calculation_type + ) + ) + + capacity = d.pop("capacity", UNSET) + + color = d.pop("color", UNSET) + + _created = d.pop("created", UNSET) + created: Union[Unset, datetime.datetime] + if isinstance(_created, Unset): + created = UNSET + else: + created = isoparse(_created) + + default_estimate = d.pop("defaultEstimate", UNSET) + + _description = d.pop("description", UNSET) + description: Union[ + Unset, PlansListGetResponseDataItemAttributesDescription + ] + if isinstance(_description, Unset): + description = UNSET + else: + description = ( + PlansListGetResponseDataItemAttributesDescription.from_dict( + _description + ) + ) + + _due_date = d.pop("dueDate", UNSET) + due_date: Union[Unset, datetime.date] + if isinstance(_due_date, Unset): + due_date = UNSET + else: + due_date = isoparse(_due_date).date() + + estimation_field = d.pop("estimationField", UNSET) + + _finished_on = d.pop("finishedOn", UNSET) + finished_on: Union[Unset, datetime.datetime] + if isinstance(_finished_on, Unset): + finished_on = UNSET + else: + finished_on = isoparse(_finished_on) + + _home_page_content = d.pop("homePageContent", UNSET) + home_page_content: Union[ + Unset, PlansListGetResponseDataItemAttributesHomePageContent + ] + if isinstance(_home_page_content, Unset): + home_page_content = UNSET + else: + home_page_content = PlansListGetResponseDataItemAttributesHomePageContent.from_dict( + _home_page_content + ) + + id = d.pop("id", UNSET) + + is_template = d.pop("isTemplate", UNSET) + + name = d.pop("name", UNSET) + + previous_time_spent = d.pop("previousTimeSpent", UNSET) + + prioritization_field = d.pop("prioritizationField", UNSET) + + sort_order = d.pop("sortOrder", UNSET) + + _start_date = d.pop("startDate", UNSET) + start_date: Union[Unset, datetime.date] + if isinstance(_start_date, Unset): + start_date = UNSET + else: + start_date = isoparse(_start_date).date() + + _started_on = d.pop("startedOn", UNSET) + started_on: Union[Unset, datetime.datetime] + if isinstance(_started_on, Unset): + started_on = UNSET + else: + started_on = isoparse(_started_on) + + status = d.pop("status", UNSET) + + _updated = d.pop("updated", UNSET) + updated: Union[Unset, datetime.datetime] + if isinstance(_updated, Unset): + updated = UNSET + else: + updated = isoparse(_updated) + + use_report_from_template = d.pop("useReportFromTemplate", UNSET) + + plans_list_get_response_data_item_attributes_obj = cls( + allowed_types=allowed_types, + calculation_type=calculation_type, + capacity=capacity, + color=color, + created=created, + default_estimate=default_estimate, + description=description, + due_date=due_date, + estimation_field=estimation_field, + finished_on=finished_on, + home_page_content=home_page_content, + id=id, + is_template=is_template, + name=name, + previous_time_spent=previous_time_spent, + prioritization_field=prioritization_field, + sort_order=sort_order, + start_date=start_date, + started_on=started_on, + status=status, + updated=updated, + use_report_from_template=use_report_from_template, + ) + + plans_list_get_response_data_item_attributes_obj.additional_properties = ( + d + ) + return plans_list_get_response_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_calculation_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_calculation_type.py new file mode 100644 index 00000000..3454e093 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_calculation_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListGetResponseDataItemAttributesCalculationType(str, Enum): + CUSTOMFIELDBASED = "customFieldBased" + TIMEBASED = "timeBased" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_description.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_description.py new file mode 100644 index 00000000..8d4479d7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_description.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_list_get_response_data_item_attributes_description_type import ( + PlansListGetResponseDataItemAttributesDescriptionType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansListGetResponseDataItemAttributesDescription") + + +@_attrs_define +class PlansListGetResponseDataItemAttributesDescription: + """ + Attributes: + type (Union[Unset, PlansListGetResponseDataItemAttributesDescriptionType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, PlansListGetResponseDataItemAttributesDescriptionType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansListGetResponseDataItemAttributesDescriptionType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansListGetResponseDataItemAttributesDescriptionType(_type) + + value = d.pop("value", UNSET) + + plans_list_get_response_data_item_attributes_description_obj = cls( + type=type, + value=value, + ) + + plans_list_get_response_data_item_attributes_description_obj.additional_properties = ( + d + ) + return plans_list_get_response_data_item_attributes_description_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_description_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_description_type.py new file mode 100644 index 00000000..24efc2ea --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_description_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListGetResponseDataItemAttributesDescriptionType(str, Enum): + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_home_page_content.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_home_page_content.py new file mode 100644 index 00000000..2f574497 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_home_page_content.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_list_get_response_data_item_attributes_home_page_content_type import ( + PlansListGetResponseDataItemAttributesHomePageContentType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansListGetResponseDataItemAttributesHomePageContent") + + +@_attrs_define +class PlansListGetResponseDataItemAttributesHomePageContent: + """ + Attributes: + type (Union[Unset, PlansListGetResponseDataItemAttributesHomePageContentType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, PlansListGetResponseDataItemAttributesHomePageContentType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansListGetResponseDataItemAttributesHomePageContentType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansListGetResponseDataItemAttributesHomePageContentType( + _type + ) + + value = d.pop("value", UNSET) + + plans_list_get_response_data_item_attributes_home_page_content_obj = ( + cls( + type=type, + value=value, + ) + ) + + plans_list_get_response_data_item_attributes_home_page_content_obj.additional_properties = ( + d + ) + return ( + plans_list_get_response_data_item_attributes_home_page_content_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_home_page_content_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_home_page_content_type.py new file mode 100644 index 00000000..32550a1f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_attributes_home_page_content_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListGetResponseDataItemAttributesHomePageContentType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_links.py new file mode 100644 index 00000000..6ed5e051 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_links.py @@ -0,0 +1,74 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansListGetResponseDataItemLinks") + + +@_attrs_define +class PlansListGetResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/plans/MyPlanId?revision=1234. + portal (Union[Unset, str]): Example: server-host-name/application- + path/polarion/redirect/project/MyProjectId/plan?id=MyPlanId&revision=1234. + """ + + self_: Union[Unset, str] = UNSET + portal: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + portal = self.portal + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if portal is not UNSET: + field_dict["portal"] = portal + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + portal = d.pop("portal", UNSET) + + plans_list_get_response_data_item_links_obj = cls( + self_=self_, + portal=portal, + ) + + plans_list_get_response_data_item_links_obj.additional_properties = d + return plans_list_get_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_meta.py new file mode 100644 index 00000000..a4a9e2f9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_meta.py @@ -0,0 +1,87 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_get_response_data_item_meta_errors_item import ( + PlansListGetResponseDataItemMetaErrorsItem, + ) + + +T = TypeVar("T", bound="PlansListGetResponseDataItemMeta") + + +@_attrs_define +class PlansListGetResponseDataItemMeta: + """ + Attributes: + errors (Union[Unset, List['PlansListGetResponseDataItemMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["PlansListGetResponseDataItemMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_get_response_data_item_meta_errors_item import ( + PlansListGetResponseDataItemMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = PlansListGetResponseDataItemMetaErrorsItem.from_dict( + errors_item_data + ) + + errors.append(errors_item) + + plans_list_get_response_data_item_meta_obj = cls( + errors=errors, + ) + + plans_list_get_response_data_item_meta_obj.additional_properties = d + return plans_list_get_response_data_item_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_meta_errors_item.py new file mode 100644 index 00000000..90c54b86 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_meta_errors_item.py @@ -0,0 +1,116 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_get_response_data_item_meta_errors_item_source import ( + PlansListGetResponseDataItemMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="PlansListGetResponseDataItemMetaErrorsItem") + + +@_attrs_define +class PlansListGetResponseDataItemMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, PlansListGetResponseDataItemMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "PlansListGetResponseDataItemMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_get_response_data_item_meta_errors_item_source import ( + PlansListGetResponseDataItemMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[Unset, PlansListGetResponseDataItemMetaErrorsItemSource] + if isinstance(_source, Unset): + source = UNSET + else: + source = ( + PlansListGetResponseDataItemMetaErrorsItemSource.from_dict( + _source + ) + ) + + plans_list_get_response_data_item_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + plans_list_get_response_data_item_meta_errors_item_obj.additional_properties = ( + d + ) + return plans_list_get_response_data_item_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_meta_errors_item_source.py new file mode 100644 index 00000000..ce0a481c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_meta_errors_item_source.py @@ -0,0 +1,106 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_get_response_data_item_meta_errors_item_source_resource import ( + PlansListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + +T = TypeVar("T", bound="PlansListGetResponseDataItemMetaErrorsItemSource") + + +@_attrs_define +class PlansListGetResponseDataItemMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, PlansListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "PlansListGetResponseDataItemMetaErrorsItemSourceResource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_get_response_data_item_meta_errors_item_source_resource import ( + PlansListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, PlansListGetResponseDataItemMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = PlansListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + + plans_list_get_response_data_item_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + plans_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( + d + ) + return plans_list_get_response_data_item_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..b8686047 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="PlansListGetResponseDataItemMetaErrorsItemSourceResource" +) + + +@_attrs_define +class PlansListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + plans_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + plans_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return plans_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships.py new file mode 100644 index 00000000..8856f64a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships.py @@ -0,0 +1,230 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_get_response_data_item_relationships_author import ( + PlansListGetResponseDataItemRelationshipsAuthor, + ) + from ..models.plans_list_get_response_data_item_relationships_parent import ( + PlansListGetResponseDataItemRelationshipsParent, + ) + from ..models.plans_list_get_response_data_item_relationships_project import ( + PlansListGetResponseDataItemRelationshipsProject, + ) + from ..models.plans_list_get_response_data_item_relationships_project_span import ( + PlansListGetResponseDataItemRelationshipsProjectSpan, + ) + from ..models.plans_list_get_response_data_item_relationships_template import ( + PlansListGetResponseDataItemRelationshipsTemplate, + ) + from ..models.plans_list_get_response_data_item_relationships_work_items import ( + PlansListGetResponseDataItemRelationshipsWorkItems, + ) + + +T = TypeVar("T", bound="PlansListGetResponseDataItemRelationships") + + +@_attrs_define +class PlansListGetResponseDataItemRelationships: + """ + Attributes: + author (Union[Unset, PlansListGetResponseDataItemRelationshipsAuthor]): + parent (Union[Unset, PlansListGetResponseDataItemRelationshipsParent]): + project (Union[Unset, PlansListGetResponseDataItemRelationshipsProject]): + project_span (Union[Unset, PlansListGetResponseDataItemRelationshipsProjectSpan]): + template (Union[Unset, PlansListGetResponseDataItemRelationshipsTemplate]): + work_items (Union[Unset, PlansListGetResponseDataItemRelationshipsWorkItems]): + """ + + author: Union[ + Unset, "PlansListGetResponseDataItemRelationshipsAuthor" + ] = UNSET + parent: Union[ + Unset, "PlansListGetResponseDataItemRelationshipsParent" + ] = UNSET + project: Union[ + Unset, "PlansListGetResponseDataItemRelationshipsProject" + ] = UNSET + project_span: Union[ + Unset, "PlansListGetResponseDataItemRelationshipsProjectSpan" + ] = UNSET + template: Union[ + Unset, "PlansListGetResponseDataItemRelationshipsTemplate" + ] = UNSET + work_items: Union[ + Unset, "PlansListGetResponseDataItemRelationshipsWorkItems" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + author: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.author, Unset): + author = self.author.to_dict() + + parent: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.parent, Unset): + parent = self.parent.to_dict() + + project: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project, Unset): + project = self.project.to_dict() + + project_span: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project_span, Unset): + project_span = self.project_span.to_dict() + + template: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.template, Unset): + template = self.template.to_dict() + + work_items: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.work_items, Unset): + work_items = self.work_items.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if author is not UNSET: + field_dict["author"] = author + if parent is not UNSET: + field_dict["parent"] = parent + if project is not UNSET: + field_dict["project"] = project + if project_span is not UNSET: + field_dict["projectSpan"] = project_span + if template is not UNSET: + field_dict["template"] = template + if work_items is not UNSET: + field_dict["workItems"] = work_items + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_get_response_data_item_relationships_author import ( + PlansListGetResponseDataItemRelationshipsAuthor, + ) + from ..models.plans_list_get_response_data_item_relationships_parent import ( + PlansListGetResponseDataItemRelationshipsParent, + ) + from ..models.plans_list_get_response_data_item_relationships_project import ( + PlansListGetResponseDataItemRelationshipsProject, + ) + from ..models.plans_list_get_response_data_item_relationships_project_span import ( + PlansListGetResponseDataItemRelationshipsProjectSpan, + ) + from ..models.plans_list_get_response_data_item_relationships_template import ( + PlansListGetResponseDataItemRelationshipsTemplate, + ) + from ..models.plans_list_get_response_data_item_relationships_work_items import ( + PlansListGetResponseDataItemRelationshipsWorkItems, + ) + + d = src_dict.copy() + _author = d.pop("author", UNSET) + author: Union[Unset, PlansListGetResponseDataItemRelationshipsAuthor] + if isinstance(_author, Unset): + author = UNSET + else: + author = PlansListGetResponseDataItemRelationshipsAuthor.from_dict( + _author + ) + + _parent = d.pop("parent", UNSET) + parent: Union[Unset, PlansListGetResponseDataItemRelationshipsParent] + if isinstance(_parent, Unset): + parent = UNSET + else: + parent = PlansListGetResponseDataItemRelationshipsParent.from_dict( + _parent + ) + + _project = d.pop("project", UNSET) + project: Union[Unset, PlansListGetResponseDataItemRelationshipsProject] + if isinstance(_project, Unset): + project = UNSET + else: + project = ( + PlansListGetResponseDataItemRelationshipsProject.from_dict( + _project + ) + ) + + _project_span = d.pop("projectSpan", UNSET) + project_span: Union[ + Unset, PlansListGetResponseDataItemRelationshipsProjectSpan + ] + if isinstance(_project_span, Unset): + project_span = UNSET + else: + project_span = ( + PlansListGetResponseDataItemRelationshipsProjectSpan.from_dict( + _project_span + ) + ) + + _template = d.pop("template", UNSET) + template: Union[ + Unset, PlansListGetResponseDataItemRelationshipsTemplate + ] + if isinstance(_template, Unset): + template = UNSET + else: + template = ( + PlansListGetResponseDataItemRelationshipsTemplate.from_dict( + _template + ) + ) + + _work_items = d.pop("workItems", UNSET) + work_items: Union[ + Unset, PlansListGetResponseDataItemRelationshipsWorkItems + ] + if isinstance(_work_items, Unset): + work_items = UNSET + else: + work_items = ( + PlansListGetResponseDataItemRelationshipsWorkItems.from_dict( + _work_items + ) + ) + + plans_list_get_response_data_item_relationships_obj = cls( + author=author, + parent=parent, + project=project, + project_span=project_span, + template=template, + work_items=work_items, + ) + + plans_list_get_response_data_item_relationships_obj.additional_properties = ( + d + ) + return plans_list_get_response_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_author.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_author.py new file mode 100644 index 00000000..94def668 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_author.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_get_response_data_item_relationships_author_data import ( + PlansListGetResponseDataItemRelationshipsAuthorData, + ) + + +T = TypeVar("T", bound="PlansListGetResponseDataItemRelationshipsAuthor") + + +@_attrs_define +class PlansListGetResponseDataItemRelationshipsAuthor: + """ + Attributes: + data (Union[Unset, PlansListGetResponseDataItemRelationshipsAuthorData]): + """ + + data: Union[ + Unset, "PlansListGetResponseDataItemRelationshipsAuthorData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_get_response_data_item_relationships_author_data import ( + PlansListGetResponseDataItemRelationshipsAuthorData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PlansListGetResponseDataItemRelationshipsAuthorData] + if isinstance(_data, Unset): + data = UNSET + else: + data = ( + PlansListGetResponseDataItemRelationshipsAuthorData.from_dict( + _data + ) + ) + + plans_list_get_response_data_item_relationships_author_obj = cls( + data=data, + ) + + plans_list_get_response_data_item_relationships_author_obj.additional_properties = ( + d + ) + return plans_list_get_response_data_item_relationships_author_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_author_data.py new file mode 100644 index 00000000..587c930f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_author_data.py @@ -0,0 +1,99 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_list_get_response_data_item_relationships_author_data_type import ( + PlansListGetResponseDataItemRelationshipsAuthorDataType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansListGetResponseDataItemRelationshipsAuthorData") + + +@_attrs_define +class PlansListGetResponseDataItemRelationshipsAuthorData: + """ + Attributes: + type (Union[Unset, PlansListGetResponseDataItemRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, PlansListGetResponseDataItemRelationshipsAuthorDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansListGetResponseDataItemRelationshipsAuthorDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansListGetResponseDataItemRelationshipsAuthorDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + plans_list_get_response_data_item_relationships_author_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + plans_list_get_response_data_item_relationships_author_data_obj.additional_properties = ( + d + ) + return plans_list_get_response_data_item_relationships_author_data_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_author_data_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_author_data_type.py new file mode 100644 index 00000000..d34bb069 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_author_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListGetResponseDataItemRelationshipsAuthorDataType(str, Enum): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_parent.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_parent.py new file mode 100644 index 00000000..f36c8ad6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_parent.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_get_response_data_item_relationships_parent_data import ( + PlansListGetResponseDataItemRelationshipsParentData, + ) + + +T = TypeVar("T", bound="PlansListGetResponseDataItemRelationshipsParent") + + +@_attrs_define +class PlansListGetResponseDataItemRelationshipsParent: + """ + Attributes: + data (Union[Unset, PlansListGetResponseDataItemRelationshipsParentData]): + """ + + data: Union[ + Unset, "PlansListGetResponseDataItemRelationshipsParentData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_get_response_data_item_relationships_parent_data import ( + PlansListGetResponseDataItemRelationshipsParentData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PlansListGetResponseDataItemRelationshipsParentData] + if isinstance(_data, Unset): + data = UNSET + else: + data = ( + PlansListGetResponseDataItemRelationshipsParentData.from_dict( + _data + ) + ) + + plans_list_get_response_data_item_relationships_parent_obj = cls( + data=data, + ) + + plans_list_get_response_data_item_relationships_parent_obj.additional_properties = ( + d + ) + return plans_list_get_response_data_item_relationships_parent_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_parent_data.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_parent_data.py new file mode 100644 index 00000000..17253264 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_parent_data.py @@ -0,0 +1,99 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_list_get_response_data_item_relationships_parent_data_type import ( + PlansListGetResponseDataItemRelationshipsParentDataType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansListGetResponseDataItemRelationshipsParentData") + + +@_attrs_define +class PlansListGetResponseDataItemRelationshipsParentData: + """ + Attributes: + type (Union[Unset, PlansListGetResponseDataItemRelationshipsParentDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyPlanId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, PlansListGetResponseDataItemRelationshipsParentDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansListGetResponseDataItemRelationshipsParentDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansListGetResponseDataItemRelationshipsParentDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + plans_list_get_response_data_item_relationships_parent_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + plans_list_get_response_data_item_relationships_parent_data_obj.additional_properties = ( + d + ) + return plans_list_get_response_data_item_relationships_parent_data_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_parent_data_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_parent_data_type.py new file mode 100644 index 00000000..3b19208a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_parent_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListGetResponseDataItemRelationshipsParentDataType(str, Enum): + PLANS = "plans" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project.py new file mode 100644 index 00000000..89c6184a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_get_response_data_item_relationships_project_data import ( + PlansListGetResponseDataItemRelationshipsProjectData, + ) + + +T = TypeVar("T", bound="PlansListGetResponseDataItemRelationshipsProject") + + +@_attrs_define +class PlansListGetResponseDataItemRelationshipsProject: + """ + Attributes: + data (Union[Unset, PlansListGetResponseDataItemRelationshipsProjectData]): + """ + + data: Union[ + Unset, "PlansListGetResponseDataItemRelationshipsProjectData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_get_response_data_item_relationships_project_data import ( + PlansListGetResponseDataItemRelationshipsProjectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, PlansListGetResponseDataItemRelationshipsProjectData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = ( + PlansListGetResponseDataItemRelationshipsProjectData.from_dict( + _data + ) + ) + + plans_list_get_response_data_item_relationships_project_obj = cls( + data=data, + ) + + plans_list_get_response_data_item_relationships_project_obj.additional_properties = ( + d + ) + return plans_list_get_response_data_item_relationships_project_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_data.py new file mode 100644 index 00000000..6d8f3222 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_data.py @@ -0,0 +1,99 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_list_get_response_data_item_relationships_project_data_type import ( + PlansListGetResponseDataItemRelationshipsProjectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansListGetResponseDataItemRelationshipsProjectData") + + +@_attrs_define +class PlansListGetResponseDataItemRelationshipsProjectData: + """ + Attributes: + type (Union[Unset, PlansListGetResponseDataItemRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, PlansListGetResponseDataItemRelationshipsProjectDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansListGetResponseDataItemRelationshipsProjectDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansListGetResponseDataItemRelationshipsProjectDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + plans_list_get_response_data_item_relationships_project_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + plans_list_get_response_data_item_relationships_project_data_obj.additional_properties = ( + d + ) + return plans_list_get_response_data_item_relationships_project_data_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_data_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_data_type.py new file mode 100644 index 00000000..725cd9d1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListGetResponseDataItemRelationshipsProjectDataType(str, Enum): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_span.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_span.py new file mode 100644 index 00000000..b6c59105 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_span.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_get_response_data_item_relationships_project_span_data_item import ( + PlansListGetResponseDataItemRelationshipsProjectSpanDataItem, + ) + from ..models.plans_list_get_response_data_item_relationships_project_span_meta import ( + PlansListGetResponseDataItemRelationshipsProjectSpanMeta, + ) + + +T = TypeVar("T", bound="PlansListGetResponseDataItemRelationshipsProjectSpan") + + +@_attrs_define +class PlansListGetResponseDataItemRelationshipsProjectSpan: + """ + Attributes: + data (Union[Unset, List['PlansListGetResponseDataItemRelationshipsProjectSpanDataItem']]): + meta (Union[Unset, PlansListGetResponseDataItemRelationshipsProjectSpanMeta]): + """ + + data: Union[ + Unset, + List["PlansListGetResponseDataItemRelationshipsProjectSpanDataItem"], + ] = UNSET + meta: Union[ + Unset, "PlansListGetResponseDataItemRelationshipsProjectSpanMeta" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_get_response_data_item_relationships_project_span_data_item import ( + PlansListGetResponseDataItemRelationshipsProjectSpanDataItem, + ) + from ..models.plans_list_get_response_data_item_relationships_project_span_meta import ( + PlansListGetResponseDataItemRelationshipsProjectSpanMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = PlansListGetResponseDataItemRelationshipsProjectSpanDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, PlansListGetResponseDataItemRelationshipsProjectSpanMeta + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = PlansListGetResponseDataItemRelationshipsProjectSpanMeta.from_dict( + _meta + ) + + plans_list_get_response_data_item_relationships_project_span_obj = cls( + data=data, + meta=meta, + ) + + plans_list_get_response_data_item_relationships_project_span_obj.additional_properties = ( + d + ) + return plans_list_get_response_data_item_relationships_project_span_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_span_data_item.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_span_data_item.py new file mode 100644 index 00000000..29b6e13f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_span_data_item.py @@ -0,0 +1,102 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_list_get_response_data_item_relationships_project_span_data_item_type import ( + PlansListGetResponseDataItemRelationshipsProjectSpanDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="PlansListGetResponseDataItemRelationshipsProjectSpanDataItem" +) + + +@_attrs_define +class PlansListGetResponseDataItemRelationshipsProjectSpanDataItem: + """ + Attributes: + type (Union[Unset, PlansListGetResponseDataItemRelationshipsProjectSpanDataItemType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, PlansListGetResponseDataItemRelationshipsProjectSpanDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + PlansListGetResponseDataItemRelationshipsProjectSpanDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansListGetResponseDataItemRelationshipsProjectSpanDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + plans_list_get_response_data_item_relationships_project_span_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + plans_list_get_response_data_item_relationships_project_span_data_item_obj.additional_properties = ( + d + ) + return plans_list_get_response_data_item_relationships_project_span_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_span_data_item_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_span_data_item_type.py new file mode 100644 index 00000000..f1993392 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_span_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListGetResponseDataItemRelationshipsProjectSpanDataItemType( + str, Enum +): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_span_meta.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_span_meta.py new file mode 100644 index 00000000..af211734 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_project_span_meta.py @@ -0,0 +1,67 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="PlansListGetResponseDataItemRelationshipsProjectSpanMeta" +) + + +@_attrs_define +class PlansListGetResponseDataItemRelationshipsProjectSpanMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + plans_list_get_response_data_item_relationships_project_span_meta_obj = cls( + total_count=total_count, + ) + + plans_list_get_response_data_item_relationships_project_span_meta_obj.additional_properties = ( + d + ) + return plans_list_get_response_data_item_relationships_project_span_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_template.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_template.py new file mode 100644 index 00000000..870db58d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_template.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_get_response_data_item_relationships_template_data import ( + PlansListGetResponseDataItemRelationshipsTemplateData, + ) + + +T = TypeVar("T", bound="PlansListGetResponseDataItemRelationshipsTemplate") + + +@_attrs_define +class PlansListGetResponseDataItemRelationshipsTemplate: + """ + Attributes: + data (Union[Unset, PlansListGetResponseDataItemRelationshipsTemplateData]): + """ + + data: Union[ + Unset, "PlansListGetResponseDataItemRelationshipsTemplateData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_get_response_data_item_relationships_template_data import ( + PlansListGetResponseDataItemRelationshipsTemplateData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, PlansListGetResponseDataItemRelationshipsTemplateData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = PlansListGetResponseDataItemRelationshipsTemplateData.from_dict( + _data + ) + + plans_list_get_response_data_item_relationships_template_obj = cls( + data=data, + ) + + plans_list_get_response_data_item_relationships_template_obj.additional_properties = ( + d + ) + return plans_list_get_response_data_item_relationships_template_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_template_data.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_template_data.py new file mode 100644 index 00000000..5e135d2e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_template_data.py @@ -0,0 +1,103 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_list_get_response_data_item_relationships_template_data_type import ( + PlansListGetResponseDataItemRelationshipsTemplateDataType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansListGetResponseDataItemRelationshipsTemplateData") + + +@_attrs_define +class PlansListGetResponseDataItemRelationshipsTemplateData: + """ + Attributes: + type (Union[Unset, PlansListGetResponseDataItemRelationshipsTemplateDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyPlanId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, PlansListGetResponseDataItemRelationshipsTemplateDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansListGetResponseDataItemRelationshipsTemplateDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansListGetResponseDataItemRelationshipsTemplateDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + plans_list_get_response_data_item_relationships_template_data_obj = ( + cls( + type=type, + id=id, + revision=revision, + ) + ) + + plans_list_get_response_data_item_relationships_template_data_obj.additional_properties = ( + d + ) + return ( + plans_list_get_response_data_item_relationships_template_data_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_template_data_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_template_data_type.py new file mode 100644 index 00000000..46895df3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_template_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListGetResponseDataItemRelationshipsTemplateDataType(str, Enum): + PLANS = "plans" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_work_items.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_work_items.py new file mode 100644 index 00000000..aae1eb63 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_work_items.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_get_response_data_item_relationships_work_items_data_item import ( + PlansListGetResponseDataItemRelationshipsWorkItemsDataItem, + ) + from ..models.plans_list_get_response_data_item_relationships_work_items_meta import ( + PlansListGetResponseDataItemRelationshipsWorkItemsMeta, + ) + + +T = TypeVar("T", bound="PlansListGetResponseDataItemRelationshipsWorkItems") + + +@_attrs_define +class PlansListGetResponseDataItemRelationshipsWorkItems: + """ + Attributes: + data (Union[Unset, List['PlansListGetResponseDataItemRelationshipsWorkItemsDataItem']]): + meta (Union[Unset, PlansListGetResponseDataItemRelationshipsWorkItemsMeta]): + """ + + data: Union[ + Unset, + List["PlansListGetResponseDataItemRelationshipsWorkItemsDataItem"], + ] = UNSET + meta: Union[ + Unset, "PlansListGetResponseDataItemRelationshipsWorkItemsMeta" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_get_response_data_item_relationships_work_items_data_item import ( + PlansListGetResponseDataItemRelationshipsWorkItemsDataItem, + ) + from ..models.plans_list_get_response_data_item_relationships_work_items_meta import ( + PlansListGetResponseDataItemRelationshipsWorkItemsMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = PlansListGetResponseDataItemRelationshipsWorkItemsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, PlansListGetResponseDataItemRelationshipsWorkItemsMeta + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = PlansListGetResponseDataItemRelationshipsWorkItemsMeta.from_dict( + _meta + ) + + plans_list_get_response_data_item_relationships_work_items_obj = cls( + data=data, + meta=meta, + ) + + plans_list_get_response_data_item_relationships_work_items_obj.additional_properties = ( + d + ) + return plans_list_get_response_data_item_relationships_work_items_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_work_items_data_item.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_work_items_data_item.py new file mode 100644 index 00000000..ce42170b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_work_items_data_item.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_list_get_response_data_item_relationships_work_items_data_item_type import ( + PlansListGetResponseDataItemRelationshipsWorkItemsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="PlansListGetResponseDataItemRelationshipsWorkItemsDataItem" +) + + +@_attrs_define +class PlansListGetResponseDataItemRelationshipsWorkItemsDataItem: + """ + Attributes: + type (Union[Unset, PlansListGetResponseDataItemRelationshipsWorkItemsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, PlansListGetResponseDataItemRelationshipsWorkItemsDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + PlansListGetResponseDataItemRelationshipsWorkItemsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + PlansListGetResponseDataItemRelationshipsWorkItemsDataItemType( + _type + ) + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + plans_list_get_response_data_item_relationships_work_items_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + plans_list_get_response_data_item_relationships_work_items_data_item_obj.additional_properties = ( + d + ) + return plans_list_get_response_data_item_relationships_work_items_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_work_items_data_item_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_work_items_data_item_type.py new file mode 100644 index 00000000..b71d5c26 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_work_items_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListGetResponseDataItemRelationshipsWorkItemsDataItemType( + str, Enum +): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_work_items_meta.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_work_items_meta.py new file mode 100644 index 00000000..1fda15d4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_relationships_work_items_meta.py @@ -0,0 +1,71 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="PlansListGetResponseDataItemRelationshipsWorkItemsMeta" +) + + +@_attrs_define +class PlansListGetResponseDataItemRelationshipsWorkItemsMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + plans_list_get_response_data_item_relationships_work_items_meta_obj = ( + cls( + total_count=total_count, + ) + ) + + plans_list_get_response_data_item_relationships_work_items_meta_obj.additional_properties = ( + d + ) + return ( + plans_list_get_response_data_item_relationships_work_items_meta_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_type.py new file mode 100644 index 00000000..01ba614d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListGetResponseDataItemType(str, Enum): + PLANS = "plans" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_included_item.py new file mode 100644 index 00000000..fa206f3d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_included_item.py @@ -0,0 +1,49 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlansListGetResponseIncludedItem") + + +@_attrs_define +class PlansListGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + plans_list_get_response_included_item_obj = cls() + + plans_list_get_response_included_item_obj.additional_properties = d + return plans_list_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_links.py new file mode 100644 index 00000000..8542f2f6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_links.py @@ -0,0 +1,114 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansListGetResponseLinks") + + +@_attrs_define +class PlansListGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/plans?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/plans?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/plans?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/plans?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/plans?page%5Bsize%5D=10&page%5Bnumber%5D=9. + portal (Union[Unset, str]): Example: server-host-name/application- + path/polarion/redirect/project/MyProjectId/plans. + """ + + self_: Union[Unset, str] = UNSET + first: Union[Unset, str] = UNSET + prev: Union[Unset, str] = UNSET + next_: Union[Unset, str] = UNSET + last: Union[Unset, str] = UNSET + portal: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + first = self.first + + prev = self.prev + + next_ = self.next_ + + last = self.last + + portal = self.portal + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if first is not UNSET: + field_dict["first"] = first + if prev is not UNSET: + field_dict["prev"] = prev + if next_ is not UNSET: + field_dict["next"] = next_ + if last is not UNSET: + field_dict["last"] = last + if portal is not UNSET: + field_dict["portal"] = portal + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + first = d.pop("first", UNSET) + + prev = d.pop("prev", UNSET) + + next_ = d.pop("next", UNSET) + + last = d.pop("last", UNSET) + + portal = d.pop("portal", UNSET) + + plans_list_get_response_links_obj = cls( + self_=self_, + first=first, + prev=prev, + next_=next_, + last=last, + portal=portal, + ) + + plans_list_get_response_links_obj.additional_properties = d + return plans_list_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_meta.py new file mode 100644 index 00000000..ae8c87c4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_get_response_meta.py @@ -0,0 +1,63 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansListGetResponseMeta") + + +@_attrs_define +class PlansListGetResponseMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + plans_list_get_response_meta_obj = cls( + total_count=total_count, + ) + + plans_list_get_response_meta_obj.additional_properties = d + return plans_list_get_response_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_post_request.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request.py new file mode 100644 index 00000000..ca9f66c1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request.py @@ -0,0 +1,83 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_post_request_data_item import ( + PlansListPostRequestDataItem, + ) + + +T = TypeVar("T", bound="PlansListPostRequest") + + +@_attrs_define +class PlansListPostRequest: + """ + Attributes: + data (Union[Unset, List['PlansListPostRequestDataItem']]): + """ + + data: Union[Unset, List["PlansListPostRequestDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_post_request_data_item import ( + PlansListPostRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = PlansListPostRequestDataItem.from_dict(data_item_data) + + data.append(data_item) + + plans_list_post_request_obj = cls( + data=data, + ) + + plans_list_post_request_obj.additional_properties = d + return plans_list_post_request_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item.py new file mode 100644 index 00000000..c6a6b243 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item.py @@ -0,0 +1,129 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_list_post_request_data_item_type import ( + PlansListPostRequestDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_post_request_data_item_attributes import ( + PlansListPostRequestDataItemAttributes, + ) + from ..models.plans_list_post_request_data_item_relationships import ( + PlansListPostRequestDataItemRelationships, + ) + + +T = TypeVar("T", bound="PlansListPostRequestDataItem") + + +@_attrs_define +class PlansListPostRequestDataItem: + """ + Attributes: + type (Union[Unset, PlansListPostRequestDataItemType]): + attributes (Union[Unset, PlansListPostRequestDataItemAttributes]): + relationships (Union[Unset, PlansListPostRequestDataItemRelationships]): + """ + + type: Union[Unset, PlansListPostRequestDataItemType] = UNSET + attributes: Union[Unset, "PlansListPostRequestDataItemAttributes"] = UNSET + relationships: Union[ + Unset, "PlansListPostRequestDataItemRelationships" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_post_request_data_item_attributes import ( + PlansListPostRequestDataItemAttributes, + ) + from ..models.plans_list_post_request_data_item_relationships import ( + PlansListPostRequestDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, PlansListPostRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansListPostRequestDataItemType(_type) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, PlansListPostRequestDataItemAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = PlansListPostRequestDataItemAttributes.from_dict( + _attributes + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[Unset, PlansListPostRequestDataItemRelationships] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + PlansListPostRequestDataItemRelationships.from_dict( + _relationships + ) + ) + + plans_list_post_request_data_item_obj = cls( + type=type, + attributes=attributes, + relationships=relationships, + ) + + plans_list_post_request_data_item_obj.additional_properties = d + return plans_list_post_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes.py new file mode 100644 index 00000000..e2f586a7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes.py @@ -0,0 +1,330 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.plans_list_post_request_data_item_attributes_calculation_type import ( + PlansListPostRequestDataItemAttributesCalculationType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_post_request_data_item_attributes_description import ( + PlansListPostRequestDataItemAttributesDescription, + ) + from ..models.plans_list_post_request_data_item_attributes_home_page_content import ( + PlansListPostRequestDataItemAttributesHomePageContent, + ) + + +T = TypeVar("T", bound="PlansListPostRequestDataItemAttributes") + + +@_attrs_define +class PlansListPostRequestDataItemAttributes: + """ + Attributes: + allowed_types (Union[Unset, List[str]]): + calculation_type (Union[Unset, PlansListPostRequestDataItemAttributesCalculationType]): Example: timeBased. + capacity (Union[Unset, float]): + color (Union[Unset, str]): Example: Color. + default_estimate (Union[Unset, float]): + description (Union[Unset, PlansListPostRequestDataItemAttributesDescription]): + due_date (Union[Unset, datetime.date]): Example: 1970-01-01. + estimation_field (Union[Unset, str]): Example: Estimation Field. + finished_on (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + home_page_content (Union[Unset, PlansListPostRequestDataItemAttributesHomePageContent]): + id (Union[Unset, str]): Example: ID. + is_template (Union[Unset, bool]): + name (Union[Unset, str]): Example: Name. + previous_time_spent (Union[Unset, str]): Example: 5 1/2d. + prioritization_field (Union[Unset, str]): Example: Prioritization Field. + sort_order (Union[Unset, int]): + start_date (Union[Unset, datetime.date]): Example: 1970-01-01. + started_on (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + status (Union[Unset, str]): + use_report_from_template (Union[Unset, bool]): + """ + + allowed_types: Union[Unset, List[str]] = UNSET + calculation_type: Union[ + Unset, PlansListPostRequestDataItemAttributesCalculationType + ] = UNSET + capacity: Union[Unset, float] = UNSET + color: Union[Unset, str] = UNSET + default_estimate: Union[Unset, float] = UNSET + description: Union[ + Unset, "PlansListPostRequestDataItemAttributesDescription" + ] = UNSET + due_date: Union[Unset, datetime.date] = UNSET + estimation_field: Union[Unset, str] = UNSET + finished_on: Union[Unset, datetime.datetime] = UNSET + home_page_content: Union[ + Unset, "PlansListPostRequestDataItemAttributesHomePageContent" + ] = UNSET + id: Union[Unset, str] = UNSET + is_template: Union[Unset, bool] = UNSET + name: Union[Unset, str] = UNSET + previous_time_spent: Union[Unset, str] = UNSET + prioritization_field: Union[Unset, str] = UNSET + sort_order: Union[Unset, int] = UNSET + start_date: Union[Unset, datetime.date] = UNSET + started_on: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, str] = UNSET + use_report_from_template: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + allowed_types: Union[Unset, List[str]] = UNSET + if not isinstance(self.allowed_types, Unset): + allowed_types = self.allowed_types + + calculation_type: Union[Unset, str] = UNSET + if not isinstance(self.calculation_type, Unset): + calculation_type = self.calculation_type.value + + capacity = self.capacity + + color = self.color + + default_estimate = self.default_estimate + + description: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.description, Unset): + description = self.description.to_dict() + + due_date: Union[Unset, str] = UNSET + if not isinstance(self.due_date, Unset): + due_date = self.due_date.isoformat() + + estimation_field = self.estimation_field + + finished_on: Union[Unset, str] = UNSET + if not isinstance(self.finished_on, Unset): + finished_on = self.finished_on.isoformat() + + home_page_content: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.home_page_content, Unset): + home_page_content = self.home_page_content.to_dict() + + id = self.id + + is_template = self.is_template + + name = self.name + + previous_time_spent = self.previous_time_spent + + prioritization_field = self.prioritization_field + + sort_order = self.sort_order + + start_date: Union[Unset, str] = UNSET + if not isinstance(self.start_date, Unset): + start_date = self.start_date.isoformat() + + started_on: Union[Unset, str] = UNSET + if not isinstance(self.started_on, Unset): + started_on = self.started_on.isoformat() + + status = self.status + + use_report_from_template = self.use_report_from_template + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if allowed_types is not UNSET: + field_dict["allowedTypes"] = allowed_types + if calculation_type is not UNSET: + field_dict["calculationType"] = calculation_type + if capacity is not UNSET: + field_dict["capacity"] = capacity + if color is not UNSET: + field_dict["color"] = color + if default_estimate is not UNSET: + field_dict["defaultEstimate"] = default_estimate + if description is not UNSET: + field_dict["description"] = description + if due_date is not UNSET: + field_dict["dueDate"] = due_date + if estimation_field is not UNSET: + field_dict["estimationField"] = estimation_field + if finished_on is not UNSET: + field_dict["finishedOn"] = finished_on + if home_page_content is not UNSET: + field_dict["homePageContent"] = home_page_content + if id is not UNSET: + field_dict["id"] = id + if is_template is not UNSET: + field_dict["isTemplate"] = is_template + if name is not UNSET: + field_dict["name"] = name + if previous_time_spent is not UNSET: + field_dict["previousTimeSpent"] = previous_time_spent + if prioritization_field is not UNSET: + field_dict["prioritizationField"] = prioritization_field + if sort_order is not UNSET: + field_dict["sortOrder"] = sort_order + if start_date is not UNSET: + field_dict["startDate"] = start_date + if started_on is not UNSET: + field_dict["startedOn"] = started_on + if status is not UNSET: + field_dict["status"] = status + if use_report_from_template is not UNSET: + field_dict["useReportFromTemplate"] = use_report_from_template + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_post_request_data_item_attributes_description import ( + PlansListPostRequestDataItemAttributesDescription, + ) + from ..models.plans_list_post_request_data_item_attributes_home_page_content import ( + PlansListPostRequestDataItemAttributesHomePageContent, + ) + + d = src_dict.copy() + allowed_types = cast(List[str], d.pop("allowedTypes", UNSET)) + + _calculation_type = d.pop("calculationType", UNSET) + calculation_type: Union[ + Unset, PlansListPostRequestDataItemAttributesCalculationType + ] + if isinstance(_calculation_type, Unset): + calculation_type = UNSET + else: + calculation_type = ( + PlansListPostRequestDataItemAttributesCalculationType( + _calculation_type + ) + ) + + capacity = d.pop("capacity", UNSET) + + color = d.pop("color", UNSET) + + default_estimate = d.pop("defaultEstimate", UNSET) + + _description = d.pop("description", UNSET) + description: Union[ + Unset, PlansListPostRequestDataItemAttributesDescription + ] + if isinstance(_description, Unset): + description = UNSET + else: + description = ( + PlansListPostRequestDataItemAttributesDescription.from_dict( + _description + ) + ) + + _due_date = d.pop("dueDate", UNSET) + due_date: Union[Unset, datetime.date] + if isinstance(_due_date, Unset): + due_date = UNSET + else: + due_date = isoparse(_due_date).date() + + estimation_field = d.pop("estimationField", UNSET) + + _finished_on = d.pop("finishedOn", UNSET) + finished_on: Union[Unset, datetime.datetime] + if isinstance(_finished_on, Unset): + finished_on = UNSET + else: + finished_on = isoparse(_finished_on) + + _home_page_content = d.pop("homePageContent", UNSET) + home_page_content: Union[ + Unset, PlansListPostRequestDataItemAttributesHomePageContent + ] + if isinstance(_home_page_content, Unset): + home_page_content = UNSET + else: + home_page_content = PlansListPostRequestDataItemAttributesHomePageContent.from_dict( + _home_page_content + ) + + id = d.pop("id", UNSET) + + is_template = d.pop("isTemplate", UNSET) + + name = d.pop("name", UNSET) + + previous_time_spent = d.pop("previousTimeSpent", UNSET) + + prioritization_field = d.pop("prioritizationField", UNSET) + + sort_order = d.pop("sortOrder", UNSET) + + _start_date = d.pop("startDate", UNSET) + start_date: Union[Unset, datetime.date] + if isinstance(_start_date, Unset): + start_date = UNSET + else: + start_date = isoparse(_start_date).date() + + _started_on = d.pop("startedOn", UNSET) + started_on: Union[Unset, datetime.datetime] + if isinstance(_started_on, Unset): + started_on = UNSET + else: + started_on = isoparse(_started_on) + + status = d.pop("status", UNSET) + + use_report_from_template = d.pop("useReportFromTemplate", UNSET) + + plans_list_post_request_data_item_attributes_obj = cls( + allowed_types=allowed_types, + calculation_type=calculation_type, + capacity=capacity, + color=color, + default_estimate=default_estimate, + description=description, + due_date=due_date, + estimation_field=estimation_field, + finished_on=finished_on, + home_page_content=home_page_content, + id=id, + is_template=is_template, + name=name, + previous_time_spent=previous_time_spent, + prioritization_field=prioritization_field, + sort_order=sort_order, + start_date=start_date, + started_on=started_on, + status=status, + use_report_from_template=use_report_from_template, + ) + + plans_list_post_request_data_item_attributes_obj.additional_properties = ( + d + ) + return plans_list_post_request_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_calculation_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_calculation_type.py new file mode 100644 index 00000000..b8c45eda --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_calculation_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListPostRequestDataItemAttributesCalculationType(str, Enum): + CUSTOMFIELDBASED = "customFieldBased" + TIMEBASED = "timeBased" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_description.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_description.py new file mode 100644 index 00000000..1a9252e8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_description.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_list_post_request_data_item_attributes_description_type import ( + PlansListPostRequestDataItemAttributesDescriptionType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansListPostRequestDataItemAttributesDescription") + + +@_attrs_define +class PlansListPostRequestDataItemAttributesDescription: + """ + Attributes: + type (Union[Unset, PlansListPostRequestDataItemAttributesDescriptionType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, PlansListPostRequestDataItemAttributesDescriptionType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansListPostRequestDataItemAttributesDescriptionType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansListPostRequestDataItemAttributesDescriptionType(_type) + + value = d.pop("value", UNSET) + + plans_list_post_request_data_item_attributes_description_obj = cls( + type=type, + value=value, + ) + + plans_list_post_request_data_item_attributes_description_obj.additional_properties = ( + d + ) + return plans_list_post_request_data_item_attributes_description_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_description_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_description_type.py new file mode 100644 index 00000000..1915cc56 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_description_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListPostRequestDataItemAttributesDescriptionType(str, Enum): + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_home_page_content.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_home_page_content.py new file mode 100644 index 00000000..8c46545a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_home_page_content.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_list_post_request_data_item_attributes_home_page_content_type import ( + PlansListPostRequestDataItemAttributesHomePageContentType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansListPostRequestDataItemAttributesHomePageContent") + + +@_attrs_define +class PlansListPostRequestDataItemAttributesHomePageContent: + """ + Attributes: + type (Union[Unset, PlansListPostRequestDataItemAttributesHomePageContentType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, PlansListPostRequestDataItemAttributesHomePageContentType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansListPostRequestDataItemAttributesHomePageContentType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansListPostRequestDataItemAttributesHomePageContentType( + _type + ) + + value = d.pop("value", UNSET) + + plans_list_post_request_data_item_attributes_home_page_content_obj = ( + cls( + type=type, + value=value, + ) + ) + + plans_list_post_request_data_item_attributes_home_page_content_obj.additional_properties = ( + d + ) + return ( + plans_list_post_request_data_item_attributes_home_page_content_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_home_page_content_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_home_page_content_type.py new file mode 100644 index 00000000..86e2dd69 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_attributes_home_page_content_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListPostRequestDataItemAttributesHomePageContentType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships.py new file mode 100644 index 00000000..72e08820 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships.py @@ -0,0 +1,176 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_post_request_data_item_relationships_parent import ( + PlansListPostRequestDataItemRelationshipsParent, + ) + from ..models.plans_list_post_request_data_item_relationships_project_span import ( + PlansListPostRequestDataItemRelationshipsProjectSpan, + ) + from ..models.plans_list_post_request_data_item_relationships_template import ( + PlansListPostRequestDataItemRelationshipsTemplate, + ) + from ..models.plans_list_post_request_data_item_relationships_work_items import ( + PlansListPostRequestDataItemRelationshipsWorkItems, + ) + + +T = TypeVar("T", bound="PlansListPostRequestDataItemRelationships") + + +@_attrs_define +class PlansListPostRequestDataItemRelationships: + """ + Attributes: + parent (Union[Unset, PlansListPostRequestDataItemRelationshipsParent]): + project_span (Union[Unset, PlansListPostRequestDataItemRelationshipsProjectSpan]): + template (Union[Unset, PlansListPostRequestDataItemRelationshipsTemplate]): + work_items (Union[Unset, PlansListPostRequestDataItemRelationshipsWorkItems]): + """ + + parent: Union[ + Unset, "PlansListPostRequestDataItemRelationshipsParent" + ] = UNSET + project_span: Union[ + Unset, "PlansListPostRequestDataItemRelationshipsProjectSpan" + ] = UNSET + template: Union[ + Unset, "PlansListPostRequestDataItemRelationshipsTemplate" + ] = UNSET + work_items: Union[ + Unset, "PlansListPostRequestDataItemRelationshipsWorkItems" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + parent: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.parent, Unset): + parent = self.parent.to_dict() + + project_span: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project_span, Unset): + project_span = self.project_span.to_dict() + + template: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.template, Unset): + template = self.template.to_dict() + + work_items: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.work_items, Unset): + work_items = self.work_items.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if parent is not UNSET: + field_dict["parent"] = parent + if project_span is not UNSET: + field_dict["projectSpan"] = project_span + if template is not UNSET: + field_dict["template"] = template + if work_items is not UNSET: + field_dict["workItems"] = work_items + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_post_request_data_item_relationships_parent import ( + PlansListPostRequestDataItemRelationshipsParent, + ) + from ..models.plans_list_post_request_data_item_relationships_project_span import ( + PlansListPostRequestDataItemRelationshipsProjectSpan, + ) + from ..models.plans_list_post_request_data_item_relationships_template import ( + PlansListPostRequestDataItemRelationshipsTemplate, + ) + from ..models.plans_list_post_request_data_item_relationships_work_items import ( + PlansListPostRequestDataItemRelationshipsWorkItems, + ) + + d = src_dict.copy() + _parent = d.pop("parent", UNSET) + parent: Union[Unset, PlansListPostRequestDataItemRelationshipsParent] + if isinstance(_parent, Unset): + parent = UNSET + else: + parent = PlansListPostRequestDataItemRelationshipsParent.from_dict( + _parent + ) + + _project_span = d.pop("projectSpan", UNSET) + project_span: Union[ + Unset, PlansListPostRequestDataItemRelationshipsProjectSpan + ] + if isinstance(_project_span, Unset): + project_span = UNSET + else: + project_span = ( + PlansListPostRequestDataItemRelationshipsProjectSpan.from_dict( + _project_span + ) + ) + + _template = d.pop("template", UNSET) + template: Union[ + Unset, PlansListPostRequestDataItemRelationshipsTemplate + ] + if isinstance(_template, Unset): + template = UNSET + else: + template = ( + PlansListPostRequestDataItemRelationshipsTemplate.from_dict( + _template + ) + ) + + _work_items = d.pop("workItems", UNSET) + work_items: Union[ + Unset, PlansListPostRequestDataItemRelationshipsWorkItems + ] + if isinstance(_work_items, Unset): + work_items = UNSET + else: + work_items = ( + PlansListPostRequestDataItemRelationshipsWorkItems.from_dict( + _work_items + ) + ) + + plans_list_post_request_data_item_relationships_obj = cls( + parent=parent, + project_span=project_span, + template=template, + work_items=work_items, + ) + + plans_list_post_request_data_item_relationships_obj.additional_properties = ( + d + ) + return plans_list_post_request_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_parent.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_parent.py new file mode 100644 index 00000000..9ddb9dda --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_parent.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_post_request_data_item_relationships_parent_data import ( + PlansListPostRequestDataItemRelationshipsParentData, + ) + + +T = TypeVar("T", bound="PlansListPostRequestDataItemRelationshipsParent") + + +@_attrs_define +class PlansListPostRequestDataItemRelationshipsParent: + """ + Attributes: + data (Union[Unset, PlansListPostRequestDataItemRelationshipsParentData]): + """ + + data: Union[ + Unset, "PlansListPostRequestDataItemRelationshipsParentData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_post_request_data_item_relationships_parent_data import ( + PlansListPostRequestDataItemRelationshipsParentData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PlansListPostRequestDataItemRelationshipsParentData] + if isinstance(_data, Unset): + data = UNSET + else: + data = ( + PlansListPostRequestDataItemRelationshipsParentData.from_dict( + _data + ) + ) + + plans_list_post_request_data_item_relationships_parent_obj = cls( + data=data, + ) + + plans_list_post_request_data_item_relationships_parent_obj.additional_properties = ( + d + ) + return plans_list_post_request_data_item_relationships_parent_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_parent_data.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_parent_data.py new file mode 100644 index 00000000..1264a840 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_parent_data.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_list_post_request_data_item_relationships_parent_data_type import ( + PlansListPostRequestDataItemRelationshipsParentDataType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansListPostRequestDataItemRelationshipsParentData") + + +@_attrs_define +class PlansListPostRequestDataItemRelationshipsParentData: + """ + Attributes: + type (Union[Unset, PlansListPostRequestDataItemRelationshipsParentDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyPlanId. + """ + + type: Union[ + Unset, PlansListPostRequestDataItemRelationshipsParentDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansListPostRequestDataItemRelationshipsParentDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansListPostRequestDataItemRelationshipsParentDataType( + _type + ) + + id = d.pop("id", UNSET) + + plans_list_post_request_data_item_relationships_parent_data_obj = cls( + type=type, + id=id, + ) + + plans_list_post_request_data_item_relationships_parent_data_obj.additional_properties = ( + d + ) + return plans_list_post_request_data_item_relationships_parent_data_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_parent_data_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_parent_data_type.py new file mode 100644 index 00000000..e00db304 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_parent_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListPostRequestDataItemRelationshipsParentDataType(str, Enum): + PLANS = "plans" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_project_span.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_project_span.py new file mode 100644 index 00000000..30014b0d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_project_span.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_post_request_data_item_relationships_project_span_data_item import ( + PlansListPostRequestDataItemRelationshipsProjectSpanDataItem, + ) + + +T = TypeVar("T", bound="PlansListPostRequestDataItemRelationshipsProjectSpan") + + +@_attrs_define +class PlansListPostRequestDataItemRelationshipsProjectSpan: + """ + Attributes: + data (Union[Unset, List['PlansListPostRequestDataItemRelationshipsProjectSpanDataItem']]): + """ + + data: Union[ + Unset, + List["PlansListPostRequestDataItemRelationshipsProjectSpanDataItem"], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_post_request_data_item_relationships_project_span_data_item import ( + PlansListPostRequestDataItemRelationshipsProjectSpanDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = PlansListPostRequestDataItemRelationshipsProjectSpanDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + plans_list_post_request_data_item_relationships_project_span_obj = cls( + data=data, + ) + + plans_list_post_request_data_item_relationships_project_span_obj.additional_properties = ( + d + ) + return plans_list_post_request_data_item_relationships_project_span_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_project_span_data_item.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_project_span_data_item.py new file mode 100644 index 00000000..067f1e8d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_project_span_data_item.py @@ -0,0 +1,93 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_list_post_request_data_item_relationships_project_span_data_item_type import ( + PlansListPostRequestDataItemRelationshipsProjectSpanDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="PlansListPostRequestDataItemRelationshipsProjectSpanDataItem" +) + + +@_attrs_define +class PlansListPostRequestDataItemRelationshipsProjectSpanDataItem: + """ + Attributes: + type (Union[Unset, PlansListPostRequestDataItemRelationshipsProjectSpanDataItemType]): + id (Union[Unset, str]): Example: MyProjectId. + """ + + type: Union[ + Unset, PlansListPostRequestDataItemRelationshipsProjectSpanDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + PlansListPostRequestDataItemRelationshipsProjectSpanDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansListPostRequestDataItemRelationshipsProjectSpanDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + plans_list_post_request_data_item_relationships_project_span_data_item_obj = cls( + type=type, + id=id, + ) + + plans_list_post_request_data_item_relationships_project_span_data_item_obj.additional_properties = ( + d + ) + return plans_list_post_request_data_item_relationships_project_span_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_project_span_data_item_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_project_span_data_item_type.py new file mode 100644 index 00000000..a29da510 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_project_span_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListPostRequestDataItemRelationshipsProjectSpanDataItemType( + str, Enum +): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_template.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_template.py new file mode 100644 index 00000000..ff14f49f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_template.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_post_request_data_item_relationships_template_data import ( + PlansListPostRequestDataItemRelationshipsTemplateData, + ) + + +T = TypeVar("T", bound="PlansListPostRequestDataItemRelationshipsTemplate") + + +@_attrs_define +class PlansListPostRequestDataItemRelationshipsTemplate: + """ + Attributes: + data (Union[Unset, PlansListPostRequestDataItemRelationshipsTemplateData]): + """ + + data: Union[ + Unset, "PlansListPostRequestDataItemRelationshipsTemplateData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_post_request_data_item_relationships_template_data import ( + PlansListPostRequestDataItemRelationshipsTemplateData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, PlansListPostRequestDataItemRelationshipsTemplateData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = PlansListPostRequestDataItemRelationshipsTemplateData.from_dict( + _data + ) + + plans_list_post_request_data_item_relationships_template_obj = cls( + data=data, + ) + + plans_list_post_request_data_item_relationships_template_obj.additional_properties = ( + d + ) + return plans_list_post_request_data_item_relationships_template_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_template_data.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_template_data.py new file mode 100644 index 00000000..c3c114a2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_template_data.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_list_post_request_data_item_relationships_template_data_type import ( + PlansListPostRequestDataItemRelationshipsTemplateDataType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansListPostRequestDataItemRelationshipsTemplateData") + + +@_attrs_define +class PlansListPostRequestDataItemRelationshipsTemplateData: + """ + Attributes: + type (Union[Unset, PlansListPostRequestDataItemRelationshipsTemplateDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyPlanId. + """ + + type: Union[ + Unset, PlansListPostRequestDataItemRelationshipsTemplateDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansListPostRequestDataItemRelationshipsTemplateDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansListPostRequestDataItemRelationshipsTemplateDataType( + _type + ) + + id = d.pop("id", UNSET) + + plans_list_post_request_data_item_relationships_template_data_obj = ( + cls( + type=type, + id=id, + ) + ) + + plans_list_post_request_data_item_relationships_template_data_obj.additional_properties = ( + d + ) + return ( + plans_list_post_request_data_item_relationships_template_data_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_template_data_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_template_data_type.py new file mode 100644 index 00000000..047a3730 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_template_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListPostRequestDataItemRelationshipsTemplateDataType(str, Enum): + PLANS = "plans" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_work_items.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_work_items.py new file mode 100644 index 00000000..090342a9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_work_items.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_post_request_data_item_relationships_work_items_data_item import ( + PlansListPostRequestDataItemRelationshipsWorkItemsDataItem, + ) + + +T = TypeVar("T", bound="PlansListPostRequestDataItemRelationshipsWorkItems") + + +@_attrs_define +class PlansListPostRequestDataItemRelationshipsWorkItems: + """ + Attributes: + data (Union[Unset, List['PlansListPostRequestDataItemRelationshipsWorkItemsDataItem']]): + """ + + data: Union[ + Unset, + List["PlansListPostRequestDataItemRelationshipsWorkItemsDataItem"], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_post_request_data_item_relationships_work_items_data_item import ( + PlansListPostRequestDataItemRelationshipsWorkItemsDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = PlansListPostRequestDataItemRelationshipsWorkItemsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + plans_list_post_request_data_item_relationships_work_items_obj = cls( + data=data, + ) + + plans_list_post_request_data_item_relationships_work_items_obj.additional_properties = ( + d + ) + return plans_list_post_request_data_item_relationships_work_items_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_work_items_data_item.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_work_items_data_item.py new file mode 100644 index 00000000..1de7c854 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_work_items_data_item.py @@ -0,0 +1,95 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_list_post_request_data_item_relationships_work_items_data_item_type import ( + PlansListPostRequestDataItemRelationshipsWorkItemsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="PlansListPostRequestDataItemRelationshipsWorkItemsDataItem" +) + + +@_attrs_define +class PlansListPostRequestDataItemRelationshipsWorkItemsDataItem: + """ + Attributes: + type (Union[Unset, PlansListPostRequestDataItemRelationshipsWorkItemsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + """ + + type: Union[ + Unset, PlansListPostRequestDataItemRelationshipsWorkItemsDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + PlansListPostRequestDataItemRelationshipsWorkItemsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + PlansListPostRequestDataItemRelationshipsWorkItemsDataItemType( + _type + ) + ) + + id = d.pop("id", UNSET) + + plans_list_post_request_data_item_relationships_work_items_data_item_obj = cls( + type=type, + id=id, + ) + + plans_list_post_request_data_item_relationships_work_items_data_item_obj.additional_properties = ( + d + ) + return plans_list_post_request_data_item_relationships_work_items_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_work_items_data_item_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_work_items_data_item_type.py new file mode 100644 index 00000000..c28e7e92 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_relationships_work_items_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListPostRequestDataItemRelationshipsWorkItemsDataItemType( + str, Enum +): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_type.py new file mode 100644 index 00000000..e355e130 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListPostRequestDataItemType(str, Enum): + PLANS = "plans" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_list_post_response.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_response.py new file mode 100644 index 00000000..0ff0cb42 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_response.py @@ -0,0 +1,83 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_post_response_data_item import ( + PlansListPostResponseDataItem, + ) + + +T = TypeVar("T", bound="PlansListPostResponse") + + +@_attrs_define +class PlansListPostResponse: + """ + Attributes: + data (Union[Unset, List['PlansListPostResponseDataItem']]): + """ + + data: Union[Unset, List["PlansListPostResponseDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_post_response_data_item import ( + PlansListPostResponseDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = PlansListPostResponseDataItem.from_dict(data_item_data) + + data.append(data_item) + + plans_list_post_response_obj = cls( + data=data, + ) + + plans_list_post_response_obj.additional_properties = d + return plans_list_post_response_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_response_data_item.py new file mode 100644 index 00000000..a5aec95b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_response_data_item.py @@ -0,0 +1,108 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_list_post_response_data_item_type import ( + PlansListPostResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_list_post_response_data_item_links import ( + PlansListPostResponseDataItemLinks, + ) + + +T = TypeVar("T", bound="PlansListPostResponseDataItem") + + +@_attrs_define +class PlansListPostResponseDataItem: + """ + Attributes: + type (Union[Unset, PlansListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyPlanId. + links (Union[Unset, PlansListPostResponseDataItemLinks]): + """ + + type: Union[Unset, PlansListPostResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + links: Union[Unset, "PlansListPostResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_list_post_response_data_item_links import ( + PlansListPostResponseDataItemLinks, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, PlansListPostResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansListPostResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[Unset, PlansListPostResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = PlansListPostResponseDataItemLinks.from_dict(_links) + + plans_list_post_response_data_item_obj = cls( + type=type, + id=id, + links=links, + ) + + plans_list_post_response_data_item_obj.additional_properties = d + return plans_list_post_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_response_data_item_links.py new file mode 100644 index 00000000..cf546691 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_response_data_item_links.py @@ -0,0 +1,74 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansListPostResponseDataItemLinks") + + +@_attrs_define +class PlansListPostResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/plans/MyPlanId?revision=1234. + portal (Union[Unset, str]): Example: server-host-name/application- + path/polarion/redirect/project/MyProjectId/plan?id=MyPlanId&revision=1234. + """ + + self_: Union[Unset, str] = UNSET + portal: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + portal = self.portal + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if portal is not UNSET: + field_dict["portal"] = portal + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + portal = d.pop("portal", UNSET) + + plans_list_post_response_data_item_links_obj = cls( + self_=self_, + portal=portal, + ) + + plans_list_post_response_data_item_links_obj.additional_properties = d + return plans_list_post_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_list_post_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/plans_list_post_response_data_item_type.py new file mode 100644 index 00000000..db2c485f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_list_post_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansListPostResponseDataItemType(str, Enum): + PLANS = "plans" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_single_get_response.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response.py new file mode 100644 index 00000000..643ccac9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response.py @@ -0,0 +1,131 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_get_response_data import ( + PlansSingleGetResponseData, + ) + from ..models.plans_single_get_response_included_item import ( + PlansSingleGetResponseIncludedItem, + ) + from ..models.plans_single_get_response_links import ( + PlansSingleGetResponseLinks, + ) + + +T = TypeVar("T", bound="PlansSingleGetResponse") + + +@_attrs_define +class PlansSingleGetResponse: + """ + Attributes: + data (Union[Unset, PlansSingleGetResponseData]): + included (Union[Unset, List['PlansSingleGetResponseIncludedItem']]): Related entities might be returned, see Rest API User + Guide. + links (Union[Unset, PlansSingleGetResponseLinks]): + """ + + data: Union[Unset, "PlansSingleGetResponseData"] = UNSET + included: Union[Unset, List["PlansSingleGetResponseIncludedItem"]] = UNSET + links: Union[Unset, "PlansSingleGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_get_response_data import ( + PlansSingleGetResponseData, + ) + from ..models.plans_single_get_response_included_item import ( + PlansSingleGetResponseIncludedItem, + ) + from ..models.plans_single_get_response_links import ( + PlansSingleGetResponseLinks, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PlansSingleGetResponseData] + if isinstance(_data, Unset): + data = UNSET + else: + data = PlansSingleGetResponseData.from_dict(_data) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = PlansSingleGetResponseIncludedItem.from_dict( + included_item_data + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, PlansSingleGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = PlansSingleGetResponseLinks.from_dict(_links) + + plans_single_get_response_obj = cls( + data=data, + included=included, + links=links, + ) + + plans_single_get_response_obj.additional_properties = d + return plans_single_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data.py new file mode 100644 index 00000000..90f7a392 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data.py @@ -0,0 +1,189 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_single_get_response_data_type import ( + PlansSingleGetResponseDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_get_response_data_attributes import ( + PlansSingleGetResponseDataAttributes, + ) + from ..models.plans_single_get_response_data_links import ( + PlansSingleGetResponseDataLinks, + ) + from ..models.plans_single_get_response_data_meta import ( + PlansSingleGetResponseDataMeta, + ) + from ..models.plans_single_get_response_data_relationships import ( + PlansSingleGetResponseDataRelationships, + ) + + +T = TypeVar("T", bound="PlansSingleGetResponseData") + + +@_attrs_define +class PlansSingleGetResponseData: + """ + Attributes: + type (Union[Unset, PlansSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyPlanId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, PlansSingleGetResponseDataAttributes]): + relationships (Union[Unset, PlansSingleGetResponseDataRelationships]): + meta (Union[Unset, PlansSingleGetResponseDataMeta]): + links (Union[Unset, PlansSingleGetResponseDataLinks]): + """ + + type: Union[Unset, PlansSingleGetResponseDataType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[Unset, "PlansSingleGetResponseDataAttributes"] = UNSET + relationships: Union[ + Unset, "PlansSingleGetResponseDataRelationships" + ] = UNSET + meta: Union[Unset, "PlansSingleGetResponseDataMeta"] = UNSET + links: Union[Unset, "PlansSingleGetResponseDataLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_get_response_data_attributes import ( + PlansSingleGetResponseDataAttributes, + ) + from ..models.plans_single_get_response_data_links import ( + PlansSingleGetResponseDataLinks, + ) + from ..models.plans_single_get_response_data_meta import ( + PlansSingleGetResponseDataMeta, + ) + from ..models.plans_single_get_response_data_relationships import ( + PlansSingleGetResponseDataRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, PlansSingleGetResponseDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansSingleGetResponseDataType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, PlansSingleGetResponseDataAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = PlansSingleGetResponseDataAttributes.from_dict( + _attributes + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[Unset, PlansSingleGetResponseDataRelationships] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = PlansSingleGetResponseDataRelationships.from_dict( + _relationships + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, PlansSingleGetResponseDataMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = PlansSingleGetResponseDataMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, PlansSingleGetResponseDataLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = PlansSingleGetResponseDataLinks.from_dict(_links) + + plans_single_get_response_data_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + plans_single_get_response_data_obj.additional_properties = d + return plans_single_get_response_data_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes.py new file mode 100644 index 00000000..72921271 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes.py @@ -0,0 +1,362 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.plans_single_get_response_data_attributes_calculation_type import ( + PlansSingleGetResponseDataAttributesCalculationType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_get_response_data_attributes_description import ( + PlansSingleGetResponseDataAttributesDescription, + ) + from ..models.plans_single_get_response_data_attributes_home_page_content import ( + PlansSingleGetResponseDataAttributesHomePageContent, + ) + + +T = TypeVar("T", bound="PlansSingleGetResponseDataAttributes") + + +@_attrs_define +class PlansSingleGetResponseDataAttributes: + """ + Attributes: + allowed_types (Union[Unset, List[str]]): + calculation_type (Union[Unset, PlansSingleGetResponseDataAttributesCalculationType]): Example: timeBased. + capacity (Union[Unset, float]): + color (Union[Unset, str]): Example: Color. + created (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + default_estimate (Union[Unset, float]): + description (Union[Unset, PlansSingleGetResponseDataAttributesDescription]): + due_date (Union[Unset, datetime.date]): Example: 1970-01-01. + estimation_field (Union[Unset, str]): Example: Estimation Field. + finished_on (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + home_page_content (Union[Unset, PlansSingleGetResponseDataAttributesHomePageContent]): + id (Union[Unset, str]): Example: ID. + is_template (Union[Unset, bool]): + name (Union[Unset, str]): Example: Name. + previous_time_spent (Union[Unset, str]): Example: 5 1/2d. + prioritization_field (Union[Unset, str]): Example: Prioritization Field. + sort_order (Union[Unset, int]): + start_date (Union[Unset, datetime.date]): Example: 1970-01-01. + started_on (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + status (Union[Unset, str]): + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + use_report_from_template (Union[Unset, bool]): + """ + + allowed_types: Union[Unset, List[str]] = UNSET + calculation_type: Union[ + Unset, PlansSingleGetResponseDataAttributesCalculationType + ] = UNSET + capacity: Union[Unset, float] = UNSET + color: Union[Unset, str] = UNSET + created: Union[Unset, datetime.datetime] = UNSET + default_estimate: Union[Unset, float] = UNSET + description: Union[ + Unset, "PlansSingleGetResponseDataAttributesDescription" + ] = UNSET + due_date: Union[Unset, datetime.date] = UNSET + estimation_field: Union[Unset, str] = UNSET + finished_on: Union[Unset, datetime.datetime] = UNSET + home_page_content: Union[ + Unset, "PlansSingleGetResponseDataAttributesHomePageContent" + ] = UNSET + id: Union[Unset, str] = UNSET + is_template: Union[Unset, bool] = UNSET + name: Union[Unset, str] = UNSET + previous_time_spent: Union[Unset, str] = UNSET + prioritization_field: Union[Unset, str] = UNSET + sort_order: Union[Unset, int] = UNSET + start_date: Union[Unset, datetime.date] = UNSET + started_on: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, str] = UNSET + updated: Union[Unset, datetime.datetime] = UNSET + use_report_from_template: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + allowed_types: Union[Unset, List[str]] = UNSET + if not isinstance(self.allowed_types, Unset): + allowed_types = self.allowed_types + + calculation_type: Union[Unset, str] = UNSET + if not isinstance(self.calculation_type, Unset): + calculation_type = self.calculation_type.value + + capacity = self.capacity + + color = self.color + + created: Union[Unset, str] = UNSET + if not isinstance(self.created, Unset): + created = self.created.isoformat() + + default_estimate = self.default_estimate + + description: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.description, Unset): + description = self.description.to_dict() + + due_date: Union[Unset, str] = UNSET + if not isinstance(self.due_date, Unset): + due_date = self.due_date.isoformat() + + estimation_field = self.estimation_field + + finished_on: Union[Unset, str] = UNSET + if not isinstance(self.finished_on, Unset): + finished_on = self.finished_on.isoformat() + + home_page_content: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.home_page_content, Unset): + home_page_content = self.home_page_content.to_dict() + + id = self.id + + is_template = self.is_template + + name = self.name + + previous_time_spent = self.previous_time_spent + + prioritization_field = self.prioritization_field + + sort_order = self.sort_order + + start_date: Union[Unset, str] = UNSET + if not isinstance(self.start_date, Unset): + start_date = self.start_date.isoformat() + + started_on: Union[Unset, str] = UNSET + if not isinstance(self.started_on, Unset): + started_on = self.started_on.isoformat() + + status = self.status + + updated: Union[Unset, str] = UNSET + if not isinstance(self.updated, Unset): + updated = self.updated.isoformat() + + use_report_from_template = self.use_report_from_template + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if allowed_types is not UNSET: + field_dict["allowedTypes"] = allowed_types + if calculation_type is not UNSET: + field_dict["calculationType"] = calculation_type + if capacity is not UNSET: + field_dict["capacity"] = capacity + if color is not UNSET: + field_dict["color"] = color + if created is not UNSET: + field_dict["created"] = created + if default_estimate is not UNSET: + field_dict["defaultEstimate"] = default_estimate + if description is not UNSET: + field_dict["description"] = description + if due_date is not UNSET: + field_dict["dueDate"] = due_date + if estimation_field is not UNSET: + field_dict["estimationField"] = estimation_field + if finished_on is not UNSET: + field_dict["finishedOn"] = finished_on + if home_page_content is not UNSET: + field_dict["homePageContent"] = home_page_content + if id is not UNSET: + field_dict["id"] = id + if is_template is not UNSET: + field_dict["isTemplate"] = is_template + if name is not UNSET: + field_dict["name"] = name + if previous_time_spent is not UNSET: + field_dict["previousTimeSpent"] = previous_time_spent + if prioritization_field is not UNSET: + field_dict["prioritizationField"] = prioritization_field + if sort_order is not UNSET: + field_dict["sortOrder"] = sort_order + if start_date is not UNSET: + field_dict["startDate"] = start_date + if started_on is not UNSET: + field_dict["startedOn"] = started_on + if status is not UNSET: + field_dict["status"] = status + if updated is not UNSET: + field_dict["updated"] = updated + if use_report_from_template is not UNSET: + field_dict["useReportFromTemplate"] = use_report_from_template + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_get_response_data_attributes_description import ( + PlansSingleGetResponseDataAttributesDescription, + ) + from ..models.plans_single_get_response_data_attributes_home_page_content import ( + PlansSingleGetResponseDataAttributesHomePageContent, + ) + + d = src_dict.copy() + allowed_types = cast(List[str], d.pop("allowedTypes", UNSET)) + + _calculation_type = d.pop("calculationType", UNSET) + calculation_type: Union[ + Unset, PlansSingleGetResponseDataAttributesCalculationType + ] + if isinstance(_calculation_type, Unset): + calculation_type = UNSET + else: + calculation_type = ( + PlansSingleGetResponseDataAttributesCalculationType( + _calculation_type + ) + ) + + capacity = d.pop("capacity", UNSET) + + color = d.pop("color", UNSET) + + _created = d.pop("created", UNSET) + created: Union[Unset, datetime.datetime] + if isinstance(_created, Unset): + created = UNSET + else: + created = isoparse(_created) + + default_estimate = d.pop("defaultEstimate", UNSET) + + _description = d.pop("description", UNSET) + description: Union[ + Unset, PlansSingleGetResponseDataAttributesDescription + ] + if isinstance(_description, Unset): + description = UNSET + else: + description = ( + PlansSingleGetResponseDataAttributesDescription.from_dict( + _description + ) + ) + + _due_date = d.pop("dueDate", UNSET) + due_date: Union[Unset, datetime.date] + if isinstance(_due_date, Unset): + due_date = UNSET + else: + due_date = isoparse(_due_date).date() + + estimation_field = d.pop("estimationField", UNSET) + + _finished_on = d.pop("finishedOn", UNSET) + finished_on: Union[Unset, datetime.datetime] + if isinstance(_finished_on, Unset): + finished_on = UNSET + else: + finished_on = isoparse(_finished_on) + + _home_page_content = d.pop("homePageContent", UNSET) + home_page_content: Union[ + Unset, PlansSingleGetResponseDataAttributesHomePageContent + ] + if isinstance(_home_page_content, Unset): + home_page_content = UNSET + else: + home_page_content = ( + PlansSingleGetResponseDataAttributesHomePageContent.from_dict( + _home_page_content + ) + ) + + id = d.pop("id", UNSET) + + is_template = d.pop("isTemplate", UNSET) + + name = d.pop("name", UNSET) + + previous_time_spent = d.pop("previousTimeSpent", UNSET) + + prioritization_field = d.pop("prioritizationField", UNSET) + + sort_order = d.pop("sortOrder", UNSET) + + _start_date = d.pop("startDate", UNSET) + start_date: Union[Unset, datetime.date] + if isinstance(_start_date, Unset): + start_date = UNSET + else: + start_date = isoparse(_start_date).date() + + _started_on = d.pop("startedOn", UNSET) + started_on: Union[Unset, datetime.datetime] + if isinstance(_started_on, Unset): + started_on = UNSET + else: + started_on = isoparse(_started_on) + + status = d.pop("status", UNSET) + + _updated = d.pop("updated", UNSET) + updated: Union[Unset, datetime.datetime] + if isinstance(_updated, Unset): + updated = UNSET + else: + updated = isoparse(_updated) + + use_report_from_template = d.pop("useReportFromTemplate", UNSET) + + plans_single_get_response_data_attributes_obj = cls( + allowed_types=allowed_types, + calculation_type=calculation_type, + capacity=capacity, + color=color, + created=created, + default_estimate=default_estimate, + description=description, + due_date=due_date, + estimation_field=estimation_field, + finished_on=finished_on, + home_page_content=home_page_content, + id=id, + is_template=is_template, + name=name, + previous_time_spent=previous_time_spent, + prioritization_field=prioritization_field, + sort_order=sort_order, + start_date=start_date, + started_on=started_on, + status=status, + updated=updated, + use_report_from_template=use_report_from_template, + ) + + plans_single_get_response_data_attributes_obj.additional_properties = d + return plans_single_get_response_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_calculation_type.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_calculation_type.py new file mode 100644 index 00000000..6170dc6a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_calculation_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansSingleGetResponseDataAttributesCalculationType(str, Enum): + CUSTOMFIELDBASED = "customFieldBased" + TIMEBASED = "timeBased" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_description.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_description.py new file mode 100644 index 00000000..950b0261 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_description.py @@ -0,0 +1,86 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_single_get_response_data_attributes_description_type import ( + PlansSingleGetResponseDataAttributesDescriptionType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansSingleGetResponseDataAttributesDescription") + + +@_attrs_define +class PlansSingleGetResponseDataAttributesDescription: + """ + Attributes: + type (Union[Unset, PlansSingleGetResponseDataAttributesDescriptionType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, PlansSingleGetResponseDataAttributesDescriptionType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, PlansSingleGetResponseDataAttributesDescriptionType] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansSingleGetResponseDataAttributesDescriptionType(_type) + + value = d.pop("value", UNSET) + + plans_single_get_response_data_attributes_description_obj = cls( + type=type, + value=value, + ) + + plans_single_get_response_data_attributes_description_obj.additional_properties = ( + d + ) + return plans_single_get_response_data_attributes_description_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_description_type.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_description_type.py new file mode 100644 index 00000000..985f6baf --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_description_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansSingleGetResponseDataAttributesDescriptionType(str, Enum): + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_home_page_content.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_home_page_content.py new file mode 100644 index 00000000..3eb498d5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_home_page_content.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_single_get_response_data_attributes_home_page_content_type import ( + PlansSingleGetResponseDataAttributesHomePageContentType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansSingleGetResponseDataAttributesHomePageContent") + + +@_attrs_define +class PlansSingleGetResponseDataAttributesHomePageContent: + """ + Attributes: + type (Union[Unset, PlansSingleGetResponseDataAttributesHomePageContentType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, PlansSingleGetResponseDataAttributesHomePageContentType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansSingleGetResponseDataAttributesHomePageContentType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansSingleGetResponseDataAttributesHomePageContentType( + _type + ) + + value = d.pop("value", UNSET) + + plans_single_get_response_data_attributes_home_page_content_obj = cls( + type=type, + value=value, + ) + + plans_single_get_response_data_attributes_home_page_content_obj.additional_properties = ( + d + ) + return plans_single_get_response_data_attributes_home_page_content_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_home_page_content_type.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_home_page_content_type.py new file mode 100644 index 00000000..ff06e158 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_attributes_home_page_content_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansSingleGetResponseDataAttributesHomePageContentType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_links.py new file mode 100644 index 00000000..f9635888 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_links.py @@ -0,0 +1,74 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansSingleGetResponseDataLinks") + + +@_attrs_define +class PlansSingleGetResponseDataLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/plans/MyPlanId?revision=1234. + portal (Union[Unset, str]): Example: server-host-name/application- + path/polarion/redirect/project/MyProjectId/plan?id=MyPlanId&revision=1234. + """ + + self_: Union[Unset, str] = UNSET + portal: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + portal = self.portal + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if portal is not UNSET: + field_dict["portal"] = portal + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + portal = d.pop("portal", UNSET) + + plans_single_get_response_data_links_obj = cls( + self_=self_, + portal=portal, + ) + + plans_single_get_response_data_links_obj.additional_properties = d + return plans_single_get_response_data_links_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_meta.py new file mode 100644 index 00000000..b04d8905 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_meta.py @@ -0,0 +1,87 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_get_response_data_meta_errors_item import ( + PlansSingleGetResponseDataMetaErrorsItem, + ) + + +T = TypeVar("T", bound="PlansSingleGetResponseDataMeta") + + +@_attrs_define +class PlansSingleGetResponseDataMeta: + """ + Attributes: + errors (Union[Unset, List['PlansSingleGetResponseDataMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["PlansSingleGetResponseDataMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_get_response_data_meta_errors_item import ( + PlansSingleGetResponseDataMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = PlansSingleGetResponseDataMetaErrorsItem.from_dict( + errors_item_data + ) + + errors.append(errors_item) + + plans_single_get_response_data_meta_obj = cls( + errors=errors, + ) + + plans_single_get_response_data_meta_obj.additional_properties = d + return plans_single_get_response_data_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_meta_errors_item.py new file mode 100644 index 00000000..cb43759c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_meta_errors_item.py @@ -0,0 +1,114 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_get_response_data_meta_errors_item_source import ( + PlansSingleGetResponseDataMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="PlansSingleGetResponseDataMetaErrorsItem") + + +@_attrs_define +class PlansSingleGetResponseDataMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, PlansSingleGetResponseDataMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "PlansSingleGetResponseDataMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_get_response_data_meta_errors_item_source import ( + PlansSingleGetResponseDataMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[Unset, PlansSingleGetResponseDataMetaErrorsItemSource] + if isinstance(_source, Unset): + source = UNSET + else: + source = PlansSingleGetResponseDataMetaErrorsItemSource.from_dict( + _source + ) + + plans_single_get_response_data_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + plans_single_get_response_data_meta_errors_item_obj.additional_properties = ( + d + ) + return plans_single_get_response_data_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_meta_errors_item_source.py new file mode 100644 index 00000000..dac469c3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_meta_errors_item_source.py @@ -0,0 +1,106 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_get_response_data_meta_errors_item_source_resource import ( + PlansSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + +T = TypeVar("T", bound="PlansSingleGetResponseDataMetaErrorsItemSource") + + +@_attrs_define +class PlansSingleGetResponseDataMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, PlansSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "PlansSingleGetResponseDataMetaErrorsItemSourceResource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_get_response_data_meta_errors_item_source_resource import ( + PlansSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, PlansSingleGetResponseDataMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = PlansSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + + plans_single_get_response_data_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + plans_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( + d + ) + return plans_single_get_response_data_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..9c835b6c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,81 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="PlansSingleGetResponseDataMetaErrorsItemSourceResource" +) + + +@_attrs_define +class PlansSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + plans_single_get_response_data_meta_errors_item_source_resource_obj = ( + cls( + id=id, + type=type, + ) + ) + + plans_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return ( + plans_single_get_response_data_meta_errors_item_source_resource_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships.py new file mode 100644 index 00000000..5f45a644 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships.py @@ -0,0 +1,226 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_get_response_data_relationships_author import ( + PlansSingleGetResponseDataRelationshipsAuthor, + ) + from ..models.plans_single_get_response_data_relationships_parent import ( + PlansSingleGetResponseDataRelationshipsParent, + ) + from ..models.plans_single_get_response_data_relationships_project import ( + PlansSingleGetResponseDataRelationshipsProject, + ) + from ..models.plans_single_get_response_data_relationships_project_span import ( + PlansSingleGetResponseDataRelationshipsProjectSpan, + ) + from ..models.plans_single_get_response_data_relationships_template import ( + PlansSingleGetResponseDataRelationshipsTemplate, + ) + from ..models.plans_single_get_response_data_relationships_work_items import ( + PlansSingleGetResponseDataRelationshipsWorkItems, + ) + + +T = TypeVar("T", bound="PlansSingleGetResponseDataRelationships") + + +@_attrs_define +class PlansSingleGetResponseDataRelationships: + """ + Attributes: + author (Union[Unset, PlansSingleGetResponseDataRelationshipsAuthor]): + parent (Union[Unset, PlansSingleGetResponseDataRelationshipsParent]): + project (Union[Unset, PlansSingleGetResponseDataRelationshipsProject]): + project_span (Union[Unset, PlansSingleGetResponseDataRelationshipsProjectSpan]): + template (Union[Unset, PlansSingleGetResponseDataRelationshipsTemplate]): + work_items (Union[Unset, PlansSingleGetResponseDataRelationshipsWorkItems]): + """ + + author: Union[ + Unset, "PlansSingleGetResponseDataRelationshipsAuthor" + ] = UNSET + parent: Union[ + Unset, "PlansSingleGetResponseDataRelationshipsParent" + ] = UNSET + project: Union[ + Unset, "PlansSingleGetResponseDataRelationshipsProject" + ] = UNSET + project_span: Union[ + Unset, "PlansSingleGetResponseDataRelationshipsProjectSpan" + ] = UNSET + template: Union[ + Unset, "PlansSingleGetResponseDataRelationshipsTemplate" + ] = UNSET + work_items: Union[ + Unset, "PlansSingleGetResponseDataRelationshipsWorkItems" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + author: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.author, Unset): + author = self.author.to_dict() + + parent: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.parent, Unset): + parent = self.parent.to_dict() + + project: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project, Unset): + project = self.project.to_dict() + + project_span: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project_span, Unset): + project_span = self.project_span.to_dict() + + template: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.template, Unset): + template = self.template.to_dict() + + work_items: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.work_items, Unset): + work_items = self.work_items.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if author is not UNSET: + field_dict["author"] = author + if parent is not UNSET: + field_dict["parent"] = parent + if project is not UNSET: + field_dict["project"] = project + if project_span is not UNSET: + field_dict["projectSpan"] = project_span + if template is not UNSET: + field_dict["template"] = template + if work_items is not UNSET: + field_dict["workItems"] = work_items + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_get_response_data_relationships_author import ( + PlansSingleGetResponseDataRelationshipsAuthor, + ) + from ..models.plans_single_get_response_data_relationships_parent import ( + PlansSingleGetResponseDataRelationshipsParent, + ) + from ..models.plans_single_get_response_data_relationships_project import ( + PlansSingleGetResponseDataRelationshipsProject, + ) + from ..models.plans_single_get_response_data_relationships_project_span import ( + PlansSingleGetResponseDataRelationshipsProjectSpan, + ) + from ..models.plans_single_get_response_data_relationships_template import ( + PlansSingleGetResponseDataRelationshipsTemplate, + ) + from ..models.plans_single_get_response_data_relationships_work_items import ( + PlansSingleGetResponseDataRelationshipsWorkItems, + ) + + d = src_dict.copy() + _author = d.pop("author", UNSET) + author: Union[Unset, PlansSingleGetResponseDataRelationshipsAuthor] + if isinstance(_author, Unset): + author = UNSET + else: + author = PlansSingleGetResponseDataRelationshipsAuthor.from_dict( + _author + ) + + _parent = d.pop("parent", UNSET) + parent: Union[Unset, PlansSingleGetResponseDataRelationshipsParent] + if isinstance(_parent, Unset): + parent = UNSET + else: + parent = PlansSingleGetResponseDataRelationshipsParent.from_dict( + _parent + ) + + _project = d.pop("project", UNSET) + project: Union[Unset, PlansSingleGetResponseDataRelationshipsProject] + if isinstance(_project, Unset): + project = UNSET + else: + project = PlansSingleGetResponseDataRelationshipsProject.from_dict( + _project + ) + + _project_span = d.pop("projectSpan", UNSET) + project_span: Union[ + Unset, PlansSingleGetResponseDataRelationshipsProjectSpan + ] + if isinstance(_project_span, Unset): + project_span = UNSET + else: + project_span = ( + PlansSingleGetResponseDataRelationshipsProjectSpan.from_dict( + _project_span + ) + ) + + _template = d.pop("template", UNSET) + template: Union[Unset, PlansSingleGetResponseDataRelationshipsTemplate] + if isinstance(_template, Unset): + template = UNSET + else: + template = ( + PlansSingleGetResponseDataRelationshipsTemplate.from_dict( + _template + ) + ) + + _work_items = d.pop("workItems", UNSET) + work_items: Union[ + Unset, PlansSingleGetResponseDataRelationshipsWorkItems + ] + if isinstance(_work_items, Unset): + work_items = UNSET + else: + work_items = ( + PlansSingleGetResponseDataRelationshipsWorkItems.from_dict( + _work_items + ) + ) + + plans_single_get_response_data_relationships_obj = cls( + author=author, + parent=parent, + project=project, + project_span=project_span, + template=template, + work_items=work_items, + ) + + plans_single_get_response_data_relationships_obj.additional_properties = ( + d + ) + return plans_single_get_response_data_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_author.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_author.py new file mode 100644 index 00000000..e9ed9ef3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_author.py @@ -0,0 +1,86 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_get_response_data_relationships_author_data import ( + PlansSingleGetResponseDataRelationshipsAuthorData, + ) + + +T = TypeVar("T", bound="PlansSingleGetResponseDataRelationshipsAuthor") + + +@_attrs_define +class PlansSingleGetResponseDataRelationshipsAuthor: + """ + Attributes: + data (Union[Unset, PlansSingleGetResponseDataRelationshipsAuthorData]): + """ + + data: Union[ + Unset, "PlansSingleGetResponseDataRelationshipsAuthorData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_get_response_data_relationships_author_data import ( + PlansSingleGetResponseDataRelationshipsAuthorData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PlansSingleGetResponseDataRelationshipsAuthorData] + if isinstance(_data, Unset): + data = UNSET + else: + data = PlansSingleGetResponseDataRelationshipsAuthorData.from_dict( + _data + ) + + plans_single_get_response_data_relationships_author_obj = cls( + data=data, + ) + + plans_single_get_response_data_relationships_author_obj.additional_properties = ( + d + ) + return plans_single_get_response_data_relationships_author_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_author_data.py new file mode 100644 index 00000000..912f76eb --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_author_data.py @@ -0,0 +1,97 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_single_get_response_data_relationships_author_data_type import ( + PlansSingleGetResponseDataRelationshipsAuthorDataType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansSingleGetResponseDataRelationshipsAuthorData") + + +@_attrs_define +class PlansSingleGetResponseDataRelationshipsAuthorData: + """ + Attributes: + type (Union[Unset, PlansSingleGetResponseDataRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, PlansSingleGetResponseDataRelationshipsAuthorDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansSingleGetResponseDataRelationshipsAuthorDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansSingleGetResponseDataRelationshipsAuthorDataType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + plans_single_get_response_data_relationships_author_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + plans_single_get_response_data_relationships_author_data_obj.additional_properties = ( + d + ) + return plans_single_get_response_data_relationships_author_data_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_author_data_type.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_author_data_type.py new file mode 100644 index 00000000..099c81f9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_author_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansSingleGetResponseDataRelationshipsAuthorDataType(str, Enum): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_parent.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_parent.py new file mode 100644 index 00000000..101707da --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_parent.py @@ -0,0 +1,86 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_get_response_data_relationships_parent_data import ( + PlansSingleGetResponseDataRelationshipsParentData, + ) + + +T = TypeVar("T", bound="PlansSingleGetResponseDataRelationshipsParent") + + +@_attrs_define +class PlansSingleGetResponseDataRelationshipsParent: + """ + Attributes: + data (Union[Unset, PlansSingleGetResponseDataRelationshipsParentData]): + """ + + data: Union[ + Unset, "PlansSingleGetResponseDataRelationshipsParentData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_get_response_data_relationships_parent_data import ( + PlansSingleGetResponseDataRelationshipsParentData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PlansSingleGetResponseDataRelationshipsParentData] + if isinstance(_data, Unset): + data = UNSET + else: + data = PlansSingleGetResponseDataRelationshipsParentData.from_dict( + _data + ) + + plans_single_get_response_data_relationships_parent_obj = cls( + data=data, + ) + + plans_single_get_response_data_relationships_parent_obj.additional_properties = ( + d + ) + return plans_single_get_response_data_relationships_parent_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_parent_data.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_parent_data.py new file mode 100644 index 00000000..414a6820 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_parent_data.py @@ -0,0 +1,97 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_single_get_response_data_relationships_parent_data_type import ( + PlansSingleGetResponseDataRelationshipsParentDataType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansSingleGetResponseDataRelationshipsParentData") + + +@_attrs_define +class PlansSingleGetResponseDataRelationshipsParentData: + """ + Attributes: + type (Union[Unset, PlansSingleGetResponseDataRelationshipsParentDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyPlanId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, PlansSingleGetResponseDataRelationshipsParentDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansSingleGetResponseDataRelationshipsParentDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansSingleGetResponseDataRelationshipsParentDataType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + plans_single_get_response_data_relationships_parent_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + plans_single_get_response_data_relationships_parent_data_obj.additional_properties = ( + d + ) + return plans_single_get_response_data_relationships_parent_data_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_parent_data_type.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_parent_data_type.py new file mode 100644 index 00000000..920d537f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_parent_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansSingleGetResponseDataRelationshipsParentDataType(str, Enum): + PLANS = "plans" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project.py new file mode 100644 index 00000000..d849b255 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_get_response_data_relationships_project_data import ( + PlansSingleGetResponseDataRelationshipsProjectData, + ) + + +T = TypeVar("T", bound="PlansSingleGetResponseDataRelationshipsProject") + + +@_attrs_define +class PlansSingleGetResponseDataRelationshipsProject: + """ + Attributes: + data (Union[Unset, PlansSingleGetResponseDataRelationshipsProjectData]): + """ + + data: Union[ + Unset, "PlansSingleGetResponseDataRelationshipsProjectData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_get_response_data_relationships_project_data import ( + PlansSingleGetResponseDataRelationshipsProjectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PlansSingleGetResponseDataRelationshipsProjectData] + if isinstance(_data, Unset): + data = UNSET + else: + data = ( + PlansSingleGetResponseDataRelationshipsProjectData.from_dict( + _data + ) + ) + + plans_single_get_response_data_relationships_project_obj = cls( + data=data, + ) + + plans_single_get_response_data_relationships_project_obj.additional_properties = ( + d + ) + return plans_single_get_response_data_relationships_project_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_data.py new file mode 100644 index 00000000..9a9c7017 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_data.py @@ -0,0 +1,99 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_single_get_response_data_relationships_project_data_type import ( + PlansSingleGetResponseDataRelationshipsProjectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansSingleGetResponseDataRelationshipsProjectData") + + +@_attrs_define +class PlansSingleGetResponseDataRelationshipsProjectData: + """ + Attributes: + type (Union[Unset, PlansSingleGetResponseDataRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, PlansSingleGetResponseDataRelationshipsProjectDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansSingleGetResponseDataRelationshipsProjectDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansSingleGetResponseDataRelationshipsProjectDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + plans_single_get_response_data_relationships_project_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + plans_single_get_response_data_relationships_project_data_obj.additional_properties = ( + d + ) + return plans_single_get_response_data_relationships_project_data_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_data_type.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_data_type.py new file mode 100644 index 00000000..a455c68b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansSingleGetResponseDataRelationshipsProjectDataType(str, Enum): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_span.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_span.py new file mode 100644 index 00000000..d00ba54e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_span.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_get_response_data_relationships_project_span_data_item import ( + PlansSingleGetResponseDataRelationshipsProjectSpanDataItem, + ) + from ..models.plans_single_get_response_data_relationships_project_span_meta import ( + PlansSingleGetResponseDataRelationshipsProjectSpanMeta, + ) + + +T = TypeVar("T", bound="PlansSingleGetResponseDataRelationshipsProjectSpan") + + +@_attrs_define +class PlansSingleGetResponseDataRelationshipsProjectSpan: + """ + Attributes: + data (Union[Unset, List['PlansSingleGetResponseDataRelationshipsProjectSpanDataItem']]): + meta (Union[Unset, PlansSingleGetResponseDataRelationshipsProjectSpanMeta]): + """ + + data: Union[ + Unset, + List["PlansSingleGetResponseDataRelationshipsProjectSpanDataItem"], + ] = UNSET + meta: Union[ + Unset, "PlansSingleGetResponseDataRelationshipsProjectSpanMeta" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_get_response_data_relationships_project_span_data_item import ( + PlansSingleGetResponseDataRelationshipsProjectSpanDataItem, + ) + from ..models.plans_single_get_response_data_relationships_project_span_meta import ( + PlansSingleGetResponseDataRelationshipsProjectSpanMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = PlansSingleGetResponseDataRelationshipsProjectSpanDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, PlansSingleGetResponseDataRelationshipsProjectSpanMeta + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = PlansSingleGetResponseDataRelationshipsProjectSpanMeta.from_dict( + _meta + ) + + plans_single_get_response_data_relationships_project_span_obj = cls( + data=data, + meta=meta, + ) + + plans_single_get_response_data_relationships_project_span_obj.additional_properties = ( + d + ) + return plans_single_get_response_data_relationships_project_span_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_span_data_item.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_span_data_item.py new file mode 100644 index 00000000..aadc7e23 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_span_data_item.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_single_get_response_data_relationships_project_span_data_item_type import ( + PlansSingleGetResponseDataRelationshipsProjectSpanDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="PlansSingleGetResponseDataRelationshipsProjectSpanDataItem" +) + + +@_attrs_define +class PlansSingleGetResponseDataRelationshipsProjectSpanDataItem: + """ + Attributes: + type (Union[Unset, PlansSingleGetResponseDataRelationshipsProjectSpanDataItemType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, PlansSingleGetResponseDataRelationshipsProjectSpanDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + PlansSingleGetResponseDataRelationshipsProjectSpanDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + PlansSingleGetResponseDataRelationshipsProjectSpanDataItemType( + _type + ) + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + plans_single_get_response_data_relationships_project_span_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + plans_single_get_response_data_relationships_project_span_data_item_obj.additional_properties = ( + d + ) + return plans_single_get_response_data_relationships_project_span_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_span_data_item_type.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_span_data_item_type.py new file mode 100644 index 00000000..d648220c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_span_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansSingleGetResponseDataRelationshipsProjectSpanDataItemType( + str, Enum +): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_span_meta.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_span_meta.py new file mode 100644 index 00000000..fad08997 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_project_span_meta.py @@ -0,0 +1,71 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="PlansSingleGetResponseDataRelationshipsProjectSpanMeta" +) + + +@_attrs_define +class PlansSingleGetResponseDataRelationshipsProjectSpanMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + plans_single_get_response_data_relationships_project_span_meta_obj = ( + cls( + total_count=total_count, + ) + ) + + plans_single_get_response_data_relationships_project_span_meta_obj.additional_properties = ( + d + ) + return ( + plans_single_get_response_data_relationships_project_span_meta_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_template.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_template.py new file mode 100644 index 00000000..1207c92c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_template.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_get_response_data_relationships_template_data import ( + PlansSingleGetResponseDataRelationshipsTemplateData, + ) + + +T = TypeVar("T", bound="PlansSingleGetResponseDataRelationshipsTemplate") + + +@_attrs_define +class PlansSingleGetResponseDataRelationshipsTemplate: + """ + Attributes: + data (Union[Unset, PlansSingleGetResponseDataRelationshipsTemplateData]): + """ + + data: Union[ + Unset, "PlansSingleGetResponseDataRelationshipsTemplateData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_get_response_data_relationships_template_data import ( + PlansSingleGetResponseDataRelationshipsTemplateData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PlansSingleGetResponseDataRelationshipsTemplateData] + if isinstance(_data, Unset): + data = UNSET + else: + data = ( + PlansSingleGetResponseDataRelationshipsTemplateData.from_dict( + _data + ) + ) + + plans_single_get_response_data_relationships_template_obj = cls( + data=data, + ) + + plans_single_get_response_data_relationships_template_obj.additional_properties = ( + d + ) + return plans_single_get_response_data_relationships_template_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_template_data.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_template_data.py new file mode 100644 index 00000000..03b79d6d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_template_data.py @@ -0,0 +1,99 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_single_get_response_data_relationships_template_data_type import ( + PlansSingleGetResponseDataRelationshipsTemplateDataType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansSingleGetResponseDataRelationshipsTemplateData") + + +@_attrs_define +class PlansSingleGetResponseDataRelationshipsTemplateData: + """ + Attributes: + type (Union[Unset, PlansSingleGetResponseDataRelationshipsTemplateDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyPlanId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, PlansSingleGetResponseDataRelationshipsTemplateDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansSingleGetResponseDataRelationshipsTemplateDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansSingleGetResponseDataRelationshipsTemplateDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + plans_single_get_response_data_relationships_template_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + plans_single_get_response_data_relationships_template_data_obj.additional_properties = ( + d + ) + return plans_single_get_response_data_relationships_template_data_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_template_data_type.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_template_data_type.py new file mode 100644 index 00000000..dc783e53 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_template_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansSingleGetResponseDataRelationshipsTemplateDataType(str, Enum): + PLANS = "plans" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_work_items.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_work_items.py new file mode 100644 index 00000000..6debffff --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_work_items.py @@ -0,0 +1,119 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_get_response_data_relationships_work_items_data_item import ( + PlansSingleGetResponseDataRelationshipsWorkItemsDataItem, + ) + from ..models.plans_single_get_response_data_relationships_work_items_meta import ( + PlansSingleGetResponseDataRelationshipsWorkItemsMeta, + ) + + +T = TypeVar("T", bound="PlansSingleGetResponseDataRelationshipsWorkItems") + + +@_attrs_define +class PlansSingleGetResponseDataRelationshipsWorkItems: + """ + Attributes: + data (Union[Unset, List['PlansSingleGetResponseDataRelationshipsWorkItemsDataItem']]): + meta (Union[Unset, PlansSingleGetResponseDataRelationshipsWorkItemsMeta]): + """ + + data: Union[ + Unset, List["PlansSingleGetResponseDataRelationshipsWorkItemsDataItem"] + ] = UNSET + meta: Union[ + Unset, "PlansSingleGetResponseDataRelationshipsWorkItemsMeta" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_get_response_data_relationships_work_items_data_item import ( + PlansSingleGetResponseDataRelationshipsWorkItemsDataItem, + ) + from ..models.plans_single_get_response_data_relationships_work_items_meta import ( + PlansSingleGetResponseDataRelationshipsWorkItemsMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = PlansSingleGetResponseDataRelationshipsWorkItemsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, PlansSingleGetResponseDataRelationshipsWorkItemsMeta + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = ( + PlansSingleGetResponseDataRelationshipsWorkItemsMeta.from_dict( + _meta + ) + ) + + plans_single_get_response_data_relationships_work_items_obj = cls( + data=data, + meta=meta, + ) + + plans_single_get_response_data_relationships_work_items_obj.additional_properties = ( + d + ) + return plans_single_get_response_data_relationships_work_items_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_work_items_data_item.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_work_items_data_item.py new file mode 100644 index 00000000..e23cd21d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_work_items_data_item.py @@ -0,0 +1,103 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_single_get_response_data_relationships_work_items_data_item_type import ( + PlansSingleGetResponseDataRelationshipsWorkItemsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="PlansSingleGetResponseDataRelationshipsWorkItemsDataItem" +) + + +@_attrs_define +class PlansSingleGetResponseDataRelationshipsWorkItemsDataItem: + """ + Attributes: + type (Union[Unset, PlansSingleGetResponseDataRelationshipsWorkItemsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, PlansSingleGetResponseDataRelationshipsWorkItemsDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansSingleGetResponseDataRelationshipsWorkItemsDataItemType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + PlansSingleGetResponseDataRelationshipsWorkItemsDataItemType( + _type + ) + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + plans_single_get_response_data_relationships_work_items_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + plans_single_get_response_data_relationships_work_items_data_item_obj.additional_properties = ( + d + ) + return plans_single_get_response_data_relationships_work_items_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_work_items_data_item_type.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_work_items_data_item_type.py new file mode 100644 index 00000000..4dc68d6b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_work_items_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansSingleGetResponseDataRelationshipsWorkItemsDataItemType(str, Enum): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_work_items_meta.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_work_items_meta.py new file mode 100644 index 00000000..fcfbd28a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_relationships_work_items_meta.py @@ -0,0 +1,65 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansSingleGetResponseDataRelationshipsWorkItemsMeta") + + +@_attrs_define +class PlansSingleGetResponseDataRelationshipsWorkItemsMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + plans_single_get_response_data_relationships_work_items_meta_obj = cls( + total_count=total_count, + ) + + plans_single_get_response_data_relationships_work_items_meta_obj.additional_properties = ( + d + ) + return plans_single_get_response_data_relationships_work_items_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_type.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_type.py new file mode 100644 index 00000000..7845ebba --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansSingleGetResponseDataType(str, Enum): + PLANS = "plans" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_single_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_included_item.py new file mode 100644 index 00000000..314f73a3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_included_item.py @@ -0,0 +1,49 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PlansSingleGetResponseIncludedItem") + + +@_attrs_define +class PlansSingleGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + plans_single_get_response_included_item_obj = cls() + + plans_single_get_response_included_item_obj.additional_properties = d + return plans_single_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_links.py new file mode 100644 index 00000000..e00f3cde --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_get_response_links.py @@ -0,0 +1,64 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansSingleGetResponseLinks") + + +@_attrs_define +class PlansSingleGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/plans/MyPlanId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + plans_single_get_response_links_obj = cls( + self_=self_, + ) + + plans_single_get_response_links_obj.additional_properties = d + return plans_single_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_patch_request.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request.py new file mode 100644 index 00000000..e0809d52 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request.py @@ -0,0 +1,80 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_patch_request_data import ( + PlansSinglePatchRequestData, + ) + + +T = TypeVar("T", bound="PlansSinglePatchRequest") + + +@_attrs_define +class PlansSinglePatchRequest: + """ + Attributes: + data (Union[Unset, PlansSinglePatchRequestData]): + """ + + data: Union[Unset, "PlansSinglePatchRequestData"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_patch_request_data import ( + PlansSinglePatchRequestData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PlansSinglePatchRequestData] + if isinstance(_data, Unset): + data = UNSET + else: + data = PlansSinglePatchRequestData.from_dict(_data) + + plans_single_patch_request_obj = cls( + data=data, + ) + + plans_single_patch_request_obj.additional_properties = d + return plans_single_patch_request_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data.py new file mode 100644 index 00000000..e860cdfc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data.py @@ -0,0 +1,136 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_single_patch_request_data_type import ( + PlansSinglePatchRequestDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_patch_request_data_attributes import ( + PlansSinglePatchRequestDataAttributes, + ) + from ..models.plans_single_patch_request_data_relationships import ( + PlansSinglePatchRequestDataRelationships, + ) + + +T = TypeVar("T", bound="PlansSinglePatchRequestData") + + +@_attrs_define +class PlansSinglePatchRequestData: + """ + Attributes: + type (Union[Unset, PlansSinglePatchRequestDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyPlanId. + attributes (Union[Unset, PlansSinglePatchRequestDataAttributes]): + relationships (Union[Unset, PlansSinglePatchRequestDataRelationships]): + """ + + type: Union[Unset, PlansSinglePatchRequestDataType] = UNSET + id: Union[Unset, str] = UNSET + attributes: Union[Unset, "PlansSinglePatchRequestDataAttributes"] = UNSET + relationships: Union[ + Unset, "PlansSinglePatchRequestDataRelationships" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_patch_request_data_attributes import ( + PlansSinglePatchRequestDataAttributes, + ) + from ..models.plans_single_patch_request_data_relationships import ( + PlansSinglePatchRequestDataRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, PlansSinglePatchRequestDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansSinglePatchRequestDataType(_type) + + id = d.pop("id", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, PlansSinglePatchRequestDataAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = PlansSinglePatchRequestDataAttributes.from_dict( + _attributes + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[Unset, PlansSinglePatchRequestDataRelationships] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = PlansSinglePatchRequestDataRelationships.from_dict( + _relationships + ) + + plans_single_patch_request_data_obj = cls( + type=type, + id=id, + attributes=attributes, + relationships=relationships, + ) + + plans_single_patch_request_data_obj.additional_properties = d + return plans_single_patch_request_data_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes.py new file mode 100644 index 00000000..7e5329db --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes.py @@ -0,0 +1,323 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.plans_single_patch_request_data_attributes_calculation_type import ( + PlansSinglePatchRequestDataAttributesCalculationType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_patch_request_data_attributes_description import ( + PlansSinglePatchRequestDataAttributesDescription, + ) + from ..models.plans_single_patch_request_data_attributes_home_page_content import ( + PlansSinglePatchRequestDataAttributesHomePageContent, + ) + + +T = TypeVar("T", bound="PlansSinglePatchRequestDataAttributes") + + +@_attrs_define +class PlansSinglePatchRequestDataAttributes: + """ + Attributes: + allowed_types (Union[Unset, List[str]]): + calculation_type (Union[Unset, PlansSinglePatchRequestDataAttributesCalculationType]): Example: timeBased. + capacity (Union[Unset, float]): + color (Union[Unset, str]): Example: Color. + default_estimate (Union[Unset, float]): + description (Union[Unset, PlansSinglePatchRequestDataAttributesDescription]): + due_date (Union[Unset, datetime.date]): Example: 1970-01-01. + estimation_field (Union[Unset, str]): Example: Estimation Field. + finished_on (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + home_page_content (Union[Unset, PlansSinglePatchRequestDataAttributesHomePageContent]): + is_template (Union[Unset, bool]): + name (Union[Unset, str]): Example: Name. + previous_time_spent (Union[Unset, str]): Example: 5 1/2d. + prioritization_field (Union[Unset, str]): Example: Prioritization Field. + sort_order (Union[Unset, int]): + start_date (Union[Unset, datetime.date]): Example: 1970-01-01. + started_on (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + status (Union[Unset, str]): + use_report_from_template (Union[Unset, bool]): + """ + + allowed_types: Union[Unset, List[str]] = UNSET + calculation_type: Union[ + Unset, PlansSinglePatchRequestDataAttributesCalculationType + ] = UNSET + capacity: Union[Unset, float] = UNSET + color: Union[Unset, str] = UNSET + default_estimate: Union[Unset, float] = UNSET + description: Union[ + Unset, "PlansSinglePatchRequestDataAttributesDescription" + ] = UNSET + due_date: Union[Unset, datetime.date] = UNSET + estimation_field: Union[Unset, str] = UNSET + finished_on: Union[Unset, datetime.datetime] = UNSET + home_page_content: Union[ + Unset, "PlansSinglePatchRequestDataAttributesHomePageContent" + ] = UNSET + is_template: Union[Unset, bool] = UNSET + name: Union[Unset, str] = UNSET + previous_time_spent: Union[Unset, str] = UNSET + prioritization_field: Union[Unset, str] = UNSET + sort_order: Union[Unset, int] = UNSET + start_date: Union[Unset, datetime.date] = UNSET + started_on: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, str] = UNSET + use_report_from_template: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + allowed_types: Union[Unset, List[str]] = UNSET + if not isinstance(self.allowed_types, Unset): + allowed_types = self.allowed_types + + calculation_type: Union[Unset, str] = UNSET + if not isinstance(self.calculation_type, Unset): + calculation_type = self.calculation_type.value + + capacity = self.capacity + + color = self.color + + default_estimate = self.default_estimate + + description: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.description, Unset): + description = self.description.to_dict() + + due_date: Union[Unset, str] = UNSET + if not isinstance(self.due_date, Unset): + due_date = self.due_date.isoformat() + + estimation_field = self.estimation_field + + finished_on: Union[Unset, str] = UNSET + if not isinstance(self.finished_on, Unset): + finished_on = self.finished_on.isoformat() + + home_page_content: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.home_page_content, Unset): + home_page_content = self.home_page_content.to_dict() + + is_template = self.is_template + + name = self.name + + previous_time_spent = self.previous_time_spent + + prioritization_field = self.prioritization_field + + sort_order = self.sort_order + + start_date: Union[Unset, str] = UNSET + if not isinstance(self.start_date, Unset): + start_date = self.start_date.isoformat() + + started_on: Union[Unset, str] = UNSET + if not isinstance(self.started_on, Unset): + started_on = self.started_on.isoformat() + + status = self.status + + use_report_from_template = self.use_report_from_template + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if allowed_types is not UNSET: + field_dict["allowedTypes"] = allowed_types + if calculation_type is not UNSET: + field_dict["calculationType"] = calculation_type + if capacity is not UNSET: + field_dict["capacity"] = capacity + if color is not UNSET: + field_dict["color"] = color + if default_estimate is not UNSET: + field_dict["defaultEstimate"] = default_estimate + if description is not UNSET: + field_dict["description"] = description + if due_date is not UNSET: + field_dict["dueDate"] = due_date + if estimation_field is not UNSET: + field_dict["estimationField"] = estimation_field + if finished_on is not UNSET: + field_dict["finishedOn"] = finished_on + if home_page_content is not UNSET: + field_dict["homePageContent"] = home_page_content + if is_template is not UNSET: + field_dict["isTemplate"] = is_template + if name is not UNSET: + field_dict["name"] = name + if previous_time_spent is not UNSET: + field_dict["previousTimeSpent"] = previous_time_spent + if prioritization_field is not UNSET: + field_dict["prioritizationField"] = prioritization_field + if sort_order is not UNSET: + field_dict["sortOrder"] = sort_order + if start_date is not UNSET: + field_dict["startDate"] = start_date + if started_on is not UNSET: + field_dict["startedOn"] = started_on + if status is not UNSET: + field_dict["status"] = status + if use_report_from_template is not UNSET: + field_dict["useReportFromTemplate"] = use_report_from_template + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_patch_request_data_attributes_description import ( + PlansSinglePatchRequestDataAttributesDescription, + ) + from ..models.plans_single_patch_request_data_attributes_home_page_content import ( + PlansSinglePatchRequestDataAttributesHomePageContent, + ) + + d = src_dict.copy() + allowed_types = cast(List[str], d.pop("allowedTypes", UNSET)) + + _calculation_type = d.pop("calculationType", UNSET) + calculation_type: Union[ + Unset, PlansSinglePatchRequestDataAttributesCalculationType + ] + if isinstance(_calculation_type, Unset): + calculation_type = UNSET + else: + calculation_type = ( + PlansSinglePatchRequestDataAttributesCalculationType( + _calculation_type + ) + ) + + capacity = d.pop("capacity", UNSET) + + color = d.pop("color", UNSET) + + default_estimate = d.pop("defaultEstimate", UNSET) + + _description = d.pop("description", UNSET) + description: Union[ + Unset, PlansSinglePatchRequestDataAttributesDescription + ] + if isinstance(_description, Unset): + description = UNSET + else: + description = ( + PlansSinglePatchRequestDataAttributesDescription.from_dict( + _description + ) + ) + + _due_date = d.pop("dueDate", UNSET) + due_date: Union[Unset, datetime.date] + if isinstance(_due_date, Unset): + due_date = UNSET + else: + due_date = isoparse(_due_date).date() + + estimation_field = d.pop("estimationField", UNSET) + + _finished_on = d.pop("finishedOn", UNSET) + finished_on: Union[Unset, datetime.datetime] + if isinstance(_finished_on, Unset): + finished_on = UNSET + else: + finished_on = isoparse(_finished_on) + + _home_page_content = d.pop("homePageContent", UNSET) + home_page_content: Union[ + Unset, PlansSinglePatchRequestDataAttributesHomePageContent + ] + if isinstance(_home_page_content, Unset): + home_page_content = UNSET + else: + home_page_content = ( + PlansSinglePatchRequestDataAttributesHomePageContent.from_dict( + _home_page_content + ) + ) + + is_template = d.pop("isTemplate", UNSET) + + name = d.pop("name", UNSET) + + previous_time_spent = d.pop("previousTimeSpent", UNSET) + + prioritization_field = d.pop("prioritizationField", UNSET) + + sort_order = d.pop("sortOrder", UNSET) + + _start_date = d.pop("startDate", UNSET) + start_date: Union[Unset, datetime.date] + if isinstance(_start_date, Unset): + start_date = UNSET + else: + start_date = isoparse(_start_date).date() + + _started_on = d.pop("startedOn", UNSET) + started_on: Union[Unset, datetime.datetime] + if isinstance(_started_on, Unset): + started_on = UNSET + else: + started_on = isoparse(_started_on) + + status = d.pop("status", UNSET) + + use_report_from_template = d.pop("useReportFromTemplate", UNSET) + + plans_single_patch_request_data_attributes_obj = cls( + allowed_types=allowed_types, + calculation_type=calculation_type, + capacity=capacity, + color=color, + default_estimate=default_estimate, + description=description, + due_date=due_date, + estimation_field=estimation_field, + finished_on=finished_on, + home_page_content=home_page_content, + is_template=is_template, + name=name, + previous_time_spent=previous_time_spent, + prioritization_field=prioritization_field, + sort_order=sort_order, + start_date=start_date, + started_on=started_on, + status=status, + use_report_from_template=use_report_from_template, + ) + + plans_single_patch_request_data_attributes_obj.additional_properties = ( + d + ) + return plans_single_patch_request_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_calculation_type.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_calculation_type.py new file mode 100644 index 00000000..ad04d427 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_calculation_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansSinglePatchRequestDataAttributesCalculationType(str, Enum): + CUSTOMFIELDBASED = "customFieldBased" + TIMEBASED = "timeBased" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_description.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_description.py new file mode 100644 index 00000000..135ef857 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_description.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_single_patch_request_data_attributes_description_type import ( + PlansSinglePatchRequestDataAttributesDescriptionType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansSinglePatchRequestDataAttributesDescription") + + +@_attrs_define +class PlansSinglePatchRequestDataAttributesDescription: + """ + Attributes: + type (Union[Unset, PlansSinglePatchRequestDataAttributesDescriptionType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, PlansSinglePatchRequestDataAttributesDescriptionType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansSinglePatchRequestDataAttributesDescriptionType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansSinglePatchRequestDataAttributesDescriptionType(_type) + + value = d.pop("value", UNSET) + + plans_single_patch_request_data_attributes_description_obj = cls( + type=type, + value=value, + ) + + plans_single_patch_request_data_attributes_description_obj.additional_properties = ( + d + ) + return plans_single_patch_request_data_attributes_description_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_description_type.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_description_type.py new file mode 100644 index 00000000..df34ecbb --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_description_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansSinglePatchRequestDataAttributesDescriptionType(str, Enum): + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_home_page_content.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_home_page_content.py new file mode 100644 index 00000000..1373bd93 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_home_page_content.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_single_patch_request_data_attributes_home_page_content_type import ( + PlansSinglePatchRequestDataAttributesHomePageContentType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansSinglePatchRequestDataAttributesHomePageContent") + + +@_attrs_define +class PlansSinglePatchRequestDataAttributesHomePageContent: + """ + Attributes: + type (Union[Unset, PlansSinglePatchRequestDataAttributesHomePageContentType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, PlansSinglePatchRequestDataAttributesHomePageContentType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansSinglePatchRequestDataAttributesHomePageContentType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansSinglePatchRequestDataAttributesHomePageContentType( + _type + ) + + value = d.pop("value", UNSET) + + plans_single_patch_request_data_attributes_home_page_content_obj = cls( + type=type, + value=value, + ) + + plans_single_patch_request_data_attributes_home_page_content_obj.additional_properties = ( + d + ) + return plans_single_patch_request_data_attributes_home_page_content_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_home_page_content_type.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_home_page_content_type.py new file mode 100644 index 00000000..69d81f08 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_attributes_home_page_content_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansSinglePatchRequestDataAttributesHomePageContentType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships.py new file mode 100644 index 00000000..10fed900 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships.py @@ -0,0 +1,146 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_patch_request_data_relationships_parent import ( + PlansSinglePatchRequestDataRelationshipsParent, + ) + from ..models.plans_single_patch_request_data_relationships_project_span import ( + PlansSinglePatchRequestDataRelationshipsProjectSpan, + ) + from ..models.plans_single_patch_request_data_relationships_work_items import ( + PlansSinglePatchRequestDataRelationshipsWorkItems, + ) + + +T = TypeVar("T", bound="PlansSinglePatchRequestDataRelationships") + + +@_attrs_define +class PlansSinglePatchRequestDataRelationships: + """ + Attributes: + parent (Union[Unset, PlansSinglePatchRequestDataRelationshipsParent]): + project_span (Union[Unset, PlansSinglePatchRequestDataRelationshipsProjectSpan]): + work_items (Union[Unset, PlansSinglePatchRequestDataRelationshipsWorkItems]): + """ + + parent: Union[ + Unset, "PlansSinglePatchRequestDataRelationshipsParent" + ] = UNSET + project_span: Union[ + Unset, "PlansSinglePatchRequestDataRelationshipsProjectSpan" + ] = UNSET + work_items: Union[ + Unset, "PlansSinglePatchRequestDataRelationshipsWorkItems" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + parent: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.parent, Unset): + parent = self.parent.to_dict() + + project_span: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project_span, Unset): + project_span = self.project_span.to_dict() + + work_items: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.work_items, Unset): + work_items = self.work_items.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if parent is not UNSET: + field_dict["parent"] = parent + if project_span is not UNSET: + field_dict["projectSpan"] = project_span + if work_items is not UNSET: + field_dict["workItems"] = work_items + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_patch_request_data_relationships_parent import ( + PlansSinglePatchRequestDataRelationshipsParent, + ) + from ..models.plans_single_patch_request_data_relationships_project_span import ( + PlansSinglePatchRequestDataRelationshipsProjectSpan, + ) + from ..models.plans_single_patch_request_data_relationships_work_items import ( + PlansSinglePatchRequestDataRelationshipsWorkItems, + ) + + d = src_dict.copy() + _parent = d.pop("parent", UNSET) + parent: Union[Unset, PlansSinglePatchRequestDataRelationshipsParent] + if isinstance(_parent, Unset): + parent = UNSET + else: + parent = PlansSinglePatchRequestDataRelationshipsParent.from_dict( + _parent + ) + + _project_span = d.pop("projectSpan", UNSET) + project_span: Union[ + Unset, PlansSinglePatchRequestDataRelationshipsProjectSpan + ] + if isinstance(_project_span, Unset): + project_span = UNSET + else: + project_span = ( + PlansSinglePatchRequestDataRelationshipsProjectSpan.from_dict( + _project_span + ) + ) + + _work_items = d.pop("workItems", UNSET) + work_items: Union[ + Unset, PlansSinglePatchRequestDataRelationshipsWorkItems + ] + if isinstance(_work_items, Unset): + work_items = UNSET + else: + work_items = ( + PlansSinglePatchRequestDataRelationshipsWorkItems.from_dict( + _work_items + ) + ) + + plans_single_patch_request_data_relationships_obj = cls( + parent=parent, + project_span=project_span, + work_items=work_items, + ) + + plans_single_patch_request_data_relationships_obj.additional_properties = ( + d + ) + return plans_single_patch_request_data_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_parent.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_parent.py new file mode 100644 index 00000000..b9d4a49b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_parent.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_patch_request_data_relationships_parent_data import ( + PlansSinglePatchRequestDataRelationshipsParentData, + ) + + +T = TypeVar("T", bound="PlansSinglePatchRequestDataRelationshipsParent") + + +@_attrs_define +class PlansSinglePatchRequestDataRelationshipsParent: + """ + Attributes: + data (Union[Unset, PlansSinglePatchRequestDataRelationshipsParentData]): + """ + + data: Union[ + Unset, "PlansSinglePatchRequestDataRelationshipsParentData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_patch_request_data_relationships_parent_data import ( + PlansSinglePatchRequestDataRelationshipsParentData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PlansSinglePatchRequestDataRelationshipsParentData] + if isinstance(_data, Unset): + data = UNSET + else: + data = ( + PlansSinglePatchRequestDataRelationshipsParentData.from_dict( + _data + ) + ) + + plans_single_patch_request_data_relationships_parent_obj = cls( + data=data, + ) + + plans_single_patch_request_data_relationships_parent_obj.additional_properties = ( + d + ) + return plans_single_patch_request_data_relationships_parent_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_parent_data.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_parent_data.py new file mode 100644 index 00000000..d87e824c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_parent_data.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_single_patch_request_data_relationships_parent_data_type import ( + PlansSinglePatchRequestDataRelationshipsParentDataType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlansSinglePatchRequestDataRelationshipsParentData") + + +@_attrs_define +class PlansSinglePatchRequestDataRelationshipsParentData: + """ + Attributes: + type (Union[Unset, PlansSinglePatchRequestDataRelationshipsParentDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyPlanId. + """ + + type: Union[ + Unset, PlansSinglePatchRequestDataRelationshipsParentDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, PlansSinglePatchRequestDataRelationshipsParentDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansSinglePatchRequestDataRelationshipsParentDataType( + _type + ) + + id = d.pop("id", UNSET) + + plans_single_patch_request_data_relationships_parent_data_obj = cls( + type=type, + id=id, + ) + + plans_single_patch_request_data_relationships_parent_data_obj.additional_properties = ( + d + ) + return plans_single_patch_request_data_relationships_parent_data_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_parent_data_type.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_parent_data_type.py new file mode 100644 index 00000000..3172c9ef --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_parent_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansSinglePatchRequestDataRelationshipsParentDataType(str, Enum): + PLANS = "plans" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_project_span.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_project_span.py new file mode 100644 index 00000000..56f4e714 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_project_span.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_patch_request_data_relationships_project_span_data_item import ( + PlansSinglePatchRequestDataRelationshipsProjectSpanDataItem, + ) + + +T = TypeVar("T", bound="PlansSinglePatchRequestDataRelationshipsProjectSpan") + + +@_attrs_define +class PlansSinglePatchRequestDataRelationshipsProjectSpan: + """ + Attributes: + data (Union[Unset, List['PlansSinglePatchRequestDataRelationshipsProjectSpanDataItem']]): + """ + + data: Union[ + Unset, + List["PlansSinglePatchRequestDataRelationshipsProjectSpanDataItem"], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_patch_request_data_relationships_project_span_data_item import ( + PlansSinglePatchRequestDataRelationshipsProjectSpanDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = PlansSinglePatchRequestDataRelationshipsProjectSpanDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + plans_single_patch_request_data_relationships_project_span_obj = cls( + data=data, + ) + + plans_single_patch_request_data_relationships_project_span_obj.additional_properties = ( + d + ) + return plans_single_patch_request_data_relationships_project_span_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_project_span_data_item.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_project_span_data_item.py new file mode 100644 index 00000000..97ef720d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_project_span_data_item.py @@ -0,0 +1,93 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_single_patch_request_data_relationships_project_span_data_item_type import ( + PlansSinglePatchRequestDataRelationshipsProjectSpanDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="PlansSinglePatchRequestDataRelationshipsProjectSpanDataItem" +) + + +@_attrs_define +class PlansSinglePatchRequestDataRelationshipsProjectSpanDataItem: + """ + Attributes: + type (Union[Unset, PlansSinglePatchRequestDataRelationshipsProjectSpanDataItemType]): + id (Union[Unset, str]): Example: MyProjectId. + """ + + type: Union[ + Unset, PlansSinglePatchRequestDataRelationshipsProjectSpanDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + PlansSinglePatchRequestDataRelationshipsProjectSpanDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = PlansSinglePatchRequestDataRelationshipsProjectSpanDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + plans_single_patch_request_data_relationships_project_span_data_item_obj = cls( + type=type, + id=id, + ) + + plans_single_patch_request_data_relationships_project_span_data_item_obj.additional_properties = ( + d + ) + return plans_single_patch_request_data_relationships_project_span_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_project_span_data_item_type.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_project_span_data_item_type.py new file mode 100644 index 00000000..309e1ca2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_project_span_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansSinglePatchRequestDataRelationshipsProjectSpanDataItemType( + str, Enum +): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_work_items.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_work_items.py new file mode 100644 index 00000000..8d6052de --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_work_items.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plans_single_patch_request_data_relationships_work_items_data_item import ( + PlansSinglePatchRequestDataRelationshipsWorkItemsDataItem, + ) + + +T = TypeVar("T", bound="PlansSinglePatchRequestDataRelationshipsWorkItems") + + +@_attrs_define +class PlansSinglePatchRequestDataRelationshipsWorkItems: + """ + Attributes: + data (Union[Unset, List['PlansSinglePatchRequestDataRelationshipsWorkItemsDataItem']]): + """ + + data: Union[ + Unset, + List["PlansSinglePatchRequestDataRelationshipsWorkItemsDataItem"], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.plans_single_patch_request_data_relationships_work_items_data_item import ( + PlansSinglePatchRequestDataRelationshipsWorkItemsDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = PlansSinglePatchRequestDataRelationshipsWorkItemsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + plans_single_patch_request_data_relationships_work_items_obj = cls( + data=data, + ) + + plans_single_patch_request_data_relationships_work_items_obj.additional_properties = ( + d + ) + return plans_single_patch_request_data_relationships_work_items_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_work_items_data_item.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_work_items_data_item.py new file mode 100644 index 00000000..f3cdcfae --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_work_items_data_item.py @@ -0,0 +1,95 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.plans_single_patch_request_data_relationships_work_items_data_item_type import ( + PlansSinglePatchRequestDataRelationshipsWorkItemsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="PlansSinglePatchRequestDataRelationshipsWorkItemsDataItem" +) + + +@_attrs_define +class PlansSinglePatchRequestDataRelationshipsWorkItemsDataItem: + """ + Attributes: + type (Union[Unset, PlansSinglePatchRequestDataRelationshipsWorkItemsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + """ + + type: Union[ + Unset, PlansSinglePatchRequestDataRelationshipsWorkItemsDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + PlansSinglePatchRequestDataRelationshipsWorkItemsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + PlansSinglePatchRequestDataRelationshipsWorkItemsDataItemType( + _type + ) + ) + + id = d.pop("id", UNSET) + + plans_single_patch_request_data_relationships_work_items_data_item_obj = cls( + type=type, + id=id, + ) + + plans_single_patch_request_data_relationships_work_items_data_item_obj.additional_properties = ( + d + ) + return plans_single_patch_request_data_relationships_work_items_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_work_items_data_item_type.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_work_items_data_item_type.py new file mode 100644 index 00000000..c859c138 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_relationships_work_items_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansSinglePatchRequestDataRelationshipsWorkItemsDataItemType(str, Enum): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_type.py b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_type.py new file mode 100644 index 00000000..2d9008fb --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/plans_single_patch_request_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class PlansSinglePatchRequestDataType(str, Enum): + PLANS = "plans" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/post_document_attachments_request_body.py b/polarion_rest_api_client/open_api_client/models/post_document_attachments_request_body.py index b7e95add..c2ca5694 100644 --- a/polarion_rest_api_client/open_api_client/models/post_document_attachments_request_body.py +++ b/polarion_rest_api_client/open_api_client/models/post_document_attachments_request_body.py @@ -22,10 +22,9 @@ @_attrs_define class PostDocumentAttachmentsRequestBody: """ - Attributes - ---------- - resource : Union[Unset, DocumentAttachmentsListPostRequest] - files : Union[Unset, List[File]] + Attributes: + resource (Union[Unset, DocumentAttachmentsListPostRequest]): + files (Union[Unset, List[File]]): """ resource: Union[Unset, "DocumentAttachmentsListPostRequest"] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/post_icons_request_body.py b/polarion_rest_api_client/open_api_client/models/post_icons_request_body.py new file mode 100644 index 00000000..430c53c5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/post_icons_request_body.py @@ -0,0 +1,127 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import json +from io import BytesIO +from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, File, FileJsonType, Unset + +if TYPE_CHECKING: + from ..models.icons_list_post_request import IconsListPostRequest + + +T = TypeVar("T", bound="PostIconsRequestBody") + + +@_attrs_define +class PostIconsRequestBody: + """ + Attributes: + resource (Union[Unset, IconsListPostRequest]): + files (Union[Unset, List[File]]): + """ + + resource: Union[Unset, "IconsListPostRequest"] = UNSET + files: Union[Unset, List[File]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + files: Union[Unset, List[FileJsonType]] = UNSET + if not isinstance(self.files, Unset): + files = [] + for files_item_data in self.files: + files_item = files_item_data.to_tuple() + + files.append(files_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if resource is not UNSET: + field_dict["resource"] = resource + if files is not UNSET: + field_dict["files"] = files + + return field_dict + + def to_multipart(self) -> List[Tuple[str, Any]]: + field_list: List[Tuple[str, Any]] = [] + resource: Union[Unset, Tuple[None, bytes, str]] = UNSET + if not isinstance(self.resource, Unset): + resource = ( + None, + json.dumps(self.resource.to_dict()).encode(), + "text/plain", + ) + + if resource is not UNSET: + field_list.append(("resource", resource)) + for cont in self.files or []: + files_item = cont.to_tuple() + + field_list.append(("files", files_item)) + + field_dict: Dict[str, Any] = {} + field_dict.update( + { + key: (None, str(value).encode(), "text/plain") + for key, value in self.additional_properties.items() + } + ) + + field_list += list(field_dict.items()) + + return field_list + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.icons_list_post_request import IconsListPostRequest + + d = src_dict.copy() + _resource = d.pop("resource", UNSET) + resource: Union[Unset, IconsListPostRequest] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = IconsListPostRequest.from_dict(_resource) + + files = [] + _files = d.pop("files", UNSET) + for files_item_data in _files or []: + files_item = File(payload=BytesIO(files_item_data)) + + files.append(files_item) + + post_icons_request_body_obj = cls( + resource=resource, + files=files, + ) + + post_icons_request_body_obj.additional_properties = d + return post_icons_request_body_obj + + @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/polarion_rest_api_client/open_api_client/models/post_import_action_request_body.py b/polarion_rest_api_client/open_api_client/models/post_import_action_request_body.py new file mode 100644 index 00000000..7784c3cd --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/post_import_action_request_body.py @@ -0,0 +1,121 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import json +from io import BytesIO +from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, File, Unset + +if TYPE_CHECKING: + from ..models.import_test_results_request_body import ( + ImportTestResultsRequestBody, + ) + + +T = TypeVar("T", bound="PostImportActionRequestBody") + + +@_attrs_define +class PostImportActionRequestBody: + """ + Attributes: + file (File): excel file content + resource (Union[Unset, ImportTestResultsRequestBody]): + """ + + file: File + resource: Union[Unset, "ImportTestResultsRequestBody"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + file = self.file.to_tuple() + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "file": file, + } + ) + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + def to_multipart(self) -> List[Tuple[str, Any]]: + field_list: List[Tuple[str, Any]] = [] + file = self.file.to_tuple() + + field_list.append(("file", file)) + resource: Union[Unset, Tuple[None, bytes, str]] = UNSET + if not isinstance(self.resource, Unset): + resource = ( + None, + json.dumps(self.resource.to_dict()).encode(), + "text/plain", + ) + + if resource is not UNSET: + field_list.append(("resource", resource)) + + field_dict: Dict[str, Any] = {} + field_dict.update( + { + key: (None, str(value).encode(), "text/plain") + for key, value in self.additional_properties.items() + } + ) + + field_list += list(field_dict.items()) + + return field_list + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.import_test_results_request_body import ( + ImportTestResultsRequestBody, + ) + + d = src_dict.copy() + file = File(payload=BytesIO(d.pop("file"))) + + _resource = d.pop("resource", UNSET) + resource: Union[Unset, ImportTestResultsRequestBody] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = ImportTestResultsRequestBody.from_dict(_resource) + + post_import_action_request_body_obj = cls( + file=file, + resource=resource, + ) + + post_import_action_request_body_obj.additional_properties = d + return post_import_action_request_body_obj + + @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/polarion_rest_api_client/open_api_client/models/post_page_attachments_request_body.py b/polarion_rest_api_client/open_api_client/models/post_page_attachments_request_body.py index 445c42c4..515a3cee 100644 --- a/polarion_rest_api_client/open_api_client/models/post_page_attachments_request_body.py +++ b/polarion_rest_api_client/open_api_client/models/post_page_attachments_request_body.py @@ -22,10 +22,9 @@ @_attrs_define class PostPageAttachmentsRequestBody: """ - Attributes - ---------- - resource : Union[Unset, PageAttachmentsListPostRequest] - files : Union[Unset, List[File]] + Attributes: + resource (Union[Unset, PageAttachmentsListPostRequest]): + files (Union[Unset, List[File]]): """ resource: Union[Unset, "PageAttachmentsListPostRequest"] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/post_test_record_attachments_request_body.py b/polarion_rest_api_client/open_api_client/models/post_test_record_attachments_request_body.py new file mode 100644 index 00000000..5db8cebc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/post_test_record_attachments_request_body.py @@ -0,0 +1,133 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import json +from io import BytesIO +from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, File, FileJsonType, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_list_post_request import ( + TestrecordAttachmentsListPostRequest, + ) + + +T = TypeVar("T", bound="PostTestRecordAttachmentsRequestBody") + + +@_attrs_define +class PostTestRecordAttachmentsRequestBody: + """ + Attributes: + resource (Union[Unset, TestrecordAttachmentsListPostRequest]): + files (Union[Unset, List[File]]): + """ + + resource: Union[Unset, "TestrecordAttachmentsListPostRequest"] = UNSET + files: Union[Unset, List[File]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + files: Union[Unset, List[FileJsonType]] = UNSET + if not isinstance(self.files, Unset): + files = [] + for files_item_data in self.files: + files_item = files_item_data.to_tuple() + + files.append(files_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if resource is not UNSET: + field_dict["resource"] = resource + if files is not UNSET: + field_dict["files"] = files + + return field_dict + + def to_multipart(self) -> List[Tuple[str, Any]]: + field_list: List[Tuple[str, Any]] = [] + resource: Union[Unset, Tuple[None, bytes, str]] = UNSET + if not isinstance(self.resource, Unset): + resource = ( + None, + json.dumps(self.resource.to_dict()).encode(), + "text/plain", + ) + + if resource is not UNSET: + field_list.append(("resource", resource)) + for cont in self.files or []: + files_item = cont.to_tuple() + + field_list.append(("files", files_item)) + + field_dict: Dict[str, Any] = {} + field_dict.update( + { + key: (None, str(value).encode(), "text/plain") + for key, value in self.additional_properties.items() + } + ) + + field_list += list(field_dict.items()) + + return field_list + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_list_post_request import ( + TestrecordAttachmentsListPostRequest, + ) + + d = src_dict.copy() + _resource = d.pop("resource", UNSET) + resource: Union[Unset, TestrecordAttachmentsListPostRequest] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TestrecordAttachmentsListPostRequest.from_dict( + _resource + ) + + files = [] + _files = d.pop("files", UNSET) + for files_item_data in _files or []: + files_item = File(payload=BytesIO(files_item_data)) + + files.append(files_item) + + post_test_record_attachments_request_body_obj = cls( + resource=resource, + files=files, + ) + + post_test_record_attachments_request_body_obj.additional_properties = d + return post_test_record_attachments_request_body_obj + + @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/polarion_rest_api_client/open_api_client/models/post_test_run_attachments_request_body.py b/polarion_rest_api_client/open_api_client/models/post_test_run_attachments_request_body.py new file mode 100644 index 00000000..d0e0ab46 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/post_test_run_attachments_request_body.py @@ -0,0 +1,131 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import json +from io import BytesIO +from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, File, FileJsonType, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_list_post_request import ( + TestrunAttachmentsListPostRequest, + ) + + +T = TypeVar("T", bound="PostTestRunAttachmentsRequestBody") + + +@_attrs_define +class PostTestRunAttachmentsRequestBody: + """ + Attributes: + resource (Union[Unset, TestrunAttachmentsListPostRequest]): + files (Union[Unset, List[File]]): + """ + + resource: Union[Unset, "TestrunAttachmentsListPostRequest"] = UNSET + files: Union[Unset, List[File]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + files: Union[Unset, List[FileJsonType]] = UNSET + if not isinstance(self.files, Unset): + files = [] + for files_item_data in self.files: + files_item = files_item_data.to_tuple() + + files.append(files_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if resource is not UNSET: + field_dict["resource"] = resource + if files is not UNSET: + field_dict["files"] = files + + return field_dict + + def to_multipart(self) -> List[Tuple[str, Any]]: + field_list: List[Tuple[str, Any]] = [] + resource: Union[Unset, Tuple[None, bytes, str]] = UNSET + if not isinstance(self.resource, Unset): + resource = ( + None, + json.dumps(self.resource.to_dict()).encode(), + "text/plain", + ) + + if resource is not UNSET: + field_list.append(("resource", resource)) + for cont in self.files or []: + files_item = cont.to_tuple() + + field_list.append(("files", files_item)) + + field_dict: Dict[str, Any] = {} + field_dict.update( + { + key: (None, str(value).encode(), "text/plain") + for key, value in self.additional_properties.items() + } + ) + + field_list += list(field_dict.items()) + + return field_list + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_list_post_request import ( + TestrunAttachmentsListPostRequest, + ) + + d = src_dict.copy() + _resource = d.pop("resource", UNSET) + resource: Union[Unset, TestrunAttachmentsListPostRequest] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TestrunAttachmentsListPostRequest.from_dict(_resource) + + files = [] + _files = d.pop("files", UNSET) + for files_item_data in _files or []: + files_item = File(payload=BytesIO(files_item_data)) + + files.append(files_item) + + post_test_run_attachments_request_body_obj = cls( + resource=resource, + files=files, + ) + + post_test_run_attachments_request_body_obj.additional_properties = d + return post_test_run_attachments_request_body_obj + + @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/polarion_rest_api_client/open_api_client/models/post_test_step_result_attachments_request_body.py b/polarion_rest_api_client/open_api_client/models/post_test_step_result_attachments_request_body.py new file mode 100644 index 00000000..3a3fa166 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/post_test_step_result_attachments_request_body.py @@ -0,0 +1,135 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import json +from io import BytesIO +from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, File, FileJsonType, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_list_post_request import ( + TeststepresultAttachmentsListPostRequest, + ) + + +T = TypeVar("T", bound="PostTestStepResultAttachmentsRequestBody") + + +@_attrs_define +class PostTestStepResultAttachmentsRequestBody: + """ + Attributes: + resource (Union[Unset, TeststepresultAttachmentsListPostRequest]): + files (Union[Unset, List[File]]): + """ + + resource: Union[Unset, "TeststepresultAttachmentsListPostRequest"] = UNSET + files: Union[Unset, List[File]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + files: Union[Unset, List[FileJsonType]] = UNSET + if not isinstance(self.files, Unset): + files = [] + for files_item_data in self.files: + files_item = files_item_data.to_tuple() + + files.append(files_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if resource is not UNSET: + field_dict["resource"] = resource + if files is not UNSET: + field_dict["files"] = files + + return field_dict + + def to_multipart(self) -> List[Tuple[str, Any]]: + field_list: List[Tuple[str, Any]] = [] + resource: Union[Unset, Tuple[None, bytes, str]] = UNSET + if not isinstance(self.resource, Unset): + resource = ( + None, + json.dumps(self.resource.to_dict()).encode(), + "text/plain", + ) + + if resource is not UNSET: + field_list.append(("resource", resource)) + for cont in self.files or []: + files_item = cont.to_tuple() + + field_list.append(("files", files_item)) + + field_dict: Dict[str, Any] = {} + field_dict.update( + { + key: (None, str(value).encode(), "text/plain") + for key, value in self.additional_properties.items() + } + ) + + field_list += list(field_dict.items()) + + return field_list + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_list_post_request import ( + TeststepresultAttachmentsListPostRequest, + ) + + d = src_dict.copy() + _resource = d.pop("resource", UNSET) + resource: Union[Unset, TeststepresultAttachmentsListPostRequest] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TeststepresultAttachmentsListPostRequest.from_dict( + _resource + ) + + files = [] + _files = d.pop("files", UNSET) + for files_item_data in _files or []: + files_item = File(payload=BytesIO(files_item_data)) + + files.append(files_item) + + post_test_step_result_attachments_request_body_obj = cls( + resource=resource, + files=files, + ) + + post_test_step_result_attachments_request_body_obj.additional_properties = ( + d + ) + return post_test_step_result_attachments_request_body_obj + + @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/polarion_rest_api_client/open_api_client/models/post_work_item_attachments_request_body.py b/polarion_rest_api_client/open_api_client/models/post_work_item_attachments_request_body.py index df523605..ec53642a 100644 --- a/polarion_rest_api_client/open_api_client/models/post_work_item_attachments_request_body.py +++ b/polarion_rest_api_client/open_api_client/models/post_work_item_attachments_request_body.py @@ -22,10 +22,9 @@ @_attrs_define class PostWorkItemAttachmentsRequestBody: """ - Attributes - ---------- - resource : Union[Unset, WorkitemAttachmentsListPostRequest] - files : Union[Unset, List[File]] + Attributes: + resource (Union[Unset, WorkitemAttachmentsListPostRequest]): + files (Union[Unset, List[File]]): """ resource: Union[Unset, "WorkitemAttachmentsListPostRequest"] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/projects_list_get_response.py b/polarion_rest_api_client/open_api_client/models/projects_list_get_response.py index 847cc8fb..bd600bff 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_list_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/projects_list_get_response.py @@ -29,14 +29,13 @@ @_attrs_define class ProjectsListGetResponse: """ - Attributes - ---------- - meta : Union[Unset, ProjectsListGetResponseMeta] - data : Union[Unset, List['ProjectsListGetResponseDataItem']] - included : Union[Unset, List['ProjectsListGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, ProjectsListGetResponseLinks] + Attributes: + meta (Union[Unset, ProjectsListGetResponseMeta]): + data (Union[Unset, List['ProjectsListGetResponseDataItem']]): + included (Union[Unset, List['ProjectsListGetResponseIncludedItem']]): Related entities might be returned, see Rest API User + Guide. + links (Union[Unset, ProjectsListGetResponseLinks]): """ meta: Union[Unset, "ProjectsListGetResponseMeta"] = UNSET @@ -57,7 +56,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) included: Union[Unset, List[Dict[str, Any]]] = UNSET @@ -65,7 +63,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item.py index c120d562..fc209428 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item.py @@ -32,15 +32,14 @@ @_attrs_define class ProjectsListGetResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, ProjectsListGetResponseDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, ProjectsListGetResponseDataItemAttributes] - relationships : Union[Unset, ProjectsListGetResponseDataItemRelationships] - meta : Union[Unset, ProjectsListGetResponseDataItemMeta] - links : Union[Unset, ProjectsListGetResponseDataItemLinks] + Attributes: + type (Union[Unset, ProjectsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, ProjectsListGetResponseDataItemAttributes]): + relationships (Union[Unset, ProjectsListGetResponseDataItemRelationships]): + meta (Union[Unset, ProjectsListGetResponseDataItemMeta]): + links (Union[Unset, ProjectsListGetResponseDataItemLinks]): """ type: Union[Unset, ProjectsListGetResponseDataItemType] = UNSET @@ -64,7 +63,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_attributes.py index 5de0af75..157c975a 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_attributes.py @@ -22,18 +22,17 @@ @_attrs_define class ProjectsListGetResponseDataItemAttributes: """ - Attributes - ---------- - active : Union[Unset, bool] - color : Union[Unset, str] - description : Union[Unset, ProjectsListGetResponseDataItemAttributesDescription] - finish : Union[Unset, datetime.date] - icon : Union[Unset, str] - id : Union[Unset, str] - lock_work_records_date : Union[Unset, datetime.date] - name : Union[Unset, str] - start : Union[Unset, datetime.date] - tracker_prefix : Union[Unset, str] + Attributes: + active (Union[Unset, bool]): + color (Union[Unset, str]): Example: Color. + description (Union[Unset, ProjectsListGetResponseDataItemAttributesDescription]): + finish (Union[Unset, datetime.date]): Example: 1970-01-01. + icon (Union[Unset, str]): Example: Icon. + id (Union[Unset, str]): Example: MyProjectId. + lock_work_records_date (Union[Unset, datetime.date]): Example: 1970-01-01. + name (Union[Unset, str]): Example: Name. + start (Union[Unset, datetime.date]): Example: 1970-01-01. + tracker_prefix (Union[Unset, str]): Example: Tracker Prefix. """ active: Union[Unset, bool] = UNSET @@ -54,7 +53,9 @@ class ProjectsListGetResponseDataItemAttributes: def to_dict(self) -> Dict[str, Any]: active = self.active + color = self.color + description: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.description, Unset): description = self.description.to_dict() @@ -64,12 +65,15 @@ def to_dict(self) -> Dict[str, Any]: finish = self.finish.isoformat() icon = self.icon + id = self.id + lock_work_records_date: Union[Unset, str] = UNSET if not isinstance(self.lock_work_records_date, Unset): lock_work_records_date = self.lock_work_records_date.isoformat() name = self.name + start: Union[Unset, str] = UNSET if not isinstance(self.start, Unset): start = self.start.isoformat() diff --git a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_attributes_description.py b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_attributes_description.py index a2598278..cf83f9d5 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_attributes_description.py +++ b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_attributes_description.py @@ -17,10 +17,9 @@ @_attrs_define class ProjectsListGetResponseDataItemAttributesDescription: """ - Attributes - ---------- - type : Union[Unset, ProjectsListGetResponseDataItemAttributesDescriptionType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, ProjectsListGetResponseDataItemAttributesDescriptionType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_links.py index cfb95cca..da173704 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_links.py @@ -14,9 +14,8 @@ @_attrs_define class ProjectsListGetResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_meta.py index d0d98717..0df4f90c 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_meta.py +++ b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_meta.py @@ -20,9 +20,8 @@ @_attrs_define class ProjectsListGetResponseDataItemMeta: """ - Attributes - ---------- - errors : Union[Unset, List['ProjectsListGetResponseDataItemMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['ProjectsListGetResponseDataItemMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_meta_errors_item.py index 00fb578a..66dbf156 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class ProjectsListGetResponseDataItemMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, ProjectsListGetResponseDataItemMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, ProjectsListGetResponseDataItemMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class ProjectsListGetResponseDataItemMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_meta_errors_item_source.py index 883094fe..ef09ea30 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_meta_errors_item_source.py @@ -1,37 +1,50 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.projects_list_get_response_data_item_meta_errors_item_source_resource import ( + ProjectsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + T = TypeVar("T", bound="ProjectsListGetResponseDataItemMetaErrorsItemSource") @_attrs_define class ProjectsListGetResponseDataItemMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, ProjectsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing the + error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "ProjectsListGetResponseDataItemMetaErrorsItemSourceResource" + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -39,19 +52,37 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.projects_list_get_response_data_item_meta_errors_item_source_resource import ( + ProjectsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, ProjectsListGetResponseDataItemMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = ProjectsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + projects_list_get_response_data_item_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) projects_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..ac0d0b70 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="ProjectsListGetResponseDataItemMetaErrorsItemSourceResource" +) + + +@_attrs_define +class ProjectsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + projects_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + projects_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return projects_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_relationships.py index b90abf9a..1b11312e 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_relationships.py @@ -20,9 +20,8 @@ @_attrs_define class ProjectsListGetResponseDataItemRelationships: """ - Attributes - ---------- - lead : Union[Unset, ProjectsListGetResponseDataItemRelationshipsLead] + Attributes: + lead (Union[Unset, ProjectsListGetResponseDataItemRelationshipsLead]): """ lead: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_relationships_lead.py b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_relationships_lead.py index 2334a956..3d5bcaad 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_relationships_lead.py +++ b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_relationships_lead.py @@ -20,9 +20,8 @@ @_attrs_define class ProjectsListGetResponseDataItemRelationshipsLead: """ - Attributes - ---------- - data : Union[Unset, ProjectsListGetResponseDataItemRelationshipsLeadData] + Attributes: + data (Union[Unset, ProjectsListGetResponseDataItemRelationshipsLeadData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_relationships_lead_data.py b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_relationships_lead_data.py index 544dbd14..c76900cd 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_relationships_lead_data.py +++ b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_data_item_relationships_lead_data.py @@ -17,11 +17,10 @@ @_attrs_define class ProjectsListGetResponseDataItemRelationshipsLeadData: """ - Attributes - ---------- - type : Union[Unset, ProjectsListGetResponseDataItemRelationshipsLeadDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, ProjectsListGetResponseDataItemRelationshipsLeadDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -39,6 +38,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_links.py index 3deb7991..7d145b29 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_links.py @@ -14,13 +14,17 @@ @_attrs_define class ProjectsListGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - first : Union[Unset, str] - prev : Union[Unset, str] - next_ : Union[Unset, str] - last : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/projects?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/projects?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/projects?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/projects?page%5Bsize%5D=10&page%5Bnumber%5D=9. """ self_: Union[Unset, str] = UNSET @@ -34,9 +38,13 @@ class ProjectsListGetResponseLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + first = self.first + prev = self.prev + next_ = self.next_ + last = self.last field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_meta.py index bc13951c..b5ed203d 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_list_get_response_meta.py +++ b/polarion_rest_api_client/open_api_client/models/projects_list_get_response_meta.py @@ -14,9 +14,8 @@ @_attrs_define class ProjectsListGetResponseMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/projects_single_get_response.py b/polarion_rest_api_client/open_api_client/models/projects_single_get_response.py index 13ea267f..4bc5acae 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_single_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/projects_single_get_response.py @@ -26,13 +26,12 @@ @_attrs_define class ProjectsSingleGetResponse: """ - Attributes - ---------- - data : Union[Unset, ProjectsSingleGetResponseData] - included : Union[Unset, List['ProjectsSingleGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, ProjectsSingleGetResponseLinks] + Attributes: + data (Union[Unset, ProjectsSingleGetResponseData]): + included (Union[Unset, List['ProjectsSingleGetResponseIncludedItem']]): Related entities might be returned, see + Rest API + User Guide. + links (Union[Unset, ProjectsSingleGetResponseLinks]): """ data: Union[Unset, "ProjectsSingleGetResponseData"] = UNSET @@ -54,7 +53,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data.py index 2121f14c..6940f50e 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data.py +++ b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data.py @@ -32,15 +32,14 @@ @_attrs_define class ProjectsSingleGetResponseData: """ - Attributes - ---------- - type : Union[Unset, ProjectsSingleGetResponseDataType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, ProjectsSingleGetResponseDataAttributes] - relationships : Union[Unset, ProjectsSingleGetResponseDataRelationships] - meta : Union[Unset, ProjectsSingleGetResponseDataMeta] - links : Union[Unset, ProjectsSingleGetResponseDataLinks] + Attributes: + type (Union[Unset, ProjectsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, ProjectsSingleGetResponseDataAttributes]): + relationships (Union[Unset, ProjectsSingleGetResponseDataRelationships]): + meta (Union[Unset, ProjectsSingleGetResponseDataMeta]): + links (Union[Unset, ProjectsSingleGetResponseDataLinks]): """ type: Union[Unset, ProjectsSingleGetResponseDataType] = UNSET @@ -62,7 +61,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_attributes.py index 0af87922..7f44ba6f 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_attributes.py @@ -22,18 +22,17 @@ @_attrs_define class ProjectsSingleGetResponseDataAttributes: """ - Attributes - ---------- - active : Union[Unset, bool] - color : Union[Unset, str] - description : Union[Unset, ProjectsSingleGetResponseDataAttributesDescription] - finish : Union[Unset, datetime.date] - icon : Union[Unset, str] - id : Union[Unset, str] - lock_work_records_date : Union[Unset, datetime.date] - name : Union[Unset, str] - start : Union[Unset, datetime.date] - tracker_prefix : Union[Unset, str] + Attributes: + active (Union[Unset, bool]): + color (Union[Unset, str]): Example: Color. + description (Union[Unset, ProjectsSingleGetResponseDataAttributesDescription]): + finish (Union[Unset, datetime.date]): Example: 1970-01-01. + icon (Union[Unset, str]): Example: Icon. + id (Union[Unset, str]): Example: MyProjectId. + lock_work_records_date (Union[Unset, datetime.date]): Example: 1970-01-01. + name (Union[Unset, str]): Example: Name. + start (Union[Unset, datetime.date]): Example: 1970-01-01. + tracker_prefix (Union[Unset, str]): Example: Tracker Prefix. """ active: Union[Unset, bool] = UNSET @@ -54,7 +53,9 @@ class ProjectsSingleGetResponseDataAttributes: def to_dict(self) -> Dict[str, Any]: active = self.active + color = self.color + description: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.description, Unset): description = self.description.to_dict() @@ -64,12 +65,15 @@ def to_dict(self) -> Dict[str, Any]: finish = self.finish.isoformat() icon = self.icon + id = self.id + lock_work_records_date: Union[Unset, str] = UNSET if not isinstance(self.lock_work_records_date, Unset): lock_work_records_date = self.lock_work_records_date.isoformat() name = self.name + start: Union[Unset, str] = UNSET if not isinstance(self.start, Unset): start = self.start.isoformat() diff --git a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_attributes_description.py b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_attributes_description.py index b005b3b8..1ba08bda 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_attributes_description.py +++ b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_attributes_description.py @@ -17,10 +17,9 @@ @_attrs_define class ProjectsSingleGetResponseDataAttributesDescription: """ - Attributes - ---------- - type : Union[Unset, ProjectsSingleGetResponseDataAttributesDescriptionType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, ProjectsSingleGetResponseDataAttributesDescriptionType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_links.py index 74bfa731..2f32f1fa 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_links.py +++ b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_links.py @@ -14,9 +14,8 @@ @_attrs_define class ProjectsSingleGetResponseDataLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_meta.py index 79e79a64..85915f6a 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_meta.py +++ b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_meta.py @@ -20,9 +20,8 @@ @_attrs_define class ProjectsSingleGetResponseDataMeta: """ - Attributes - ---------- - errors : Union[Unset, List['ProjectsSingleGetResponseDataMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['ProjectsSingleGetResponseDataMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_meta_errors_item.py index 94c82c06..4202cbca 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class ProjectsSingleGetResponseDataMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, ProjectsSingleGetResponseDataMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, ProjectsSingleGetResponseDataMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class ProjectsSingleGetResponseDataMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_meta_errors_item_source.py index c72554b8..f0f19290 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_meta_errors_item_source.py @@ -1,37 +1,49 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.projects_single_get_response_data_meta_errors_item_source_resource import ( + ProjectsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + T = TypeVar("T", bound="ProjectsSingleGetResponseDataMetaErrorsItemSource") @_attrs_define class ProjectsSingleGetResponseDataMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, ProjectsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "ProjectsSingleGetResponseDataMetaErrorsItemSourceResource" + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -39,19 +51,37 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.projects_single_get_response_data_meta_errors_item_source_resource import ( + ProjectsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, ProjectsSingleGetResponseDataMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = ProjectsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + projects_single_get_response_data_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) projects_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..165ad70b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="ProjectsSingleGetResponseDataMetaErrorsItemSourceResource" +) + + +@_attrs_define +class ProjectsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + projects_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + projects_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return projects_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_relationships.py index 127e208b..30f490d0 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_relationships.py @@ -20,9 +20,8 @@ @_attrs_define class ProjectsSingleGetResponseDataRelationships: """ - Attributes - ---------- - lead : Union[Unset, ProjectsSingleGetResponseDataRelationshipsLead] + Attributes: + lead (Union[Unset, ProjectsSingleGetResponseDataRelationshipsLead]): """ lead: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_relationships_lead.py b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_relationships_lead.py index a6b8527d..7cccb22f 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_relationships_lead.py +++ b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_relationships_lead.py @@ -20,9 +20,8 @@ @_attrs_define class ProjectsSingleGetResponseDataRelationshipsLead: """ - Attributes - ---------- - data : Union[Unset, ProjectsSingleGetResponseDataRelationshipsLeadData] + Attributes: + data (Union[Unset, ProjectsSingleGetResponseDataRelationshipsLeadData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_relationships_lead_data.py b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_relationships_lead_data.py index 53a14b55..7bf941dd 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_relationships_lead_data.py +++ b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_data_relationships_lead_data.py @@ -17,11 +17,10 @@ @_attrs_define class ProjectsSingleGetResponseDataRelationshipsLeadData: """ - Attributes - ---------- - type : Union[Unset, ProjectsSingleGetResponseDataRelationshipsLeadDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, ProjectsSingleGetResponseDataRelationshipsLeadDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -39,6 +38,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_links.py index 12b0a328..61dd1689 100644 --- a/polarion_rest_api_client/open_api_client/models/projects_single_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/projects_single_get_response_links.py @@ -14,9 +14,8 @@ @_attrs_define class ProjectsSingleGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/projects_single_patch_request.py b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request.py new file mode 100644 index 00000000..645ee8e1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request.py @@ -0,0 +1,80 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.projects_single_patch_request_data import ( + ProjectsSinglePatchRequestData, + ) + + +T = TypeVar("T", bound="ProjectsSinglePatchRequest") + + +@_attrs_define +class ProjectsSinglePatchRequest: + """ + Attributes: + data (Union[Unset, ProjectsSinglePatchRequestData]): + """ + + data: Union[Unset, "ProjectsSinglePatchRequestData"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.projects_single_patch_request_data import ( + ProjectsSinglePatchRequestData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, ProjectsSinglePatchRequestData] + if isinstance(_data, Unset): + data = UNSET + else: + data = ProjectsSinglePatchRequestData.from_dict(_data) + + projects_single_patch_request_obj = cls( + data=data, + ) + + projects_single_patch_request_obj.additional_properties = d + return projects_single_patch_request_obj + + @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/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data.py b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data.py new file mode 100644 index 00000000..259b5f75 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data.py @@ -0,0 +1,142 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.projects_single_patch_request_data_type import ( + ProjectsSinglePatchRequestDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.projects_single_patch_request_data_attributes import ( + ProjectsSinglePatchRequestDataAttributes, + ) + from ..models.projects_single_patch_request_data_relationships import ( + ProjectsSinglePatchRequestDataRelationships, + ) + + +T = TypeVar("T", bound="ProjectsSinglePatchRequestData") + + +@_attrs_define +class ProjectsSinglePatchRequestData: + """ + Attributes: + type (Union[Unset, ProjectsSinglePatchRequestDataType]): + id (Union[Unset, str]): Example: MyProjectId. + attributes (Union[Unset, ProjectsSinglePatchRequestDataAttributes]): + relationships (Union[Unset, ProjectsSinglePatchRequestDataRelationships]): + """ + + type: Union[Unset, ProjectsSinglePatchRequestDataType] = UNSET + id: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "ProjectsSinglePatchRequestDataAttributes" + ] = UNSET + relationships: Union[ + Unset, "ProjectsSinglePatchRequestDataRelationships" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.projects_single_patch_request_data_attributes import ( + ProjectsSinglePatchRequestDataAttributes, + ) + from ..models.projects_single_patch_request_data_relationships import ( + ProjectsSinglePatchRequestDataRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, ProjectsSinglePatchRequestDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = ProjectsSinglePatchRequestDataType(_type) + + id = d.pop("id", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, ProjectsSinglePatchRequestDataAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ProjectsSinglePatchRequestDataAttributes.from_dict( + _attributes + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, ProjectsSinglePatchRequestDataRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + ProjectsSinglePatchRequestDataRelationships.from_dict( + _relationships + ) + ) + + projects_single_patch_request_data_obj = cls( + type=type, + id=id, + attributes=attributes, + relationships=relationships, + ) + + projects_single_patch_request_data_obj.additional_properties = d + return projects_single_patch_request_data_obj + + @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/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_attributes.py b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_attributes.py new file mode 100644 index 00000000..bb7c20ed --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_attributes.py @@ -0,0 +1,185 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.projects_single_patch_request_data_attributes_description import ( + ProjectsSinglePatchRequestDataAttributesDescription, + ) + + +T = TypeVar("T", bound="ProjectsSinglePatchRequestDataAttributes") + + +@_attrs_define +class ProjectsSinglePatchRequestDataAttributes: + """ + Attributes: + active (Union[Unset, bool]): + color (Union[Unset, str]): Example: Color. + description (Union[Unset, ProjectsSinglePatchRequestDataAttributesDescription]): + finish (Union[Unset, datetime.date]): Example: 1970-01-01. + icon (Union[Unset, str]): Example: Icon. + lock_work_records_date (Union[Unset, datetime.date]): Example: 1970-01-01. + name (Union[Unset, str]): Example: Name. + start (Union[Unset, datetime.date]): Example: 1970-01-01. + tracker_prefix (Union[Unset, str]): Example: Tracker Prefix. + """ + + active: Union[Unset, bool] = UNSET + color: Union[Unset, str] = UNSET + description: Union[ + Unset, "ProjectsSinglePatchRequestDataAttributesDescription" + ] = UNSET + finish: Union[Unset, datetime.date] = UNSET + icon: Union[Unset, str] = UNSET + lock_work_records_date: Union[Unset, datetime.date] = UNSET + name: Union[Unset, str] = UNSET + start: Union[Unset, datetime.date] = UNSET + tracker_prefix: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + active = self.active + + color = self.color + + description: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.description, Unset): + description = self.description.to_dict() + + finish: Union[Unset, str] = UNSET + if not isinstance(self.finish, Unset): + finish = self.finish.isoformat() + + icon = self.icon + + lock_work_records_date: Union[Unset, str] = UNSET + if not isinstance(self.lock_work_records_date, Unset): + lock_work_records_date = self.lock_work_records_date.isoformat() + + name = self.name + + start: Union[Unset, str] = UNSET + if not isinstance(self.start, Unset): + start = self.start.isoformat() + + tracker_prefix = self.tracker_prefix + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if active is not UNSET: + field_dict["active"] = active + if color is not UNSET: + field_dict["color"] = color + if description is not UNSET: + field_dict["description"] = description + if finish is not UNSET: + field_dict["finish"] = finish + if icon is not UNSET: + field_dict["icon"] = icon + if lock_work_records_date is not UNSET: + field_dict["lockWorkRecordsDate"] = lock_work_records_date + if name is not UNSET: + field_dict["name"] = name + if start is not UNSET: + field_dict["start"] = start + if tracker_prefix is not UNSET: + field_dict["trackerPrefix"] = tracker_prefix + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.projects_single_patch_request_data_attributes_description import ( + ProjectsSinglePatchRequestDataAttributesDescription, + ) + + d = src_dict.copy() + active = d.pop("active", UNSET) + + color = d.pop("color", UNSET) + + _description = d.pop("description", UNSET) + description: Union[ + Unset, ProjectsSinglePatchRequestDataAttributesDescription + ] + if isinstance(_description, Unset): + description = UNSET + else: + description = ( + ProjectsSinglePatchRequestDataAttributesDescription.from_dict( + _description + ) + ) + + _finish = d.pop("finish", UNSET) + finish: Union[Unset, datetime.date] + if isinstance(_finish, Unset): + finish = UNSET + else: + finish = isoparse(_finish).date() + + icon = d.pop("icon", UNSET) + + _lock_work_records_date = d.pop("lockWorkRecordsDate", UNSET) + lock_work_records_date: Union[Unset, datetime.date] + if isinstance(_lock_work_records_date, Unset): + lock_work_records_date = UNSET + else: + lock_work_records_date = isoparse(_lock_work_records_date).date() + + name = d.pop("name", UNSET) + + _start = d.pop("start", UNSET) + start: Union[Unset, datetime.date] + if isinstance(_start, Unset): + start = UNSET + else: + start = isoparse(_start).date() + + tracker_prefix = d.pop("trackerPrefix", UNSET) + + projects_single_patch_request_data_attributes_obj = cls( + active=active, + color=color, + description=description, + finish=finish, + icon=icon, + lock_work_records_date=lock_work_records_date, + name=name, + start=start, + tracker_prefix=tracker_prefix, + ) + + projects_single_patch_request_data_attributes_obj.additional_properties = ( + d + ) + return projects_single_patch_request_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_attributes_description.py b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_attributes_description.py new file mode 100644 index 00000000..017bab9b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_attributes_description.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.projects_single_patch_request_data_attributes_description_type import ( + ProjectsSinglePatchRequestDataAttributesDescriptionType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProjectsSinglePatchRequestDataAttributesDescription") + + +@_attrs_define +class ProjectsSinglePatchRequestDataAttributesDescription: + """ + Attributes: + type (Union[Unset, ProjectsSinglePatchRequestDataAttributesDescriptionType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, ProjectsSinglePatchRequestDataAttributesDescriptionType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, ProjectsSinglePatchRequestDataAttributesDescriptionType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ProjectsSinglePatchRequestDataAttributesDescriptionType( + _type + ) + + value = d.pop("value", UNSET) + + projects_single_patch_request_data_attributes_description_obj = cls( + type=type, + value=value, + ) + + projects_single_patch_request_data_attributes_description_obj.additional_properties = ( + d + ) + return projects_single_patch_request_data_attributes_description_obj + + @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/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_attributes_description_type.py b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_attributes_description_type.py new file mode 100644 index 00000000..e4b4b76c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_attributes_description_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class ProjectsSinglePatchRequestDataAttributesDescriptionType(str, Enum): + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_relationships.py b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_relationships.py new file mode 100644 index 00000000..07edfadf --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_relationships.py @@ -0,0 +1,86 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.projects_single_patch_request_data_relationships_lead import ( + ProjectsSinglePatchRequestDataRelationshipsLead, + ) + + +T = TypeVar("T", bound="ProjectsSinglePatchRequestDataRelationships") + + +@_attrs_define +class ProjectsSinglePatchRequestDataRelationships: + """ + Attributes: + lead (Union[Unset, ProjectsSinglePatchRequestDataRelationshipsLead]): + """ + + lead: Union[ + Unset, "ProjectsSinglePatchRequestDataRelationshipsLead" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + lead: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.lead, Unset): + lead = self.lead.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if lead is not UNSET: + field_dict["lead"] = lead + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.projects_single_patch_request_data_relationships_lead import ( + ProjectsSinglePatchRequestDataRelationshipsLead, + ) + + d = src_dict.copy() + _lead = d.pop("lead", UNSET) + lead: Union[Unset, ProjectsSinglePatchRequestDataRelationshipsLead] + if isinstance(_lead, Unset): + lead = UNSET + else: + lead = ProjectsSinglePatchRequestDataRelationshipsLead.from_dict( + _lead + ) + + projects_single_patch_request_data_relationships_obj = cls( + lead=lead, + ) + + projects_single_patch_request_data_relationships_obj.additional_properties = ( + d + ) + return projects_single_patch_request_data_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_relationships_lead.py b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_relationships_lead.py new file mode 100644 index 00000000..63d5a46c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_relationships_lead.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.projects_single_patch_request_data_relationships_lead_data import ( + ProjectsSinglePatchRequestDataRelationshipsLeadData, + ) + + +T = TypeVar("T", bound="ProjectsSinglePatchRequestDataRelationshipsLead") + + +@_attrs_define +class ProjectsSinglePatchRequestDataRelationshipsLead: + """ + Attributes: + data (Union[Unset, ProjectsSinglePatchRequestDataRelationshipsLeadData]): + """ + + data: Union[ + Unset, "ProjectsSinglePatchRequestDataRelationshipsLeadData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.projects_single_patch_request_data_relationships_lead_data import ( + ProjectsSinglePatchRequestDataRelationshipsLeadData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, ProjectsSinglePatchRequestDataRelationshipsLeadData] + if isinstance(_data, Unset): + data = UNSET + else: + data = ( + ProjectsSinglePatchRequestDataRelationshipsLeadData.from_dict( + _data + ) + ) + + projects_single_patch_request_data_relationships_lead_obj = cls( + data=data, + ) + + projects_single_patch_request_data_relationships_lead_obj.additional_properties = ( + d + ) + return projects_single_patch_request_data_relationships_lead_obj + + @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/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_relationships_lead_data.py b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_relationships_lead_data.py new file mode 100644 index 00000000..073b20c5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_relationships_lead_data.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.projects_single_patch_request_data_relationships_lead_data_type import ( + ProjectsSinglePatchRequestDataRelationshipsLeadDataType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProjectsSinglePatchRequestDataRelationshipsLeadData") + + +@_attrs_define +class ProjectsSinglePatchRequestDataRelationshipsLeadData: + """ + Attributes: + type (Union[Unset, ProjectsSinglePatchRequestDataRelationshipsLeadDataType]): + id (Union[Unset, str]): Example: MyUserId. + """ + + type: Union[ + Unset, ProjectsSinglePatchRequestDataRelationshipsLeadDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, ProjectsSinglePatchRequestDataRelationshipsLeadDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ProjectsSinglePatchRequestDataRelationshipsLeadDataType( + _type + ) + + id = d.pop("id", UNSET) + + projects_single_patch_request_data_relationships_lead_data_obj = cls( + type=type, + id=id, + ) + + projects_single_patch_request_data_relationships_lead_data_obj.additional_properties = ( + d + ) + return projects_single_patch_request_data_relationships_lead_data_obj + + @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/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_relationships_lead_data_type.py b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_relationships_lead_data_type.py new file mode 100644 index 00000000..aeb55947 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_relationships_lead_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class ProjectsSinglePatchRequestDataRelationshipsLeadDataType(str, Enum): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_type.py b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_type.py new file mode 100644 index 00000000..ba20f2f1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projects_single_patch_request_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class ProjectsSinglePatchRequestDataType(str, Enum): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response.py b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response.py new file mode 100644 index 00000000..d1f8c550 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response.py @@ -0,0 +1,162 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.projecttemplates_list_get_response_data_item import ( + ProjecttemplatesListGetResponseDataItem, + ) + from ..models.projecttemplates_list_get_response_included_item import ( + ProjecttemplatesListGetResponseIncludedItem, + ) + from ..models.projecttemplates_list_get_response_links import ( + ProjecttemplatesListGetResponseLinks, + ) + from ..models.projecttemplates_list_get_response_meta import ( + ProjecttemplatesListGetResponseMeta, + ) + + +T = TypeVar("T", bound="ProjecttemplatesListGetResponse") + + +@_attrs_define +class ProjecttemplatesListGetResponse: + """ + Attributes: + meta (Union[Unset, ProjecttemplatesListGetResponseMeta]): + data (Union[Unset, List['ProjecttemplatesListGetResponseDataItem']]): + included (Union[Unset, List['ProjecttemplatesListGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, ProjecttemplatesListGetResponseLinks]): + """ + + meta: Union[Unset, "ProjecttemplatesListGetResponseMeta"] = UNSET + data: Union[Unset, List["ProjecttemplatesListGetResponseDataItem"]] = UNSET + included: Union[ + Unset, List["ProjecttemplatesListGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "ProjecttemplatesListGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.projecttemplates_list_get_response_data_item import ( + ProjecttemplatesListGetResponseDataItem, + ) + from ..models.projecttemplates_list_get_response_included_item import ( + ProjecttemplatesListGetResponseIncludedItem, + ) + from ..models.projecttemplates_list_get_response_links import ( + ProjecttemplatesListGetResponseLinks, + ) + from ..models.projecttemplates_list_get_response_meta import ( + ProjecttemplatesListGetResponseMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, ProjecttemplatesListGetResponseMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = ProjecttemplatesListGetResponseMeta.from_dict(_meta) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = ProjecttemplatesListGetResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + ProjecttemplatesListGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, ProjecttemplatesListGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = ProjecttemplatesListGetResponseLinks.from_dict(_links) + + projecttemplates_list_get_response_obj = cls( + meta=meta, + data=data, + included=included, + links=links, + ) + + projecttemplates_list_get_response_obj.additional_properties = d + return projecttemplates_list_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item.py new file mode 100644 index 00000000..8c1dc89d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item.py @@ -0,0 +1,173 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.projecttemplates_list_get_response_data_item_type import ( + ProjecttemplatesListGetResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.projecttemplates_list_get_response_data_item_attributes import ( + ProjecttemplatesListGetResponseDataItemAttributes, + ) + from ..models.projecttemplates_list_get_response_data_item_links import ( + ProjecttemplatesListGetResponseDataItemLinks, + ) + from ..models.projecttemplates_list_get_response_data_item_meta import ( + ProjecttemplatesListGetResponseDataItemMeta, + ) + + +T = TypeVar("T", bound="ProjecttemplatesListGetResponseDataItem") + + +@_attrs_define +class ProjecttemplatesListGetResponseDataItem: + """ + Attributes: + type (Union[Unset, ProjecttemplatesListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, ProjecttemplatesListGetResponseDataItemAttributes]): + meta (Union[Unset, ProjecttemplatesListGetResponseDataItemMeta]): + links (Union[Unset, ProjecttemplatesListGetResponseDataItemLinks]): + """ + + type: Union[Unset, ProjecttemplatesListGetResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "ProjecttemplatesListGetResponseDataItemAttributes" + ] = UNSET + meta: Union[Unset, "ProjecttemplatesListGetResponseDataItemMeta"] = UNSET + links: Union[Unset, "ProjecttemplatesListGetResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.projecttemplates_list_get_response_data_item_attributes import ( + ProjecttemplatesListGetResponseDataItemAttributes, + ) + from ..models.projecttemplates_list_get_response_data_item_links import ( + ProjecttemplatesListGetResponseDataItemLinks, + ) + from ..models.projecttemplates_list_get_response_data_item_meta import ( + ProjecttemplatesListGetResponseDataItemMeta, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, ProjecttemplatesListGetResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = ProjecttemplatesListGetResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, ProjecttemplatesListGetResponseDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + ProjecttemplatesListGetResponseDataItemAttributes.from_dict( + _attributes + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, ProjecttemplatesListGetResponseDataItemMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = ProjecttemplatesListGetResponseDataItemMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, ProjecttemplatesListGetResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = ProjecttemplatesListGetResponseDataItemLinks.from_dict( + _links + ) + + projecttemplates_list_get_response_data_item_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + meta=meta, + links=links, + ) + + projecttemplates_list_get_response_data_item_obj.additional_properties = ( + d + ) + return projecttemplates_list_get_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_attributes.py new file mode 100644 index 00000000..2b5d2581 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_attributes.py @@ -0,0 +1,144 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, 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.projecttemplates_list_get_response_data_item_attributes_parameters import ( + ProjecttemplatesListGetResponseDataItemAttributesParameters, + ) + + +T = TypeVar("T", bound="ProjecttemplatesListGetResponseDataItemAttributes") + + +@_attrs_define +class ProjecttemplatesListGetResponseDataItemAttributes: + """ + Attributes: + custom_icon (Union[Unset, str]): + description (Union[Unset, str]): + distributions (Union[Unset, List[str]]): + id (Union[Unset, str]): + is_default (Union[Unset, bool]): + name (Union[Unset, str]): + parameters (Union[Unset, ProjecttemplatesListGetResponseDataItemAttributesParameters]): + """ + + custom_icon: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + distributions: Union[Unset, List[str]] = UNSET + id: Union[Unset, str] = UNSET + is_default: Union[Unset, bool] = UNSET + name: Union[Unset, str] = UNSET + parameters: Union[ + Unset, "ProjecttemplatesListGetResponseDataItemAttributesParameters" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + custom_icon = self.custom_icon + + description = self.description + + distributions: Union[Unset, List[str]] = UNSET + if not isinstance(self.distributions, Unset): + distributions = self.distributions + + id = self.id + + is_default = self.is_default + + name = self.name + + parameters: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.parameters, Unset): + parameters = self.parameters.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if custom_icon is not UNSET: + field_dict["customIcon"] = custom_icon + if description is not UNSET: + field_dict["description"] = description + if distributions is not UNSET: + field_dict["distributions"] = distributions + if id is not UNSET: + field_dict["id"] = id + if is_default is not UNSET: + field_dict["isDefault"] = is_default + if name is not UNSET: + field_dict["name"] = name + if parameters is not UNSET: + field_dict["parameters"] = parameters + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.projecttemplates_list_get_response_data_item_attributes_parameters import ( + ProjecttemplatesListGetResponseDataItemAttributesParameters, + ) + + d = src_dict.copy() + custom_icon = d.pop("customIcon", UNSET) + + description = d.pop("description", UNSET) + + distributions = cast(List[str], d.pop("distributions", UNSET)) + + id = d.pop("id", UNSET) + + is_default = d.pop("isDefault", UNSET) + + name = d.pop("name", UNSET) + + _parameters = d.pop("parameters", UNSET) + parameters: Union[ + Unset, ProjecttemplatesListGetResponseDataItemAttributesParameters + ] + if isinstance(_parameters, Unset): + parameters = UNSET + else: + parameters = ProjecttemplatesListGetResponseDataItemAttributesParameters.from_dict( + _parameters + ) + + projecttemplates_list_get_response_data_item_attributes_obj = cls( + custom_icon=custom_icon, + description=description, + distributions=distributions, + id=id, + is_default=is_default, + name=name, + parameters=parameters, + ) + + projecttemplates_list_get_response_data_item_attributes_obj.additional_properties = ( + d + ) + return projecttemplates_list_get_response_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_attributes_parameters.py b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_attributes_parameters.py new file mode 100644 index 00000000..62190cbc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_attributes_parameters.py @@ -0,0 +1,55 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", bound="ProjecttemplatesListGetResponseDataItemAttributesParameters" +) + + +@_attrs_define +class ProjecttemplatesListGetResponseDataItemAttributesParameters: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + projecttemplates_list_get_response_data_item_attributes_parameters_obj = ( + cls() + ) + + projecttemplates_list_get_response_data_item_attributes_parameters_obj.additional_properties = ( + d + ) + return projecttemplates_list_get_response_data_item_attributes_parameters_obj + + @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/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_links.py new file mode 100644 index 00000000..07d7195a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProjecttemplatesListGetResponseDataItemLinks") + + +@_attrs_define +class ProjecttemplatesListGetResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projecttemplates/MyProjectId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + projecttemplates_list_get_response_data_item_links_obj = cls( + self_=self_, + ) + + projecttemplates_list_get_response_data_item_links_obj.additional_properties = ( + d + ) + return projecttemplates_list_get_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_meta.py new file mode 100644 index 00000000..d55b822b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_meta.py @@ -0,0 +1,89 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.projecttemplates_list_get_response_data_item_meta_errors_item import ( + ProjecttemplatesListGetResponseDataItemMetaErrorsItem, + ) + + +T = TypeVar("T", bound="ProjecttemplatesListGetResponseDataItemMeta") + + +@_attrs_define +class ProjecttemplatesListGetResponseDataItemMeta: + """ + Attributes: + errors (Union[Unset, List['ProjecttemplatesListGetResponseDataItemMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["ProjecttemplatesListGetResponseDataItemMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.projecttemplates_list_get_response_data_item_meta_errors_item import ( + ProjecttemplatesListGetResponseDataItemMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ProjecttemplatesListGetResponseDataItemMetaErrorsItem.from_dict( + errors_item_data + ) + + errors.append(errors_item) + + projecttemplates_list_get_response_data_item_meta_obj = cls( + errors=errors, + ) + + projecttemplates_list_get_response_data_item_meta_obj.additional_properties = ( + d + ) + return projecttemplates_list_get_response_data_item_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_meta_errors_item.py new file mode 100644 index 00000000..7df7f31a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_meta_errors_item.py @@ -0,0 +1,120 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.projecttemplates_list_get_response_data_item_meta_errors_item_source import ( + ProjecttemplatesListGetResponseDataItemMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="ProjecttemplatesListGetResponseDataItemMetaErrorsItem") + + +@_attrs_define +class ProjecttemplatesListGetResponseDataItemMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, ProjecttemplatesListGetResponseDataItemMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "ProjecttemplatesListGetResponseDataItemMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.projecttemplates_list_get_response_data_item_meta_errors_item_source import ( + ProjecttemplatesListGetResponseDataItemMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, ProjecttemplatesListGetResponseDataItemMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = ProjecttemplatesListGetResponseDataItemMetaErrorsItemSource.from_dict( + _source + ) + + projecttemplates_list_get_response_data_item_meta_errors_item_obj = ( + cls( + status=status, + title=title, + detail=detail, + source=source, + ) + ) + + projecttemplates_list_get_response_data_item_meta_errors_item_obj.additional_properties = ( + d + ) + return ( + projecttemplates_list_get_response_data_item_meta_errors_item_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_meta_errors_item_source.py new file mode 100644 index 00000000..a944615a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_meta_errors_item_source.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.projecttemplates_list_get_response_data_item_meta_errors_item_source_resource import ( + ProjecttemplatesListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", bound="ProjecttemplatesListGetResponseDataItemMetaErrorsItemSource" +) + + +@_attrs_define +class ProjecttemplatesListGetResponseDataItemMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, ProjecttemplatesListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing + the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "ProjecttemplatesListGetResponseDataItemMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.projecttemplates_list_get_response_data_item_meta_errors_item_source_resource import ( + ProjecttemplatesListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + ProjecttemplatesListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = ProjecttemplatesListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + + projecttemplates_list_get_response_data_item_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + projecttemplates_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( + d + ) + return projecttemplates_list_get_response_data_item_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..1c339605 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="ProjecttemplatesListGetResponseDataItemMetaErrorsItemSourceResource", +) + + +@_attrs_define +class ProjecttemplatesListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + projecttemplates_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + projecttemplates_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return projecttemplates_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_type.py new file mode 100644 index 00000000..0af311de --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class ProjecttemplatesListGetResponseDataItemType(str, Enum): + PROJECTTEMPLATES = "projecttemplates" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_included_item.py new file mode 100644 index 00000000..9434e982 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ProjecttemplatesListGetResponseIncludedItem") + + +@_attrs_define +class ProjecttemplatesListGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + projecttemplates_list_get_response_included_item_obj = cls() + + projecttemplates_list_get_response_included_item_obj.additional_properties = ( + d + ) + return projecttemplates_list_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_links.py new file mode 100644 index 00000000..6d60ebf4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_links.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProjecttemplatesListGetResponseLinks") + + +@_attrs_define +class ProjecttemplatesListGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projecttemplates?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/projecttemplates?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/projecttemplates?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/projecttemplates?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/projecttemplates?page%5Bsize%5D=10&page%5Bnumber%5D=9. + """ + + self_: Union[Unset, str] = UNSET + first: Union[Unset, str] = UNSET + prev: Union[Unset, str] = UNSET + next_: Union[Unset, str] = UNSET + last: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + first = self.first + + prev = self.prev + + next_ = self.next_ + + last = self.last + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if first is not UNSET: + field_dict["first"] = first + if prev is not UNSET: + field_dict["prev"] = prev + if next_ is not UNSET: + field_dict["next"] = next_ + if last is not UNSET: + field_dict["last"] = last + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + first = d.pop("first", UNSET) + + prev = d.pop("prev", UNSET) + + next_ = d.pop("next", UNSET) + + last = d.pop("last", UNSET) + + projecttemplates_list_get_response_links_obj = cls( + self_=self_, + first=first, + prev=prev, + next_=next_, + last=last, + ) + + projecttemplates_list_get_response_links_obj.additional_properties = d + return projecttemplates_list_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_meta.py new file mode 100644 index 00000000..60d18ce4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/projecttemplates_list_get_response_meta.py @@ -0,0 +1,63 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProjecttemplatesListGetResponseMeta") + + +@_attrs_define +class ProjecttemplatesListGetResponseMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + projecttemplates_list_get_response_meta_obj = cls( + total_count=total_count, + ) + + projecttemplates_list_get_response_meta_obj.additional_properties = d + return projecttemplates_list_get_response_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/relationship_data_body.py b/polarion_rest_api_client/open_api_client/models/relationship_data_body.py new file mode 100644 index 00000000..9890b29c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/relationship_data_body.py @@ -0,0 +1,80 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.relationship_data_body_type import RelationshipDataBodyType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RelationshipDataBody") + + +@_attrs_define +class RelationshipDataBody: + """ + Attributes: + type (Union[Unset, RelationshipDataBodyType]): + id (Union[Unset, str]): Example: MyProjectId/MyResourceId. + """ + + type: Union[Unset, RelationshipDataBodyType] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, RelationshipDataBodyType] + if isinstance(_type, Unset): + type = UNSET + else: + type = RelationshipDataBodyType(_type) + + id = d.pop("id", UNSET) + + relationship_data_body_obj = cls( + type=type, + id=id, + ) + + relationship_data_body_obj.additional_properties = d + return relationship_data_body_obj + + @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/polarion_rest_api_client/open_api_client/models/relationship_data_body_type.py b/polarion_rest_api_client/open_api_client/models/relationship_data_body_type.py new file mode 100644 index 00000000..2dd04445 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/relationship_data_body_type.py @@ -0,0 +1,49 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class RelationshipDataBodyType(str, Enum): + CATEGORIES = "categories" + DOCUMENTS = "documents" + DOCUMENT_ATTACHMENTS = "document_attachments" + DOCUMENT_COMMENTS = "document_comments" + DOCUMENT_PARTS = "document_parts" + ENUMERATIONS = "enumerations" + EXTERNALLYLINKEDWORKITEMS = "externallylinkedworkitems" + FEATURESELECTIONS = "featureselections" + GLOBALROLES = "globalroles" + ICONS = "icons" + JOBS = "jobs" + LINKEDOSLCRESOURCES = "linkedoslcresources" + LINKEDWORKITEMS = "linkedworkitems" + PAGES = "pages" + PAGE_ATTACHMENTS = "page_attachments" + PLANS = "plans" + PROJECTGROUPS = "projectgroups" + PROJECTROLES = "projectroles" + PROJECTS = "projects" + PROJECTTEMPLATES = "projecttemplates" + REVISIONS = "revisions" + SPACES = "spaces" + TESTPARAMETERS = "testparameters" + TESTPARAMETER_DEFINITIONS = "testparameter_definitions" + TESTRECORDS = "testrecords" + TESTRECORD_ATTACHMENTS = "testrecord_attachments" + TESTRUNS = "testruns" + TESTRUN_ATTACHMENTS = "testrun_attachments" + TESTRUN_COMMENTS = "testrun_comments" + TESTSTEPRESULT_ATTACHMENTS = "teststepresult_attachments" + TESTSTEPS = "teststeps" + TESTSTEP_RESULTS = "teststep_results" + USERGROUPS = "usergroups" + USERS = "users" + WORKITEMS = "workitems" + WORKITEM_APPROVALS = "workitem_approvals" + WORKITEM_ATTACHMENTS = "workitem_attachments" + WORKITEM_COMMENTS = "workitem_comments" + WORKRECORDS = "workrecords" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/relationship_data_list_request.py b/polarion_rest_api_client/open_api_client/models/relationship_data_list_request.py new file mode 100644 index 00000000..69942e34 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/relationship_data_list_request.py @@ -0,0 +1,79 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.relationship_data_body import RelationshipDataBody + + +T = TypeVar("T", bound="RelationshipDataListRequest") + + +@_attrs_define +class RelationshipDataListRequest: + """ + Attributes: + data (Union[Unset, List['RelationshipDataBody']]): + """ + + data: Union[Unset, List["RelationshipDataBody"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.relationship_data_body import RelationshipDataBody + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = RelationshipDataBody.from_dict(data_item_data) + + data.append(data_item) + + relationship_data_list_request_obj = cls( + data=data, + ) + + relationship_data_list_request_obj.additional_properties = d + return relationship_data_list_request_obj + + @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/polarion_rest_api_client/open_api_client/models/relationship_data_list_response.py b/polarion_rest_api_client/open_api_client/models/relationship_data_list_response.py new file mode 100644 index 00000000..ea639c34 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/relationship_data_list_response.py @@ -0,0 +1,79 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.relationship_data_body import RelationshipDataBody + + +T = TypeVar("T", bound="RelationshipDataListResponse") + + +@_attrs_define +class RelationshipDataListResponse: + """ + Attributes: + data (Union[Unset, List['RelationshipDataBody']]): + """ + + data: Union[Unset, List["RelationshipDataBody"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.relationship_data_body import RelationshipDataBody + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = RelationshipDataBody.from_dict(data_item_data) + + data.append(data_item) + + relationship_data_list_response_obj = cls( + data=data, + ) + + relationship_data_list_response_obj.additional_properties = d + return relationship_data_list_response_obj + + @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/polarion_rest_api_client/open_api_client/models/relationship_data_single_request.py b/polarion_rest_api_client/open_api_client/models/relationship_data_single_request.py new file mode 100644 index 00000000..2cdbd809 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/relationship_data_single_request.py @@ -0,0 +1,76 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.relationship_data_body import RelationshipDataBody + + +T = TypeVar("T", bound="RelationshipDataSingleRequest") + + +@_attrs_define +class RelationshipDataSingleRequest: + """ + Attributes: + data (Union[Unset, RelationshipDataBody]): + """ + + data: Union[Unset, "RelationshipDataBody"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.relationship_data_body import RelationshipDataBody + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, RelationshipDataBody] + if isinstance(_data, Unset): + data = UNSET + else: + data = RelationshipDataBody.from_dict(_data) + + relationship_data_single_request_obj = cls( + data=data, + ) + + relationship_data_single_request_obj.additional_properties = d + return relationship_data_single_request_obj + + @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/polarion_rest_api_client/open_api_client/models/relationship_data_single_response.py b/polarion_rest_api_client/open_api_client/models/relationship_data_single_response.py new file mode 100644 index 00000000..6a9663c7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/relationship_data_single_response.py @@ -0,0 +1,76 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.relationship_data_body import RelationshipDataBody + + +T = TypeVar("T", bound="RelationshipDataSingleResponse") + + +@_attrs_define +class RelationshipDataSingleResponse: + """ + Attributes: + data (Union[Unset, RelationshipDataBody]): + """ + + data: Union[Unset, "RelationshipDataBody"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.relationship_data_body import RelationshipDataBody + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, RelationshipDataBody] + if isinstance(_data, Unset): + data = UNSET + else: + data = RelationshipDataBody.from_dict(_data) + + relationship_data_single_response_obj = cls( + data=data, + ) + + relationship_data_single_response_obj.additional_properties = d + return relationship_data_single_response_obj + + @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/polarion_rest_api_client/open_api_client/models/relationships_list_delete_request.py b/polarion_rest_api_client/open_api_client/models/relationships_list_delete_request.py new file mode 100644 index 00000000..6f14c5e4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/relationships_list_delete_request.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.relationships_list_delete_request_data_item import ( + RelationshipsListDeleteRequestDataItem, + ) + + +T = TypeVar("T", bound="RelationshipsListDeleteRequest") + + +@_attrs_define +class RelationshipsListDeleteRequest: + """ + Attributes: + data (Union[Unset, List['RelationshipsListDeleteRequestDataItem']]): + """ + + data: Union[Unset, List["RelationshipsListDeleteRequestDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.relationships_list_delete_request_data_item import ( + RelationshipsListDeleteRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = RelationshipsListDeleteRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + relationships_list_delete_request_obj = cls( + data=data, + ) + + relationships_list_delete_request_obj.additional_properties = d + return relationships_list_delete_request_obj + + @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/polarion_rest_api_client/open_api_client/models/relationships_list_delete_request_data_item.py b/polarion_rest_api_client/open_api_client/models/relationships_list_delete_request_data_item.py new file mode 100644 index 00000000..adeb7e1e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/relationships_list_delete_request_data_item.py @@ -0,0 +1,84 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.relationships_list_delete_request_data_item_type import ( + RelationshipsListDeleteRequestDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RelationshipsListDeleteRequestDataItem") + + +@_attrs_define +class RelationshipsListDeleteRequestDataItem: + """ + Attributes: + type (Union[Unset, RelationshipsListDeleteRequestDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyResourceId. + """ + + type: Union[Unset, RelationshipsListDeleteRequestDataItemType] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, RelationshipsListDeleteRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = RelationshipsListDeleteRequestDataItemType(_type) + + id = d.pop("id", UNSET) + + relationships_list_delete_request_data_item_obj = cls( + type=type, + id=id, + ) + + relationships_list_delete_request_data_item_obj.additional_properties = ( + d + ) + return relationships_list_delete_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/relationships_list_delete_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/relationships_list_delete_request_data_item_type.py new file mode 100644 index 00000000..999daa7b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/relationships_list_delete_request_data_item_type.py @@ -0,0 +1,49 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class RelationshipsListDeleteRequestDataItemType(str, Enum): + CATEGORIES = "categories" + DOCUMENTS = "documents" + DOCUMENT_ATTACHMENTS = "document_attachments" + DOCUMENT_COMMENTS = "document_comments" + DOCUMENT_PARTS = "document_parts" + ENUMERATIONS = "enumerations" + EXTERNALLYLINKEDWORKITEMS = "externallylinkedworkitems" + FEATURESELECTIONS = "featureselections" + GLOBALROLES = "globalroles" + ICONS = "icons" + JOBS = "jobs" + LINKEDOSLCRESOURCES = "linkedoslcresources" + LINKEDWORKITEMS = "linkedworkitems" + PAGES = "pages" + PAGE_ATTACHMENTS = "page_attachments" + PLANS = "plans" + PROJECTGROUPS = "projectgroups" + PROJECTROLES = "projectroles" + PROJECTS = "projects" + PROJECTTEMPLATES = "projecttemplates" + REVISIONS = "revisions" + SPACES = "spaces" + TESTPARAMETERS = "testparameters" + TESTPARAMETER_DEFINITIONS = "testparameter_definitions" + TESTRECORDS = "testrecords" + TESTRECORD_ATTACHMENTS = "testrecord_attachments" + TESTRUNS = "testruns" + TESTRUN_ATTACHMENTS = "testrun_attachments" + TESTRUN_COMMENTS = "testrun_comments" + TESTSTEPRESULT_ATTACHMENTS = "teststepresult_attachments" + TESTSTEPS = "teststeps" + TESTSTEP_RESULTS = "teststep_results" + USERGROUPS = "usergroups" + USERS = "users" + WORKITEMS = "workitems" + WORKITEM_APPROVALS = "workitem_approvals" + WORKITEM_ATTACHMENTS = "workitem_attachments" + WORKITEM_COMMENTS = "workitem_comments" + WORKRECORDS = "workrecords" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/resource_reference.py b/polarion_rest_api_client/open_api_client/models/resource_reference.py index 7d04fc9b..2cfaa7d3 100644 --- a/polarion_rest_api_client/open_api_client/models/resource_reference.py +++ b/polarion_rest_api_client/open_api_client/models/resource_reference.py @@ -1,33 +1,47 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="ResourceReference") @_attrs_define class ResourceReference: - """""" + """ + Attributes: + contained_resource (Union[Unset, bool]): + """ + contained_resource: Union[Unset, bool] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: + contained_resource = self.contained_resource + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) + if contained_resource is not UNSET: + field_dict["containedResource"] = contained_resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() - resource_reference_obj = cls() + contained_resource = d.pop("containedResource", UNSET) + + resource_reference_obj = cls( + contained_resource=contained_resource, + ) resource_reference_obj.additional_properties = d return resource_reference_obj diff --git a/polarion_rest_api_client/open_api_client/models/revisions_list_get_response.py b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response.py new file mode 100644 index 00000000..6b45e726 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response.py @@ -0,0 +1,160 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.revisions_list_get_response_data_item import ( + RevisionsListGetResponseDataItem, + ) + from ..models.revisions_list_get_response_included_item import ( + RevisionsListGetResponseIncludedItem, + ) + from ..models.revisions_list_get_response_links import ( + RevisionsListGetResponseLinks, + ) + from ..models.revisions_list_get_response_meta import ( + RevisionsListGetResponseMeta, + ) + + +T = TypeVar("T", bound="RevisionsListGetResponse") + + +@_attrs_define +class RevisionsListGetResponse: + """ + Attributes: + meta (Union[Unset, RevisionsListGetResponseMeta]): + data (Union[Unset, List['RevisionsListGetResponseDataItem']]): + included (Union[Unset, List['RevisionsListGetResponseIncludedItem']]): Related entities might be returned, see + Rest API + User Guide. + links (Union[Unset, RevisionsListGetResponseLinks]): + """ + + meta: Union[Unset, "RevisionsListGetResponseMeta"] = UNSET + data: Union[Unset, List["RevisionsListGetResponseDataItem"]] = UNSET + included: Union[ + Unset, List["RevisionsListGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "RevisionsListGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.revisions_list_get_response_data_item import ( + RevisionsListGetResponseDataItem, + ) + from ..models.revisions_list_get_response_included_item import ( + RevisionsListGetResponseIncludedItem, + ) + from ..models.revisions_list_get_response_links import ( + RevisionsListGetResponseLinks, + ) + from ..models.revisions_list_get_response_meta import ( + RevisionsListGetResponseMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, RevisionsListGetResponseMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = RevisionsListGetResponseMeta.from_dict(_meta) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = RevisionsListGetResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = RevisionsListGetResponseIncludedItem.from_dict( + included_item_data + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, RevisionsListGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = RevisionsListGetResponseLinks.from_dict(_links) + + revisions_list_get_response_obj = cls( + meta=meta, + data=data, + included=included, + links=links, + ) + + revisions_list_get_response_obj.additional_properties = d + return revisions_list_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item.py new file mode 100644 index 00000000..b54bf749 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item.py @@ -0,0 +1,195 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.revisions_list_get_response_data_item_type import ( + RevisionsListGetResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.revisions_list_get_response_data_item_attributes import ( + RevisionsListGetResponseDataItemAttributes, + ) + from ..models.revisions_list_get_response_data_item_links import ( + RevisionsListGetResponseDataItemLinks, + ) + from ..models.revisions_list_get_response_data_item_meta import ( + RevisionsListGetResponseDataItemMeta, + ) + from ..models.revisions_list_get_response_data_item_relationships import ( + RevisionsListGetResponseDataItemRelationships, + ) + + +T = TypeVar("T", bound="RevisionsListGetResponseDataItem") + + +@_attrs_define +class RevisionsListGetResponseDataItem: + """ + Attributes: + type (Union[Unset, RevisionsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: default/1234. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, RevisionsListGetResponseDataItemAttributes]): + relationships (Union[Unset, RevisionsListGetResponseDataItemRelationships]): + meta (Union[Unset, RevisionsListGetResponseDataItemMeta]): + links (Union[Unset, RevisionsListGetResponseDataItemLinks]): + """ + + type: Union[Unset, RevisionsListGetResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "RevisionsListGetResponseDataItemAttributes" + ] = UNSET + relationships: Union[ + Unset, "RevisionsListGetResponseDataItemRelationships" + ] = UNSET + meta: Union[Unset, "RevisionsListGetResponseDataItemMeta"] = UNSET + links: Union[Unset, "RevisionsListGetResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.revisions_list_get_response_data_item_attributes import ( + RevisionsListGetResponseDataItemAttributes, + ) + from ..models.revisions_list_get_response_data_item_links import ( + RevisionsListGetResponseDataItemLinks, + ) + from ..models.revisions_list_get_response_data_item_meta import ( + RevisionsListGetResponseDataItemMeta, + ) + from ..models.revisions_list_get_response_data_item_relationships import ( + RevisionsListGetResponseDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, RevisionsListGetResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = RevisionsListGetResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, RevisionsListGetResponseDataItemAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = RevisionsListGetResponseDataItemAttributes.from_dict( + _attributes + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, RevisionsListGetResponseDataItemRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + RevisionsListGetResponseDataItemRelationships.from_dict( + _relationships + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, RevisionsListGetResponseDataItemMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = RevisionsListGetResponseDataItemMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, RevisionsListGetResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = RevisionsListGetResponseDataItemLinks.from_dict(_links) + + revisions_list_get_response_data_item_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + revisions_list_get_response_data_item_obj.additional_properties = d + return revisions_list_get_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_attributes.py new file mode 100644 index 00000000..36221e0d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_attributes.py @@ -0,0 +1,110 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RevisionsListGetResponseDataItemAttributes") + + +@_attrs_define +class RevisionsListGetResponseDataItemAttributes: + """ + Attributes: + created (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + id (Union[Unset, str]): + internal_commit (Union[Unset, bool]): + message (Union[Unset, str]): Example: Message. + repository_name (Union[Unset, str]): Example: Repository name. + """ + + created: Union[Unset, datetime.datetime] = UNSET + id: Union[Unset, str] = UNSET + internal_commit: Union[Unset, bool] = UNSET + message: Union[Unset, str] = UNSET + repository_name: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + created: Union[Unset, str] = UNSET + if not isinstance(self.created, Unset): + created = self.created.isoformat() + + id = self.id + + internal_commit = self.internal_commit + + message = self.message + + repository_name = self.repository_name + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created is not UNSET: + field_dict["created"] = created + if id is not UNSET: + field_dict["id"] = id + if internal_commit is not UNSET: + field_dict["internalCommit"] = internal_commit + if message is not UNSET: + field_dict["message"] = message + if repository_name is not UNSET: + field_dict["repositoryName"] = repository_name + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _created = d.pop("created", UNSET) + created: Union[Unset, datetime.datetime] + if isinstance(_created, Unset): + created = UNSET + else: + created = isoparse(_created) + + id = d.pop("id", UNSET) + + internal_commit = d.pop("internalCommit", UNSET) + + message = d.pop("message", UNSET) + + repository_name = d.pop("repositoryName", UNSET) + + revisions_list_get_response_data_item_attributes_obj = cls( + created=created, + id=id, + internal_commit=internal_commit, + message=message, + repository_name=repository_name, + ) + + revisions_list_get_response_data_item_attributes_obj.additional_properties = ( + d + ) + return revisions_list_get_response_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_links.py new file mode 100644 index 00000000..b83f1db7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_links.py @@ -0,0 +1,65 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RevisionsListGetResponseDataItemLinks") + + +@_attrs_define +class RevisionsListGetResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/revisions/default/1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + revisions_list_get_response_data_item_links_obj = cls( + self_=self_, + ) + + revisions_list_get_response_data_item_links_obj.additional_properties = ( + d + ) + return revisions_list_get_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_meta.py new file mode 100644 index 00000000..873e6979 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_meta.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.revisions_list_get_response_data_item_meta_errors_item import ( + RevisionsListGetResponseDataItemMetaErrorsItem, + ) + + +T = TypeVar("T", bound="RevisionsListGetResponseDataItemMeta") + + +@_attrs_define +class RevisionsListGetResponseDataItemMeta: + """ + Attributes: + errors (Union[Unset, List['RevisionsListGetResponseDataItemMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["RevisionsListGetResponseDataItemMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.revisions_list_get_response_data_item_meta_errors_item import ( + RevisionsListGetResponseDataItemMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ( + RevisionsListGetResponseDataItemMetaErrorsItem.from_dict( + errors_item_data + ) + ) + + errors.append(errors_item) + + revisions_list_get_response_data_item_meta_obj = cls( + errors=errors, + ) + + revisions_list_get_response_data_item_meta_obj.additional_properties = ( + d + ) + return revisions_list_get_response_data_item_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_meta_errors_item.py new file mode 100644 index 00000000..034a6ffb --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_meta_errors_item.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.revisions_list_get_response_data_item_meta_errors_item_source import ( + RevisionsListGetResponseDataItemMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="RevisionsListGetResponseDataItemMetaErrorsItem") + + +@_attrs_define +class RevisionsListGetResponseDataItemMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, RevisionsListGetResponseDataItemMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "RevisionsListGetResponseDataItemMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.revisions_list_get_response_data_item_meta_errors_item_source import ( + RevisionsListGetResponseDataItemMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, RevisionsListGetResponseDataItemMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = ( + RevisionsListGetResponseDataItemMetaErrorsItemSource.from_dict( + _source + ) + ) + + revisions_list_get_response_data_item_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + revisions_list_get_response_data_item_meta_errors_item_obj.additional_properties = ( + d + ) + return revisions_list_get_response_data_item_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_meta_errors_item_source.py new file mode 100644 index 00000000..51de9fc0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_meta_errors_item_source.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.revisions_list_get_response_data_item_meta_errors_item_source_resource import ( + RevisionsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + +T = TypeVar("T", bound="RevisionsListGetResponseDataItemMetaErrorsItemSource") + + +@_attrs_define +class RevisionsListGetResponseDataItemMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, RevisionsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing the + error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "RevisionsListGetResponseDataItemMetaErrorsItemSourceResource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.revisions_list_get_response_data_item_meta_errors_item_source_resource import ( + RevisionsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, RevisionsListGetResponseDataItemMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = RevisionsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + + revisions_list_get_response_data_item_meta_errors_item_source_obj = ( + cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + ) + + revisions_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( + d + ) + return ( + revisions_list_get_response_data_item_meta_errors_item_source_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..a67887da --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="RevisionsListGetResponseDataItemMetaErrorsItemSourceResource" +) + + +@_attrs_define +class RevisionsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + revisions_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + revisions_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return revisions_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_relationships.py new file mode 100644 index 00000000..479dde84 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_relationships.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.revisions_list_get_response_data_item_relationships_author import ( + RevisionsListGetResponseDataItemRelationshipsAuthor, + ) + + +T = TypeVar("T", bound="RevisionsListGetResponseDataItemRelationships") + + +@_attrs_define +class RevisionsListGetResponseDataItemRelationships: + """ + Attributes: + author (Union[Unset, RevisionsListGetResponseDataItemRelationshipsAuthor]): + """ + + author: Union[ + Unset, "RevisionsListGetResponseDataItemRelationshipsAuthor" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + author: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.author, Unset): + author = self.author.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if author is not UNSET: + field_dict["author"] = author + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.revisions_list_get_response_data_item_relationships_author import ( + RevisionsListGetResponseDataItemRelationshipsAuthor, + ) + + d = src_dict.copy() + _author = d.pop("author", UNSET) + author: Union[ + Unset, RevisionsListGetResponseDataItemRelationshipsAuthor + ] + if isinstance(_author, Unset): + author = UNSET + else: + author = ( + RevisionsListGetResponseDataItemRelationshipsAuthor.from_dict( + _author + ) + ) + + revisions_list_get_response_data_item_relationships_obj = cls( + author=author, + ) + + revisions_list_get_response_data_item_relationships_obj.additional_properties = ( + d + ) + return revisions_list_get_response_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_relationships_author.py b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_relationships_author.py new file mode 100644 index 00000000..75d7f603 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_relationships_author.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.revisions_list_get_response_data_item_relationships_author_data import ( + RevisionsListGetResponseDataItemRelationshipsAuthorData, + ) + + +T = TypeVar("T", bound="RevisionsListGetResponseDataItemRelationshipsAuthor") + + +@_attrs_define +class RevisionsListGetResponseDataItemRelationshipsAuthor: + """ + Attributes: + data (Union[Unset, RevisionsListGetResponseDataItemRelationshipsAuthorData]): + """ + + data: Union[ + Unset, "RevisionsListGetResponseDataItemRelationshipsAuthorData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.revisions_list_get_response_data_item_relationships_author_data import ( + RevisionsListGetResponseDataItemRelationshipsAuthorData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, RevisionsListGetResponseDataItemRelationshipsAuthorData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = RevisionsListGetResponseDataItemRelationshipsAuthorData.from_dict( + _data + ) + + revisions_list_get_response_data_item_relationships_author_obj = cls( + data=data, + ) + + revisions_list_get_response_data_item_relationships_author_obj.additional_properties = ( + d + ) + return revisions_list_get_response_data_item_relationships_author_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_relationships_author_data.py new file mode 100644 index 00000000..96406d54 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_relationships_author_data.py @@ -0,0 +1,105 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.revisions_list_get_response_data_item_relationships_author_data_type import ( + RevisionsListGetResponseDataItemRelationshipsAuthorDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="RevisionsListGetResponseDataItemRelationshipsAuthorData" +) + + +@_attrs_define +class RevisionsListGetResponseDataItemRelationshipsAuthorData: + """ + Attributes: + type (Union[Unset, RevisionsListGetResponseDataItemRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, RevisionsListGetResponseDataItemRelationshipsAuthorDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, RevisionsListGetResponseDataItemRelationshipsAuthorDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = RevisionsListGetResponseDataItemRelationshipsAuthorDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + revisions_list_get_response_data_item_relationships_author_data_obj = ( + cls( + type=type, + id=id, + revision=revision, + ) + ) + + revisions_list_get_response_data_item_relationships_author_data_obj.additional_properties = ( + d + ) + return ( + revisions_list_get_response_data_item_relationships_author_data_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_relationships_author_data_type.py b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_relationships_author_data_type.py new file mode 100644 index 00000000..fd17451e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_relationships_author_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class RevisionsListGetResponseDataItemRelationshipsAuthorDataType(str, Enum): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_type.py new file mode 100644 index 00000000..79203d8a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class RevisionsListGetResponseDataItemType(str, Enum): + REVISIONS = "revisions" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_included_item.py new file mode 100644 index 00000000..09729020 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_included_item.py @@ -0,0 +1,49 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RevisionsListGetResponseIncludedItem") + + +@_attrs_define +class RevisionsListGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + revisions_list_get_response_included_item_obj = cls() + + revisions_list_get_response_included_item_obj.additional_properties = d + return revisions_list_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_links.py new file mode 100644 index 00000000..e778e52b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_links.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RevisionsListGetResponseLinks") + + +@_attrs_define +class RevisionsListGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/revisions/default?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/revisions/default?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/revisions/default?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/revisions/default?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/revisions/default?page%5Bsize%5D=10&page%5Bnumber%5D=9. + """ + + self_: Union[Unset, str] = UNSET + first: Union[Unset, str] = UNSET + prev: Union[Unset, str] = UNSET + next_: Union[Unset, str] = UNSET + last: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + first = self.first + + prev = self.prev + + next_ = self.next_ + + last = self.last + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if first is not UNSET: + field_dict["first"] = first + if prev is not UNSET: + field_dict["prev"] = prev + if next_ is not UNSET: + field_dict["next"] = next_ + if last is not UNSET: + field_dict["last"] = last + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + first = d.pop("first", UNSET) + + prev = d.pop("prev", UNSET) + + next_ = d.pop("next", UNSET) + + last = d.pop("last", UNSET) + + revisions_list_get_response_links_obj = cls( + self_=self_, + first=first, + prev=prev, + next_=next_, + last=last, + ) + + revisions_list_get_response_links_obj.additional_properties = d + return revisions_list_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_meta.py new file mode 100644 index 00000000..1928a942 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_list_get_response_meta.py @@ -0,0 +1,63 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RevisionsListGetResponseMeta") + + +@_attrs_define +class RevisionsListGetResponseMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + revisions_list_get_response_meta_obj = cls( + total_count=total_count, + ) + + revisions_list_get_response_meta_obj.additional_properties = d + return revisions_list_get_response_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_single_get_response.py b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response.py new file mode 100644 index 00000000..77d7d885 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response.py @@ -0,0 +1,133 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.revisions_single_get_response_data import ( + RevisionsSingleGetResponseData, + ) + from ..models.revisions_single_get_response_included_item import ( + RevisionsSingleGetResponseIncludedItem, + ) + from ..models.revisions_single_get_response_links import ( + RevisionsSingleGetResponseLinks, + ) + + +T = TypeVar("T", bound="RevisionsSingleGetResponse") + + +@_attrs_define +class RevisionsSingleGetResponse: + """ + Attributes: + data (Union[Unset, RevisionsSingleGetResponseData]): + included (Union[Unset, List['RevisionsSingleGetResponseIncludedItem']]): Related entities might be returned, see + Rest API + User Guide. + links (Union[Unset, RevisionsSingleGetResponseLinks]): + """ + + data: Union[Unset, "RevisionsSingleGetResponseData"] = UNSET + included: Union[ + Unset, List["RevisionsSingleGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "RevisionsSingleGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.revisions_single_get_response_data import ( + RevisionsSingleGetResponseData, + ) + from ..models.revisions_single_get_response_included_item import ( + RevisionsSingleGetResponseIncludedItem, + ) + from ..models.revisions_single_get_response_links import ( + RevisionsSingleGetResponseLinks, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, RevisionsSingleGetResponseData] + if isinstance(_data, Unset): + data = UNSET + else: + data = RevisionsSingleGetResponseData.from_dict(_data) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = RevisionsSingleGetResponseIncludedItem.from_dict( + included_item_data + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, RevisionsSingleGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = RevisionsSingleGetResponseLinks.from_dict(_links) + + revisions_single_get_response_obj = cls( + data=data, + included=included, + links=links, + ) + + revisions_single_get_response_obj.additional_properties = d + return revisions_single_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data.py new file mode 100644 index 00000000..51743b69 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data.py @@ -0,0 +1,195 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.revisions_single_get_response_data_type import ( + RevisionsSingleGetResponseDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.revisions_single_get_response_data_attributes import ( + RevisionsSingleGetResponseDataAttributes, + ) + from ..models.revisions_single_get_response_data_links import ( + RevisionsSingleGetResponseDataLinks, + ) + from ..models.revisions_single_get_response_data_meta import ( + RevisionsSingleGetResponseDataMeta, + ) + from ..models.revisions_single_get_response_data_relationships import ( + RevisionsSingleGetResponseDataRelationships, + ) + + +T = TypeVar("T", bound="RevisionsSingleGetResponseData") + + +@_attrs_define +class RevisionsSingleGetResponseData: + """ + Attributes: + type (Union[Unset, RevisionsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: default/1234. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, RevisionsSingleGetResponseDataAttributes]): + relationships (Union[Unset, RevisionsSingleGetResponseDataRelationships]): + meta (Union[Unset, RevisionsSingleGetResponseDataMeta]): + links (Union[Unset, RevisionsSingleGetResponseDataLinks]): + """ + + type: Union[Unset, RevisionsSingleGetResponseDataType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "RevisionsSingleGetResponseDataAttributes" + ] = UNSET + relationships: Union[ + Unset, "RevisionsSingleGetResponseDataRelationships" + ] = UNSET + meta: Union[Unset, "RevisionsSingleGetResponseDataMeta"] = UNSET + links: Union[Unset, "RevisionsSingleGetResponseDataLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.revisions_single_get_response_data_attributes import ( + RevisionsSingleGetResponseDataAttributes, + ) + from ..models.revisions_single_get_response_data_links import ( + RevisionsSingleGetResponseDataLinks, + ) + from ..models.revisions_single_get_response_data_meta import ( + RevisionsSingleGetResponseDataMeta, + ) + from ..models.revisions_single_get_response_data_relationships import ( + RevisionsSingleGetResponseDataRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, RevisionsSingleGetResponseDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = RevisionsSingleGetResponseDataType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, RevisionsSingleGetResponseDataAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = RevisionsSingleGetResponseDataAttributes.from_dict( + _attributes + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, RevisionsSingleGetResponseDataRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + RevisionsSingleGetResponseDataRelationships.from_dict( + _relationships + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, RevisionsSingleGetResponseDataMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = RevisionsSingleGetResponseDataMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, RevisionsSingleGetResponseDataLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = RevisionsSingleGetResponseDataLinks.from_dict(_links) + + revisions_single_get_response_data_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + revisions_single_get_response_data_obj.additional_properties = d + return revisions_single_get_response_data_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_attributes.py new file mode 100644 index 00000000..1f40e746 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_attributes.py @@ -0,0 +1,110 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RevisionsSingleGetResponseDataAttributes") + + +@_attrs_define +class RevisionsSingleGetResponseDataAttributes: + """ + Attributes: + created (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + id (Union[Unset, str]): + internal_commit (Union[Unset, bool]): + message (Union[Unset, str]): Example: Message. + repository_name (Union[Unset, str]): Example: Repository name. + """ + + created: Union[Unset, datetime.datetime] = UNSET + id: Union[Unset, str] = UNSET + internal_commit: Union[Unset, bool] = UNSET + message: Union[Unset, str] = UNSET + repository_name: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + created: Union[Unset, str] = UNSET + if not isinstance(self.created, Unset): + created = self.created.isoformat() + + id = self.id + + internal_commit = self.internal_commit + + message = self.message + + repository_name = self.repository_name + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created is not UNSET: + field_dict["created"] = created + if id is not UNSET: + field_dict["id"] = id + if internal_commit is not UNSET: + field_dict["internalCommit"] = internal_commit + if message is not UNSET: + field_dict["message"] = message + if repository_name is not UNSET: + field_dict["repositoryName"] = repository_name + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _created = d.pop("created", UNSET) + created: Union[Unset, datetime.datetime] + if isinstance(_created, Unset): + created = UNSET + else: + created = isoparse(_created) + + id = d.pop("id", UNSET) + + internal_commit = d.pop("internalCommit", UNSET) + + message = d.pop("message", UNSET) + + repository_name = d.pop("repositoryName", UNSET) + + revisions_single_get_response_data_attributes_obj = cls( + created=created, + id=id, + internal_commit=internal_commit, + message=message, + repository_name=repository_name, + ) + + revisions_single_get_response_data_attributes_obj.additional_properties = ( + d + ) + return revisions_single_get_response_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_links.py new file mode 100644 index 00000000..837e0b2e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_links.py @@ -0,0 +1,63 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RevisionsSingleGetResponseDataLinks") + + +@_attrs_define +class RevisionsSingleGetResponseDataLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/revisions/default/1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + revisions_single_get_response_data_links_obj = cls( + self_=self_, + ) + + revisions_single_get_response_data_links_obj.additional_properties = d + return revisions_single_get_response_data_links_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_meta.py new file mode 100644 index 00000000..61f67b52 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_meta.py @@ -0,0 +1,89 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.revisions_single_get_response_data_meta_errors_item import ( + RevisionsSingleGetResponseDataMetaErrorsItem, + ) + + +T = TypeVar("T", bound="RevisionsSingleGetResponseDataMeta") + + +@_attrs_define +class RevisionsSingleGetResponseDataMeta: + """ + Attributes: + errors (Union[Unset, List['RevisionsSingleGetResponseDataMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["RevisionsSingleGetResponseDataMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.revisions_single_get_response_data_meta_errors_item import ( + RevisionsSingleGetResponseDataMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ( + RevisionsSingleGetResponseDataMetaErrorsItem.from_dict( + errors_item_data + ) + ) + + errors.append(errors_item) + + revisions_single_get_response_data_meta_obj = cls( + errors=errors, + ) + + revisions_single_get_response_data_meta_obj.additional_properties = d + return revisions_single_get_response_data_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_meta_errors_item.py new file mode 100644 index 00000000..161d0a37 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_meta_errors_item.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.revisions_single_get_response_data_meta_errors_item_source import ( + RevisionsSingleGetResponseDataMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="RevisionsSingleGetResponseDataMetaErrorsItem") + + +@_attrs_define +class RevisionsSingleGetResponseDataMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, RevisionsSingleGetResponseDataMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "RevisionsSingleGetResponseDataMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.revisions_single_get_response_data_meta_errors_item_source import ( + RevisionsSingleGetResponseDataMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, RevisionsSingleGetResponseDataMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = ( + RevisionsSingleGetResponseDataMetaErrorsItemSource.from_dict( + _source + ) + ) + + revisions_single_get_response_data_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + revisions_single_get_response_data_meta_errors_item_obj.additional_properties = ( + d + ) + return revisions_single_get_response_data_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_meta_errors_item_source.py new file mode 100644 index 00000000..2a3c63c2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_meta_errors_item_source.py @@ -0,0 +1,106 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.revisions_single_get_response_data_meta_errors_item_source_resource import ( + RevisionsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + +T = TypeVar("T", bound="RevisionsSingleGetResponseDataMetaErrorsItemSource") + + +@_attrs_define +class RevisionsSingleGetResponseDataMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, RevisionsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "RevisionsSingleGetResponseDataMetaErrorsItemSourceResource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.revisions_single_get_response_data_meta_errors_item_source_resource import ( + RevisionsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, RevisionsSingleGetResponseDataMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = RevisionsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + + revisions_single_get_response_data_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + revisions_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( + d + ) + return revisions_single_get_response_data_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..422cd758 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="RevisionsSingleGetResponseDataMetaErrorsItemSourceResource" +) + + +@_attrs_define +class RevisionsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + revisions_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + revisions_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return revisions_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_relationships.py new file mode 100644 index 00000000..2e6942e2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_relationships.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.revisions_single_get_response_data_relationships_author import ( + RevisionsSingleGetResponseDataRelationshipsAuthor, + ) + + +T = TypeVar("T", bound="RevisionsSingleGetResponseDataRelationships") + + +@_attrs_define +class RevisionsSingleGetResponseDataRelationships: + """ + Attributes: + author (Union[Unset, RevisionsSingleGetResponseDataRelationshipsAuthor]): + """ + + author: Union[ + Unset, "RevisionsSingleGetResponseDataRelationshipsAuthor" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + author: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.author, Unset): + author = self.author.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if author is not UNSET: + field_dict["author"] = author + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.revisions_single_get_response_data_relationships_author import ( + RevisionsSingleGetResponseDataRelationshipsAuthor, + ) + + d = src_dict.copy() + _author = d.pop("author", UNSET) + author: Union[Unset, RevisionsSingleGetResponseDataRelationshipsAuthor] + if isinstance(_author, Unset): + author = UNSET + else: + author = ( + RevisionsSingleGetResponseDataRelationshipsAuthor.from_dict( + _author + ) + ) + + revisions_single_get_response_data_relationships_obj = cls( + author=author, + ) + + revisions_single_get_response_data_relationships_obj.additional_properties = ( + d + ) + return revisions_single_get_response_data_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_relationships_author.py b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_relationships_author.py new file mode 100644 index 00000000..bc9a68ec --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_relationships_author.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.revisions_single_get_response_data_relationships_author_data import ( + RevisionsSingleGetResponseDataRelationshipsAuthorData, + ) + + +T = TypeVar("T", bound="RevisionsSingleGetResponseDataRelationshipsAuthor") + + +@_attrs_define +class RevisionsSingleGetResponseDataRelationshipsAuthor: + """ + Attributes: + data (Union[Unset, RevisionsSingleGetResponseDataRelationshipsAuthorData]): + """ + + data: Union[ + Unset, "RevisionsSingleGetResponseDataRelationshipsAuthorData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.revisions_single_get_response_data_relationships_author_data import ( + RevisionsSingleGetResponseDataRelationshipsAuthorData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, RevisionsSingleGetResponseDataRelationshipsAuthorData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = RevisionsSingleGetResponseDataRelationshipsAuthorData.from_dict( + _data + ) + + revisions_single_get_response_data_relationships_author_obj = cls( + data=data, + ) + + revisions_single_get_response_data_relationships_author_obj.additional_properties = ( + d + ) + return revisions_single_get_response_data_relationships_author_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_relationships_author_data.py new file mode 100644 index 00000000..f24701cc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_relationships_author_data.py @@ -0,0 +1,99 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.revisions_single_get_response_data_relationships_author_data_type import ( + RevisionsSingleGetResponseDataRelationshipsAuthorDataType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RevisionsSingleGetResponseDataRelationshipsAuthorData") + + +@_attrs_define +class RevisionsSingleGetResponseDataRelationshipsAuthorData: + """ + Attributes: + type (Union[Unset, RevisionsSingleGetResponseDataRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, RevisionsSingleGetResponseDataRelationshipsAuthorDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, RevisionsSingleGetResponseDataRelationshipsAuthorDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = RevisionsSingleGetResponseDataRelationshipsAuthorDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + revisions_single_get_response_data_relationships_author_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + revisions_single_get_response_data_relationships_author_data_obj.additional_properties = ( + d + ) + return revisions_single_get_response_data_relationships_author_data_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_relationships_author_data_type.py b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_relationships_author_data_type.py new file mode 100644 index 00000000..f160f8f7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_relationships_author_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class RevisionsSingleGetResponseDataRelationshipsAuthorDataType(str, Enum): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_type.py b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_type.py new file mode 100644 index 00000000..271b3321 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class RevisionsSingleGetResponseDataType(str, Enum): + REVISIONS = "revisions" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_included_item.py new file mode 100644 index 00000000..ce2e4175 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RevisionsSingleGetResponseIncludedItem") + + +@_attrs_define +class RevisionsSingleGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + revisions_single_get_response_included_item_obj = cls() + + revisions_single_get_response_included_item_obj.additional_properties = ( + d + ) + return revisions_single_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_links.py new file mode 100644 index 00000000..2731fd07 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/revisions_single_get_response_links.py @@ -0,0 +1,63 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RevisionsSingleGetResponseLinks") + + +@_attrs_define +class RevisionsSingleGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/revisions/default/1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + revisions_single_get_response_links_obj = cls( + self_=self_, + ) + + revisions_single_get_response_links_obj.additional_properties = d + return revisions_single_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/set_license_request_body.py b/polarion_rest_api_client/open_api_client/models/set_license_request_body.py index 5e350842..82d09a4b 100644 --- a/polarion_rest_api_client/open_api_client/models/set_license_request_body.py +++ b/polarion_rest_api_client/open_api_client/models/set_license_request_body.py @@ -17,14 +17,10 @@ @_attrs_define class SetLicenseRequestBody: """ - Attributes - ---------- - license_ : Union[Unset, SetLicenseRequestBodyLicense] - User's license type - group : Union[Unset, str] - License group - concurrent : Union[Unset, bool] - Is concurrent user + Attributes: + license_ (Union[Unset, SetLicenseRequestBodyLicense]): User's license type + group (Union[Unset, str]): License group Example: Department. + concurrent (Union[Unset, bool]): Is concurrent user Example: True. """ license_: Union[Unset, SetLicenseRequestBodyLicense] = UNSET @@ -40,6 +36,7 @@ def to_dict(self) -> Dict[str, Any]: license_ = self.license_.value group = self.group + concurrent = self.concurrent field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/sparse_fields.py b/polarion_rest_api_client/open_api_client/models/sparse_fields.py index 1388ca2e..ce24f387 100644 --- a/polarion_rest_api_client/open_api_client/models/sparse_fields.py +++ b/polarion_rest_api_client/open_api_client/models/sparse_fields.py @@ -14,46 +14,44 @@ @_attrs_define class SparseFields: """ - Attributes - ---------- - categories : Union[Unset, str] - Requested fields - documents : Union[Unset, str] - Requested fields - document_attachments : Union[Unset, str] - Requested fields - document_comments : Union[Unset, str] - Requested fields - document_parts : Union[Unset, str] - Requested fields - enumerations : Union[Unset, str] - Requested fields - globalroles : Union[Unset, str] - Requested fields - icons : Union[Unset, str] - Requested fields - linkedworkitems : Union[Unset, str] - Requested fields - pages : Union[Unset, str] - Requested fields - page_attachments : Union[Unset, str] - Requested fields - plans : Union[Unset, str] - Requested fields - projectroles : Union[Unset, str] - Requested fields - projects : Union[Unset, str] - Requested fields - usergroups : Union[Unset, str] - Requested fields - users : Union[Unset, str] - Requested fields - workitems : Union[Unset, str] - Requested fields - workitem_attachments : Union[Unset, str] - Requested fields - workitem_comments : Union[Unset, str] - Requested fields + Attributes: + categories (Union[Unset, str]): Requested fields Example: @all. + documents (Union[Unset, str]): Requested fields Example: @all. + document_attachments (Union[Unset, str]): Requested fields Example: @all. + document_comments (Union[Unset, str]): Requested fields Example: @all. + document_parts (Union[Unset, str]): Requested fields Example: @all. + enumerations (Union[Unset, str]): Requested fields Example: @all. + globalroles (Union[Unset, str]): Requested fields Example: @all. + icons (Union[Unset, str]): Requested fields Example: @all. + jobs (Union[Unset, str]): Requested fields Example: @all. + linkedworkitems (Union[Unset, str]): Requested fields Example: @all. + externallylinkedworkitems (Union[Unset, str]): Requested fields Example: @all. + linkedoslcresources (Union[Unset, str]): Requested fields Example: @all. + pages (Union[Unset, str]): Requested fields Example: @all. + page_attachments (Union[Unset, str]): Requested fields Example: @all. + plans (Union[Unset, str]): Requested fields Example: @all. + projectroles (Union[Unset, str]): Requested fields Example: @all. + projects (Union[Unset, str]): Requested fields Example: @all. + projecttemplates (Union[Unset, str]): Requested fields Example: @all. + testparameters (Union[Unset, str]): Requested fields Example: @all. + testparameter_definitions (Union[Unset, str]): Requested fields Example: @all. + testrecords (Union[Unset, str]): Requested fields Example: @all. + teststep_results (Union[Unset, str]): Requested fields Example: @all. + testruns (Union[Unset, str]): Requested fields Example: @all. + testrun_attachments (Union[Unset, str]): Requested fields Example: @all. + teststepresult_attachments (Union[Unset, str]): Requested fields Example: @all. + testrun_comments (Union[Unset, str]): Requested fields Example: @all. + usergroups (Union[Unset, str]): Requested fields Example: @all. + users (Union[Unset, str]): Requested fields Example: @all. + workitems (Union[Unset, str]): Requested fields Example: @all. + workitem_attachments (Union[Unset, str]): Requested fields Example: @all. + workitem_approvals (Union[Unset, str]): Requested fields Example: @all. + workitem_comments (Union[Unset, str]): Requested fields Example: @all. + featureselections (Union[Unset, str]): Requested fields Example: @all. + teststeps (Union[Unset, str]): Requested fields Example: @all. + workrecords (Union[Unset, str]): Requested fields Example: @all. + revisions (Union[Unset, str]): Requested fields Example: @all. + testrecord_attachments (Union[Unset, str]): Requested fields Example: @all. """ categories: Union[Unset, str] = UNSET @@ -64,42 +62,114 @@ class SparseFields: enumerations: Union[Unset, str] = UNSET globalroles: Union[Unset, str] = UNSET icons: Union[Unset, str] = UNSET + jobs: Union[Unset, str] = UNSET linkedworkitems: Union[Unset, str] = UNSET + externallylinkedworkitems: Union[Unset, str] = UNSET + linkedoslcresources: Union[Unset, str] = UNSET pages: Union[Unset, str] = UNSET page_attachments: Union[Unset, str] = UNSET plans: Union[Unset, str] = UNSET projectroles: Union[Unset, str] = UNSET projects: Union[Unset, str] = UNSET + projecttemplates: Union[Unset, str] = UNSET + testparameters: Union[Unset, str] = UNSET + testparameter_definitions: Union[Unset, str] = UNSET + testrecords: Union[Unset, str] = UNSET + teststep_results: Union[Unset, str] = UNSET + testruns: Union[Unset, str] = UNSET + testrun_attachments: Union[Unset, str] = UNSET + teststepresult_attachments: Union[Unset, str] = UNSET + testrun_comments: Union[Unset, str] = UNSET usergroups: Union[Unset, str] = UNSET users: Union[Unset, str] = UNSET workitems: Union[Unset, str] = UNSET workitem_attachments: Union[Unset, str] = UNSET + workitem_approvals: Union[Unset, str] = UNSET workitem_comments: Union[Unset, str] = UNSET + featureselections: Union[Unset, str] = UNSET + teststeps: Union[Unset, str] = UNSET + workrecords: Union[Unset, str] = UNSET + revisions: Union[Unset, str] = UNSET + testrecord_attachments: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: categories = self.categories + documents = self.documents + document_attachments = self.document_attachments + document_comments = self.document_comments + document_parts = self.document_parts + enumerations = self.enumerations + globalroles = self.globalroles + icons = self.icons + + jobs = self.jobs + linkedworkitems = self.linkedworkitems + + externallylinkedworkitems = self.externallylinkedworkitems + + linkedoslcresources = self.linkedoslcresources + pages = self.pages + page_attachments = self.page_attachments + plans = self.plans + projectroles = self.projectroles + projects = self.projects + + projecttemplates = self.projecttemplates + + testparameters = self.testparameters + + testparameter_definitions = self.testparameter_definitions + + testrecords = self.testrecords + + teststep_results = self.teststep_results + + testruns = self.testruns + + testrun_attachments = self.testrun_attachments + + teststepresult_attachments = self.teststepresult_attachments + + testrun_comments = self.testrun_comments + usergroups = self.usergroups + users = self.users + workitems = self.workitems + workitem_attachments = self.workitem_attachments + + workitem_approvals = self.workitem_approvals + workitem_comments = self.workitem_comments + featureselections = self.featureselections + + teststeps = self.teststeps + + workrecords = self.workrecords + + revisions = self.revisions + + testrecord_attachments = self.testrecord_attachments + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -119,8 +189,14 @@ def to_dict(self) -> Dict[str, Any]: field_dict["globalroles"] = globalroles if icons is not UNSET: field_dict["icons"] = icons + if jobs is not UNSET: + field_dict["jobs"] = jobs if linkedworkitems is not UNSET: field_dict["linkedworkitems"] = linkedworkitems + if externallylinkedworkitems is not UNSET: + field_dict["externallylinkedworkitems"] = externallylinkedworkitems + if linkedoslcresources is not UNSET: + field_dict["linkedoslcresources"] = linkedoslcresources if pages is not UNSET: field_dict["pages"] = pages if page_attachments is not UNSET: @@ -131,6 +207,26 @@ def to_dict(self) -> Dict[str, Any]: field_dict["projectroles"] = projectroles if projects is not UNSET: field_dict["projects"] = projects + if projecttemplates is not UNSET: + field_dict["projecttemplates"] = projecttemplates + if testparameters is not UNSET: + field_dict["testparameters"] = testparameters + if testparameter_definitions is not UNSET: + field_dict["testparameter_definitions"] = testparameter_definitions + if testrecords is not UNSET: + field_dict["testrecords"] = testrecords + if teststep_results is not UNSET: + field_dict["teststep_results"] = teststep_results + if testruns is not UNSET: + field_dict["testruns"] = testruns + if testrun_attachments is not UNSET: + field_dict["testrun_attachments"] = testrun_attachments + if teststepresult_attachments is not UNSET: + field_dict[ + "teststepresult_attachments" + ] = teststepresult_attachments + if testrun_comments is not UNSET: + field_dict["testrun_comments"] = testrun_comments if usergroups is not UNSET: field_dict["usergroups"] = usergroups if users is not UNSET: @@ -139,8 +235,20 @@ def to_dict(self) -> Dict[str, Any]: field_dict["workitems"] = workitems if workitem_attachments is not UNSET: field_dict["workitem_attachments"] = workitem_attachments + if workitem_approvals is not UNSET: + field_dict["workitem_approvals"] = workitem_approvals if workitem_comments is not UNSET: field_dict["workitem_comments"] = workitem_comments + if featureselections is not UNSET: + field_dict["featureselections"] = featureselections + if teststeps is not UNSET: + field_dict["teststeps"] = teststeps + if workrecords is not UNSET: + field_dict["workrecords"] = workrecords + if revisions is not UNSET: + field_dict["revisions"] = revisions + if testrecord_attachments is not UNSET: + field_dict["testrecord_attachments"] = testrecord_attachments return field_dict @@ -163,8 +271,14 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: icons = d.pop("icons", UNSET) + jobs = d.pop("jobs", UNSET) + linkedworkitems = d.pop("linkedworkitems", UNSET) + externallylinkedworkitems = d.pop("externallylinkedworkitems", UNSET) + + linkedoslcresources = d.pop("linkedoslcresources", UNSET) + pages = d.pop("pages", UNSET) page_attachments = d.pop("page_attachments", UNSET) @@ -175,6 +289,24 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: projects = d.pop("projects", UNSET) + projecttemplates = d.pop("projecttemplates", UNSET) + + testparameters = d.pop("testparameters", UNSET) + + testparameter_definitions = d.pop("testparameter_definitions", UNSET) + + testrecords = d.pop("testrecords", UNSET) + + teststep_results = d.pop("teststep_results", UNSET) + + testruns = d.pop("testruns", UNSET) + + testrun_attachments = d.pop("testrun_attachments", UNSET) + + teststepresult_attachments = d.pop("teststepresult_attachments", UNSET) + + testrun_comments = d.pop("testrun_comments", UNSET) + usergroups = d.pop("usergroups", UNSET) users = d.pop("users", UNSET) @@ -183,8 +315,20 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: workitem_attachments = d.pop("workitem_attachments", UNSET) + workitem_approvals = d.pop("workitem_approvals", UNSET) + workitem_comments = d.pop("workitem_comments", UNSET) + featureselections = d.pop("featureselections", UNSET) + + teststeps = d.pop("teststeps", UNSET) + + workrecords = d.pop("workrecords", UNSET) + + revisions = d.pop("revisions", UNSET) + + testrecord_attachments = d.pop("testrecord_attachments", UNSET) + sparse_fields_obj = cls( categories=categories, documents=documents, @@ -194,17 +338,35 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: enumerations=enumerations, globalroles=globalroles, icons=icons, + jobs=jobs, linkedworkitems=linkedworkitems, + externallylinkedworkitems=externallylinkedworkitems, + linkedoslcresources=linkedoslcresources, pages=pages, page_attachments=page_attachments, plans=plans, projectroles=projectroles, projects=projects, + projecttemplates=projecttemplates, + testparameters=testparameters, + testparameter_definitions=testparameter_definitions, + testrecords=testrecords, + teststep_results=teststep_results, + testruns=testruns, + testrun_attachments=testrun_attachments, + teststepresult_attachments=teststepresult_attachments, + testrun_comments=testrun_comments, usergroups=usergroups, users=users, workitems=workitems, workitem_attachments=workitem_attachments, + workitem_approvals=workitem_approvals, workitem_comments=workitem_comments, + featureselections=featureselections, + teststeps=teststeps, + workrecords=workrecords, + revisions=revisions, + testrecord_attachments=testrecord_attachments, ) sparse_fields_obj.additional_properties = d diff --git a/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response.py new file mode 100644 index 00000000..18cc057b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response.py @@ -0,0 +1,170 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameter_definitions_list_get_response_data_item import ( + TestparameterDefinitionsListGetResponseDataItem, + ) + from ..models.testparameter_definitions_list_get_response_included_item import ( + TestparameterDefinitionsListGetResponseIncludedItem, + ) + from ..models.testparameter_definitions_list_get_response_links import ( + TestparameterDefinitionsListGetResponseLinks, + ) + from ..models.testparameter_definitions_list_get_response_meta import ( + TestparameterDefinitionsListGetResponseMeta, + ) + + +T = TypeVar("T", bound="TestparameterDefinitionsListGetResponse") + + +@_attrs_define +class TestparameterDefinitionsListGetResponse: + """ + Attributes: + meta (Union[Unset, TestparameterDefinitionsListGetResponseMeta]): + data (Union[Unset, List['TestparameterDefinitionsListGetResponseDataItem']]): + included (Union[Unset, List['TestparameterDefinitionsListGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, TestparameterDefinitionsListGetResponseLinks]): + """ + + meta: Union[Unset, "TestparameterDefinitionsListGetResponseMeta"] = UNSET + data: Union[ + Unset, List["TestparameterDefinitionsListGetResponseDataItem"] + ] = UNSET + included: Union[ + Unset, List["TestparameterDefinitionsListGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "TestparameterDefinitionsListGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameter_definitions_list_get_response_data_item import ( + TestparameterDefinitionsListGetResponseDataItem, + ) + from ..models.testparameter_definitions_list_get_response_included_item import ( + TestparameterDefinitionsListGetResponseIncludedItem, + ) + from ..models.testparameter_definitions_list_get_response_links import ( + TestparameterDefinitionsListGetResponseLinks, + ) + from ..models.testparameter_definitions_list_get_response_meta import ( + TestparameterDefinitionsListGetResponseMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestparameterDefinitionsListGetResponseMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestparameterDefinitionsListGetResponseMeta.from_dict(_meta) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = ( + TestparameterDefinitionsListGetResponseDataItem.from_dict( + data_item_data + ) + ) + + data.append(data_item) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + TestparameterDefinitionsListGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestparameterDefinitionsListGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestparameterDefinitionsListGetResponseLinks.from_dict( + _links + ) + + testparameter_definitions_list_get_response_obj = cls( + meta=meta, + data=data, + included=included, + links=links, + ) + + testparameter_definitions_list_get_response_obj.additional_properties = ( + d + ) + return testparameter_definitions_list_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item.py new file mode 100644 index 00000000..e0891863 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item.py @@ -0,0 +1,185 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testparameter_definitions_list_get_response_data_item_type import ( + TestparameterDefinitionsListGetResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameter_definitions_list_get_response_data_item_attributes import ( + TestparameterDefinitionsListGetResponseDataItemAttributes, + ) + from ..models.testparameter_definitions_list_get_response_data_item_links import ( + TestparameterDefinitionsListGetResponseDataItemLinks, + ) + from ..models.testparameter_definitions_list_get_response_data_item_meta import ( + TestparameterDefinitionsListGetResponseDataItemMeta, + ) + + +T = TypeVar("T", bound="TestparameterDefinitionsListGetResponseDataItem") + + +@_attrs_define +class TestparameterDefinitionsListGetResponseDataItem: + """ + Attributes: + type (Union[Unset, TestparameterDefinitionsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestParamDefinition. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TestparameterDefinitionsListGetResponseDataItemAttributes]): + meta (Union[Unset, TestparameterDefinitionsListGetResponseDataItemMeta]): + links (Union[Unset, TestparameterDefinitionsListGetResponseDataItemLinks]): + """ + + type: Union[ + Unset, TestparameterDefinitionsListGetResponseDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestparameterDefinitionsListGetResponseDataItemAttributes" + ] = UNSET + meta: Union[ + Unset, "TestparameterDefinitionsListGetResponseDataItemMeta" + ] = UNSET + links: Union[ + Unset, "TestparameterDefinitionsListGetResponseDataItemLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameter_definitions_list_get_response_data_item_attributes import ( + TestparameterDefinitionsListGetResponseDataItemAttributes, + ) + from ..models.testparameter_definitions_list_get_response_data_item_links import ( + TestparameterDefinitionsListGetResponseDataItemLinks, + ) + from ..models.testparameter_definitions_list_get_response_data_item_meta import ( + TestparameterDefinitionsListGetResponseDataItemMeta, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestparameterDefinitionsListGetResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestparameterDefinitionsListGetResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TestparameterDefinitionsListGetResponseDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TestparameterDefinitionsListGetResponseDataItemAttributes.from_dict( + _attributes + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestparameterDefinitionsListGetResponseDataItemMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = ( + TestparameterDefinitionsListGetResponseDataItemMeta.from_dict( + _meta + ) + ) + + _links = d.pop("links", UNSET) + links: Union[ + Unset, TestparameterDefinitionsListGetResponseDataItemLinks + ] + if isinstance(_links, Unset): + links = UNSET + else: + links = ( + TestparameterDefinitionsListGetResponseDataItemLinks.from_dict( + _links + ) + ) + + testparameter_definitions_list_get_response_data_item_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + meta=meta, + links=links, + ) + + testparameter_definitions_list_get_response_data_item_obj.additional_properties = ( + d + ) + return testparameter_definitions_list_get_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_attributes.py new file mode 100644 index 00000000..fa0ac4f1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_attributes.py @@ -0,0 +1,67 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestparameterDefinitionsListGetResponseDataItemAttributes" +) + + +@_attrs_define +class TestparameterDefinitionsListGetResponseDataItemAttributes: + """ + Attributes: + name (Union[Unset, str]): Example: Test Parameter Definition example. + """ + + name: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name", UNSET) + + testparameter_definitions_list_get_response_data_item_attributes_obj = cls( + name=name, + ) + + testparameter_definitions_list_get_response_data_item_attributes_obj.additional_properties = ( + d + ) + return testparameter_definitions_list_get_response_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_links.py new file mode 100644 index 00000000..5ce85751 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestparameterDefinitionsListGetResponseDataItemLinks") + + +@_attrs_define +class TestparameterDefinitionsListGetResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testparameterdefinitions/MyTestParamDefinition. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testparameter_definitions_list_get_response_data_item_links_obj = cls( + self_=self_, + ) + + testparameter_definitions_list_get_response_data_item_links_obj.additional_properties = ( + d + ) + return testparameter_definitions_list_get_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_meta.py new file mode 100644 index 00000000..fb97a532 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_meta.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameter_definitions_list_get_response_data_item_meta_errors_item import ( + TestparameterDefinitionsListGetResponseDataItemMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TestparameterDefinitionsListGetResponseDataItemMeta") + + +@_attrs_define +class TestparameterDefinitionsListGetResponseDataItemMeta: + """ + Attributes: + errors (Union[Unset, List['TestparameterDefinitionsListGetResponseDataItemMetaErrorsItem']]): + """ + + errors: Union[ + Unset, + List["TestparameterDefinitionsListGetResponseDataItemMetaErrorsItem"], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameter_definitions_list_get_response_data_item_meta_errors_item import ( + TestparameterDefinitionsListGetResponseDataItemMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = TestparameterDefinitionsListGetResponseDataItemMetaErrorsItem.from_dict( + errors_item_data + ) + + errors.append(errors_item) + + testparameter_definitions_list_get_response_data_item_meta_obj = cls( + errors=errors, + ) + + testparameter_definitions_list_get_response_data_item_meta_obj.additional_properties = ( + d + ) + return testparameter_definitions_list_get_response_data_item_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_meta_errors_item.py new file mode 100644 index 00000000..38551199 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_meta_errors_item.py @@ -0,0 +1,120 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameter_definitions_list_get_response_data_item_meta_errors_item_source import ( + TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSource, + ) + + +T = TypeVar( + "T", bound="TestparameterDefinitionsListGetResponseDataItemMetaErrorsItem" +) + + +@_attrs_define +class TestparameterDefinitionsListGetResponseDataItemMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, + "TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameter_definitions_list_get_response_data_item_meta_errors_item_source import ( + TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, + TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSource, + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSource.from_dict( + _source + ) + + testparameter_definitions_list_get_response_data_item_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + testparameter_definitions_list_get_response_data_item_meta_errors_item_obj.additional_properties = ( + d + ) + return testparameter_definitions_list_get_response_data_item_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_meta_errors_item_source.py new file mode 100644 index 00000000..ef95698b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_meta_errors_item_source.py @@ -0,0 +1,112 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameter_definitions_list_get_response_data_item_meta_errors_item_source_resource import ( + TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", + bound="TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSource", +) + + +@_attrs_define +class TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource + causing the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameter_definitions_list_get_response_data_item_meta_errors_item_source_resource import ( + TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + + testparameter_definitions_list_get_response_data_item_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + testparameter_definitions_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( + d + ) + return testparameter_definitions_list_get_response_data_item_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..a50ba68e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSourceResource", +) + + +@_attrs_define +class TestparameterDefinitionsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + testparameter_definitions_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + testparameter_definitions_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return testparameter_definitions_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_type.py new file mode 100644 index 00000000..96f4da4a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestparameterDefinitionsListGetResponseDataItemType(str, Enum): + TESTPARAMETER_DEFINITIONS = "testparameter_definitions" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_included_item.py new file mode 100644 index 00000000..52310159 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestparameterDefinitionsListGetResponseIncludedItem") + + +@_attrs_define +class TestparameterDefinitionsListGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + testparameter_definitions_list_get_response_included_item_obj = cls() + + testparameter_definitions_list_get_response_included_item_obj.additional_properties = ( + d + ) + return testparameter_definitions_list_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_links.py new file mode 100644 index 00000000..3a6728ab --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_links.py @@ -0,0 +1,106 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestparameterDefinitionsListGetResponseLinks") + + +@_attrs_define +class TestparameterDefinitionsListGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testparameterdefinitions?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testparameterdefinitions?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testparameterdefinitions?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testparameterdefinitions?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testparameterdefinitions?page%5Bsize%5D=10&page%5Bnumber%5D=9. + """ + + self_: Union[Unset, str] = UNSET + first: Union[Unset, str] = UNSET + prev: Union[Unset, str] = UNSET + next_: Union[Unset, str] = UNSET + last: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + first = self.first + + prev = self.prev + + next_ = self.next_ + + last = self.last + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if first is not UNSET: + field_dict["first"] = first + if prev is not UNSET: + field_dict["prev"] = prev + if next_ is not UNSET: + field_dict["next"] = next_ + if last is not UNSET: + field_dict["last"] = last + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + first = d.pop("first", UNSET) + + prev = d.pop("prev", UNSET) + + next_ = d.pop("next", UNSET) + + last = d.pop("last", UNSET) + + testparameter_definitions_list_get_response_links_obj = cls( + self_=self_, + first=first, + prev=prev, + next_=next_, + last=last, + ) + + testparameter_definitions_list_get_response_links_obj.additional_properties = ( + d + ) + return testparameter_definitions_list_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_meta.py new file mode 100644 index 00000000..1b321d16 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_get_response_meta.py @@ -0,0 +1,65 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestparameterDefinitionsListGetResponseMeta") + + +@_attrs_define +class TestparameterDefinitionsListGetResponseMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + testparameter_definitions_list_get_response_meta_obj = cls( + total_count=total_count, + ) + + testparameter_definitions_list_get_response_meta_obj.additional_properties = ( + d + ) + return testparameter_definitions_list_get_response_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_request.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_request.py new file mode 100644 index 00000000..ec9f989d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_request.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameter_definitions_list_post_request_data_item import ( + TestparameterDefinitionsListPostRequestDataItem, + ) + + +T = TypeVar("T", bound="TestparameterDefinitionsListPostRequest") + + +@_attrs_define +class TestparameterDefinitionsListPostRequest: + """ + Attributes: + data (Union[Unset, List['TestparameterDefinitionsListPostRequestDataItem']]): + """ + + data: Union[ + Unset, List["TestparameterDefinitionsListPostRequestDataItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameter_definitions_list_post_request_data_item import ( + TestparameterDefinitionsListPostRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = ( + TestparameterDefinitionsListPostRequestDataItem.from_dict( + data_item_data + ) + ) + + data.append(data_item) + + testparameter_definitions_list_post_request_obj = cls( + data=data, + ) + + testparameter_definitions_list_post_request_obj.additional_properties = ( + d + ) + return testparameter_definitions_list_post_request_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_request_data_item.py new file mode 100644 index 00000000..9ec372c0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_request_data_item.py @@ -0,0 +1,109 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testparameter_definitions_list_post_request_data_item_type import ( + TestparameterDefinitionsListPostRequestDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameter_definitions_list_post_request_data_item_attributes import ( + TestparameterDefinitionsListPostRequestDataItemAttributes, + ) + + +T = TypeVar("T", bound="TestparameterDefinitionsListPostRequestDataItem") + + +@_attrs_define +class TestparameterDefinitionsListPostRequestDataItem: + """ + Attributes: + type (Union[Unset, TestparameterDefinitionsListPostRequestDataItemType]): + attributes (Union[Unset, TestparameterDefinitionsListPostRequestDataItemAttributes]): + """ + + type: Union[ + Unset, TestparameterDefinitionsListPostRequestDataItemType + ] = UNSET + attributes: Union[ + Unset, "TestparameterDefinitionsListPostRequestDataItemAttributes" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameter_definitions_list_post_request_data_item_attributes import ( + TestparameterDefinitionsListPostRequestDataItemAttributes, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestparameterDefinitionsListPostRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestparameterDefinitionsListPostRequestDataItemType(_type) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TestparameterDefinitionsListPostRequestDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TestparameterDefinitionsListPostRequestDataItemAttributes.from_dict( + _attributes + ) + + testparameter_definitions_list_post_request_data_item_obj = cls( + type=type, + attributes=attributes, + ) + + testparameter_definitions_list_post_request_data_item_obj.additional_properties = ( + d + ) + return testparameter_definitions_list_post_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_request_data_item_attributes.py new file mode 100644 index 00000000..caa9027e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_request_data_item_attributes.py @@ -0,0 +1,67 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestparameterDefinitionsListPostRequestDataItemAttributes" +) + + +@_attrs_define +class TestparameterDefinitionsListPostRequestDataItemAttributes: + """ + Attributes: + name (Union[Unset, str]): Example: Test Parameter Definition example. + """ + + name: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name", UNSET) + + testparameter_definitions_list_post_request_data_item_attributes_obj = cls( + name=name, + ) + + testparameter_definitions_list_post_request_data_item_attributes_obj.additional_properties = ( + d + ) + return testparameter_definitions_list_post_request_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_request_data_item_type.py new file mode 100644 index 00000000..2ab9bf1c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestparameterDefinitionsListPostRequestDataItemType(str, Enum): + TESTPARAMETER_DEFINITIONS = "testparameter_definitions" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_response.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_response.py new file mode 100644 index 00000000..ea17d696 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_response.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameter_definitions_list_post_response_data_item import ( + TestparameterDefinitionsListPostResponseDataItem, + ) + + +T = TypeVar("T", bound="TestparameterDefinitionsListPostResponse") + + +@_attrs_define +class TestparameterDefinitionsListPostResponse: + """ + Attributes: + data (Union[Unset, List['TestparameterDefinitionsListPostResponseDataItem']]): + """ + + data: Union[ + Unset, List["TestparameterDefinitionsListPostResponseDataItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameter_definitions_list_post_response_data_item import ( + TestparameterDefinitionsListPostResponseDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = ( + TestparameterDefinitionsListPostResponseDataItem.from_dict( + data_item_data + ) + ) + + data.append(data_item) + + testparameter_definitions_list_post_response_obj = cls( + data=data, + ) + + testparameter_definitions_list_post_response_obj.additional_properties = ( + d + ) + return testparameter_definitions_list_post_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_response_data_item.py new file mode 100644 index 00000000..0eaee120 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_response_data_item.py @@ -0,0 +1,120 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testparameter_definitions_list_post_response_data_item_type import ( + TestparameterDefinitionsListPostResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameter_definitions_list_post_response_data_item_links import ( + TestparameterDefinitionsListPostResponseDataItemLinks, + ) + + +T = TypeVar("T", bound="TestparameterDefinitionsListPostResponseDataItem") + + +@_attrs_define +class TestparameterDefinitionsListPostResponseDataItem: + """ + Attributes: + type (Union[Unset, TestparameterDefinitionsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestParamDefinition. + links (Union[Unset, TestparameterDefinitionsListPostResponseDataItemLinks]): + """ + + type: Union[ + Unset, TestparameterDefinitionsListPostResponseDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + links: Union[ + Unset, "TestparameterDefinitionsListPostResponseDataItemLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameter_definitions_list_post_response_data_item_links import ( + TestparameterDefinitionsListPostResponseDataItemLinks, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestparameterDefinitionsListPostResponseDataItemType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestparameterDefinitionsListPostResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[ + Unset, TestparameterDefinitionsListPostResponseDataItemLinks + ] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestparameterDefinitionsListPostResponseDataItemLinks.from_dict( + _links + ) + + testparameter_definitions_list_post_response_data_item_obj = cls( + type=type, + id=id, + links=links, + ) + + testparameter_definitions_list_post_response_data_item_obj.additional_properties = ( + d + ) + return testparameter_definitions_list_post_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_response_data_item_links.py new file mode 100644 index 00000000..38d8ff69 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestparameterDefinitionsListPostResponseDataItemLinks") + + +@_attrs_define +class TestparameterDefinitionsListPostResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testparameterdefinitions/MyTestParamDefinition. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testparameter_definitions_list_post_response_data_item_links_obj = cls( + self_=self_, + ) + + testparameter_definitions_list_post_response_data_item_links_obj.additional_properties = ( + d + ) + return testparameter_definitions_list_post_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_response_data_item_type.py new file mode 100644 index 00000000..68a15ea9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_list_post_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestparameterDefinitionsListPostResponseDataItemType(str, Enum): + TESTPARAMETER_DEFINITIONS = "testparameter_definitions" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response.py new file mode 100644 index 00000000..af438bb0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response.py @@ -0,0 +1,141 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameter_definitions_single_get_response_data import ( + TestparameterDefinitionsSingleGetResponseData, + ) + from ..models.testparameter_definitions_single_get_response_included_item import ( + TestparameterDefinitionsSingleGetResponseIncludedItem, + ) + from ..models.testparameter_definitions_single_get_response_links import ( + TestparameterDefinitionsSingleGetResponseLinks, + ) + + +T = TypeVar("T", bound="TestparameterDefinitionsSingleGetResponse") + + +@_attrs_define +class TestparameterDefinitionsSingleGetResponse: + """ + Attributes: + data (Union[Unset, TestparameterDefinitionsSingleGetResponseData]): + included (Union[Unset, List['TestparameterDefinitionsSingleGetResponseIncludedItem']]): Related entities might + be returned, see Rest API User Guide. + links (Union[Unset, TestparameterDefinitionsSingleGetResponseLinks]): + """ + + data: Union[Unset, "TestparameterDefinitionsSingleGetResponseData"] = UNSET + included: Union[ + Unset, List["TestparameterDefinitionsSingleGetResponseIncludedItem"] + ] = UNSET + links: Union[ + Unset, "TestparameterDefinitionsSingleGetResponseLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameter_definitions_single_get_response_data import ( + TestparameterDefinitionsSingleGetResponseData, + ) + from ..models.testparameter_definitions_single_get_response_included_item import ( + TestparameterDefinitionsSingleGetResponseIncludedItem, + ) + from ..models.testparameter_definitions_single_get_response_links import ( + TestparameterDefinitionsSingleGetResponseLinks, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, TestparameterDefinitionsSingleGetResponseData] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestparameterDefinitionsSingleGetResponseData.from_dict( + _data + ) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = TestparameterDefinitionsSingleGetResponseIncludedItem.from_dict( + included_item_data + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestparameterDefinitionsSingleGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestparameterDefinitionsSingleGetResponseLinks.from_dict( + _links + ) + + testparameter_definitions_single_get_response_obj = cls( + data=data, + included=included, + links=links, + ) + + testparameter_definitions_single_get_response_obj.additional_properties = ( + d + ) + return testparameter_definitions_single_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data.py new file mode 100644 index 00000000..f84b9de9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data.py @@ -0,0 +1,181 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testparameter_definitions_single_get_response_data_type import ( + TestparameterDefinitionsSingleGetResponseDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameter_definitions_single_get_response_data_attributes import ( + TestparameterDefinitionsSingleGetResponseDataAttributes, + ) + from ..models.testparameter_definitions_single_get_response_data_links import ( + TestparameterDefinitionsSingleGetResponseDataLinks, + ) + from ..models.testparameter_definitions_single_get_response_data_meta import ( + TestparameterDefinitionsSingleGetResponseDataMeta, + ) + + +T = TypeVar("T", bound="TestparameterDefinitionsSingleGetResponseData") + + +@_attrs_define +class TestparameterDefinitionsSingleGetResponseData: + """ + Attributes: + type (Union[Unset, TestparameterDefinitionsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestParamDefinition. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TestparameterDefinitionsSingleGetResponseDataAttributes]): + meta (Union[Unset, TestparameterDefinitionsSingleGetResponseDataMeta]): + links (Union[Unset, TestparameterDefinitionsSingleGetResponseDataLinks]): + """ + + type: Union[ + Unset, TestparameterDefinitionsSingleGetResponseDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestparameterDefinitionsSingleGetResponseDataAttributes" + ] = UNSET + meta: Union[ + Unset, "TestparameterDefinitionsSingleGetResponseDataMeta" + ] = UNSET + links: Union[ + Unset, "TestparameterDefinitionsSingleGetResponseDataLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameter_definitions_single_get_response_data_attributes import ( + TestparameterDefinitionsSingleGetResponseDataAttributes, + ) + from ..models.testparameter_definitions_single_get_response_data_links import ( + TestparameterDefinitionsSingleGetResponseDataLinks, + ) + from ..models.testparameter_definitions_single_get_response_data_meta import ( + TestparameterDefinitionsSingleGetResponseDataMeta, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestparameterDefinitionsSingleGetResponseDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestparameterDefinitionsSingleGetResponseDataType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TestparameterDefinitionsSingleGetResponseDataAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TestparameterDefinitionsSingleGetResponseDataAttributes.from_dict( + _attributes + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestparameterDefinitionsSingleGetResponseDataMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestparameterDefinitionsSingleGetResponseDataMeta.from_dict( + _meta + ) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestparameterDefinitionsSingleGetResponseDataLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = ( + TestparameterDefinitionsSingleGetResponseDataLinks.from_dict( + _links + ) + ) + + testparameter_definitions_single_get_response_data_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + meta=meta, + links=links, + ) + + testparameter_definitions_single_get_response_data_obj.additional_properties = ( + d + ) + return testparameter_definitions_single_get_response_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_attributes.py new file mode 100644 index 00000000..32ac5258 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_attributes.py @@ -0,0 +1,71 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestparameterDefinitionsSingleGetResponseDataAttributes" +) + + +@_attrs_define +class TestparameterDefinitionsSingleGetResponseDataAttributes: + """ + Attributes: + name (Union[Unset, str]): Example: Test Parameter Definition example. + """ + + name: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name", UNSET) + + testparameter_definitions_single_get_response_data_attributes_obj = ( + cls( + name=name, + ) + ) + + testparameter_definitions_single_get_response_data_attributes_obj.additional_properties = ( + d + ) + return ( + testparameter_definitions_single_get_response_data_attributes_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_links.py new file mode 100644 index 00000000..ec89911f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestparameterDefinitionsSingleGetResponseDataLinks") + + +@_attrs_define +class TestparameterDefinitionsSingleGetResponseDataLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testparameterdefinitions/MyTestParamDefinition. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testparameter_definitions_single_get_response_data_links_obj = cls( + self_=self_, + ) + + testparameter_definitions_single_get_response_data_links_obj.additional_properties = ( + d + ) + return testparameter_definitions_single_get_response_data_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_meta.py new file mode 100644 index 00000000..c648d72a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_meta.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameter_definitions_single_get_response_data_meta_errors_item import ( + TestparameterDefinitionsSingleGetResponseDataMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TestparameterDefinitionsSingleGetResponseDataMeta") + + +@_attrs_define +class TestparameterDefinitionsSingleGetResponseDataMeta: + """ + Attributes: + errors (Union[Unset, List['TestparameterDefinitionsSingleGetResponseDataMetaErrorsItem']]): + """ + + errors: Union[ + Unset, + List["TestparameterDefinitionsSingleGetResponseDataMetaErrorsItem"], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameter_definitions_single_get_response_data_meta_errors_item import ( + TestparameterDefinitionsSingleGetResponseDataMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = TestparameterDefinitionsSingleGetResponseDataMetaErrorsItem.from_dict( + errors_item_data + ) + + errors.append(errors_item) + + testparameter_definitions_single_get_response_data_meta_obj = cls( + errors=errors, + ) + + testparameter_definitions_single_get_response_data_meta_obj.additional_properties = ( + d + ) + return testparameter_definitions_single_get_response_data_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_meta_errors_item.py new file mode 100644 index 00000000..52316cbd --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_meta_errors_item.py @@ -0,0 +1,120 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameter_definitions_single_get_response_data_meta_errors_item_source import ( + TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSource, + ) + + +T = TypeVar( + "T", bound="TestparameterDefinitionsSingleGetResponseDataMetaErrorsItem" +) + + +@_attrs_define +class TestparameterDefinitionsSingleGetResponseDataMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, + "TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameter_definitions_single_get_response_data_meta_errors_item_source import ( + TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, + TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSource, + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSource.from_dict( + _source + ) + + testparameter_definitions_single_get_response_data_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + testparameter_definitions_single_get_response_data_meta_errors_item_obj.additional_properties = ( + d + ) + return testparameter_definitions_single_get_response_data_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_meta_errors_item_source.py new file mode 100644 index 00000000..b5c4ba65 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_meta_errors_item_source.py @@ -0,0 +1,112 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameter_definitions_single_get_response_data_meta_errors_item_source_resource import ( + TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", + bound="TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSource", +) + + +@_attrs_define +class TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource + causing the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameter_definitions_single_get_response_data_meta_errors_item_source_resource import ( + TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + + testparameter_definitions_single_get_response_data_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + testparameter_definitions_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( + d + ) + return testparameter_definitions_single_get_response_data_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..3adef100 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSourceResource", +) + + +@_attrs_define +class TestparameterDefinitionsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + testparameter_definitions_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + testparameter_definitions_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return testparameter_definitions_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_type.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_type.py new file mode 100644 index 00000000..ed6350c2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestparameterDefinitionsSingleGetResponseDataType(str, Enum): + TESTPARAMETER_DEFINITIONS = "testparameter_definitions" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_included_item.py new file mode 100644 index 00000000..f4d029f5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestparameterDefinitionsSingleGetResponseIncludedItem") + + +@_attrs_define +class TestparameterDefinitionsSingleGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + testparameter_definitions_single_get_response_included_item_obj = cls() + + testparameter_definitions_single_get_response_included_item_obj.additional_properties = ( + d + ) + return testparameter_definitions_single_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_links.py new file mode 100644 index 00000000..f0075eeb --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameter_definitions_single_get_response_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestparameterDefinitionsSingleGetResponseLinks") + + +@_attrs_define +class TestparameterDefinitionsSingleGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testparameterdefinitions/MyTestParamDefinition. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testparameter_definitions_single_get_response_links_obj = cls( + self_=self_, + ) + + testparameter_definitions_single_get_response_links_obj.additional_properties = ( + d + ) + return testparameter_definitions_single_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response.py new file mode 100644 index 00000000..cc7132af --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response.py @@ -0,0 +1,162 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameters_list_get_response_data_item import ( + TestparametersListGetResponseDataItem, + ) + from ..models.testparameters_list_get_response_included_item import ( + TestparametersListGetResponseIncludedItem, + ) + from ..models.testparameters_list_get_response_links import ( + TestparametersListGetResponseLinks, + ) + from ..models.testparameters_list_get_response_meta import ( + TestparametersListGetResponseMeta, + ) + + +T = TypeVar("T", bound="TestparametersListGetResponse") + + +@_attrs_define +class TestparametersListGetResponse: + """ + Attributes: + meta (Union[Unset, TestparametersListGetResponseMeta]): + data (Union[Unset, List['TestparametersListGetResponseDataItem']]): + included (Union[Unset, List['TestparametersListGetResponseIncludedItem']]): Related entities might be returned, + see Rest API + User Guide. + links (Union[Unset, TestparametersListGetResponseLinks]): + """ + + meta: Union[Unset, "TestparametersListGetResponseMeta"] = UNSET + data: Union[Unset, List["TestparametersListGetResponseDataItem"]] = UNSET + included: Union[ + Unset, List["TestparametersListGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "TestparametersListGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameters_list_get_response_data_item import ( + TestparametersListGetResponseDataItem, + ) + from ..models.testparameters_list_get_response_included_item import ( + TestparametersListGetResponseIncludedItem, + ) + from ..models.testparameters_list_get_response_links import ( + TestparametersListGetResponseLinks, + ) + from ..models.testparameters_list_get_response_meta import ( + TestparametersListGetResponseMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestparametersListGetResponseMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestparametersListGetResponseMeta.from_dict(_meta) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestparametersListGetResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + TestparametersListGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestparametersListGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestparametersListGetResponseLinks.from_dict(_links) + + testparameters_list_get_response_obj = cls( + meta=meta, + data=data, + included=included, + links=links, + ) + + testparameters_list_get_response_obj.additional_properties = d + return testparameters_list_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item.py new file mode 100644 index 00000000..c3a3a731 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item.py @@ -0,0 +1,203 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testparameters_list_get_response_data_item_type import ( + TestparametersListGetResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameters_list_get_response_data_item_attributes import ( + TestparametersListGetResponseDataItemAttributes, + ) + from ..models.testparameters_list_get_response_data_item_links import ( + TestparametersListGetResponseDataItemLinks, + ) + from ..models.testparameters_list_get_response_data_item_meta import ( + TestparametersListGetResponseDataItemMeta, + ) + from ..models.testparameters_list_get_response_data_item_relationships import ( + TestparametersListGetResponseDataItemRelationships, + ) + + +T = TypeVar("T", bound="TestparametersListGetResponseDataItem") + + +@_attrs_define +class TestparametersListGetResponseDataItem: + """ + Attributes: + type (Union[Unset, TestparametersListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyTestParameter. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TestparametersListGetResponseDataItemAttributes]): + relationships (Union[Unset, TestparametersListGetResponseDataItemRelationships]): + meta (Union[Unset, TestparametersListGetResponseDataItemMeta]): + links (Union[Unset, TestparametersListGetResponseDataItemLinks]): + """ + + type: Union[Unset, TestparametersListGetResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestparametersListGetResponseDataItemAttributes" + ] = UNSET + relationships: Union[ + Unset, "TestparametersListGetResponseDataItemRelationships" + ] = UNSET + meta: Union[Unset, "TestparametersListGetResponseDataItemMeta"] = UNSET + links: Union[Unset, "TestparametersListGetResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameters_list_get_response_data_item_attributes import ( + TestparametersListGetResponseDataItemAttributes, + ) + from ..models.testparameters_list_get_response_data_item_links import ( + TestparametersListGetResponseDataItemLinks, + ) + from ..models.testparameters_list_get_response_data_item_meta import ( + TestparametersListGetResponseDataItemMeta, + ) + from ..models.testparameters_list_get_response_data_item_relationships import ( + TestparametersListGetResponseDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestparametersListGetResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestparametersListGetResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TestparametersListGetResponseDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + TestparametersListGetResponseDataItemAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TestparametersListGetResponseDataItemRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + TestparametersListGetResponseDataItemRelationships.from_dict( + _relationships + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestparametersListGetResponseDataItemMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestparametersListGetResponseDataItemMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestparametersListGetResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestparametersListGetResponseDataItemLinks.from_dict( + _links + ) + + testparameters_list_get_response_data_item_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + testparameters_list_get_response_data_item_obj.additional_properties = ( + d + ) + return testparameters_list_get_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_attributes.py new file mode 100644 index 00000000..f5fbfbfa --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_attributes.py @@ -0,0 +1,74 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestparametersListGetResponseDataItemAttributes") + + +@_attrs_define +class TestparametersListGetResponseDataItemAttributes: + """ + Attributes: + name (Union[Unset, str]): Example: Example Test Parameter value. + value (Union[Unset, str]): Example: Example Test Parameter value. + """ + + name: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + 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: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name", UNSET) + + value = d.pop("value", UNSET) + + testparameters_list_get_response_data_item_attributes_obj = cls( + name=name, + value=value, + ) + + testparameters_list_get_response_data_item_attributes_obj.additional_properties = ( + d + ) + return testparameters_list_get_response_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_links.py new file mode 100644 index 00000000..194681fb --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestparametersListGetResponseDataItemLinks") + + +@_attrs_define +class TestparametersListGetResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/testparameters/MyTestParameter. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testparameters_list_get_response_data_item_links_obj = cls( + self_=self_, + ) + + testparameters_list_get_response_data_item_links_obj.additional_properties = ( + d + ) + return testparameters_list_get_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_meta.py new file mode 100644 index 00000000..54e73cdd --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_meta.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameters_list_get_response_data_item_meta_errors_item import ( + TestparametersListGetResponseDataItemMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TestparametersListGetResponseDataItemMeta") + + +@_attrs_define +class TestparametersListGetResponseDataItemMeta: + """ + Attributes: + errors (Union[Unset, List['TestparametersListGetResponseDataItemMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["TestparametersListGetResponseDataItemMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameters_list_get_response_data_item_meta_errors_item import ( + TestparametersListGetResponseDataItemMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ( + TestparametersListGetResponseDataItemMetaErrorsItem.from_dict( + errors_item_data + ) + ) + + errors.append(errors_item) + + testparameters_list_get_response_data_item_meta_obj = cls( + errors=errors, + ) + + testparameters_list_get_response_data_item_meta_obj.additional_properties = ( + d + ) + return testparameters_list_get_response_data_item_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_meta_errors_item.py new file mode 100644 index 00000000..b639bc7a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_meta_errors_item.py @@ -0,0 +1,116 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameters_list_get_response_data_item_meta_errors_item_source import ( + TestparametersListGetResponseDataItemMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="TestparametersListGetResponseDataItemMetaErrorsItem") + + +@_attrs_define +class TestparametersListGetResponseDataItemMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TestparametersListGetResponseDataItemMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "TestparametersListGetResponseDataItemMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameters_list_get_response_data_item_meta_errors_item_source import ( + TestparametersListGetResponseDataItemMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, TestparametersListGetResponseDataItemMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = TestparametersListGetResponseDataItemMetaErrorsItemSource.from_dict( + _source + ) + + testparameters_list_get_response_data_item_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + testparameters_list_get_response_data_item_meta_errors_item_obj.additional_properties = ( + d + ) + return testparameters_list_get_response_data_item_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_meta_errors_item_source.py new file mode 100644 index 00000000..c08e4e62 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_meta_errors_item_source.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameters_list_get_response_data_item_meta_errors_item_source_resource import ( + TestparametersListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", bound="TestparametersListGetResponseDataItemMetaErrorsItemSource" +) + + +@_attrs_define +class TestparametersListGetResponseDataItemMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TestparametersListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing the + error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "TestparametersListGetResponseDataItemMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameters_list_get_response_data_item_meta_errors_item_source_resource import ( + TestparametersListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + TestparametersListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TestparametersListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + + testparameters_list_get_response_data_item_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + testparameters_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( + d + ) + return testparameters_list_get_response_data_item_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..cc7e0d50 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestparametersListGetResponseDataItemMetaErrorsItemSourceResource", +) + + +@_attrs_define +class TestparametersListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + testparameters_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + testparameters_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return testparameters_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_relationships.py new file mode 100644 index 00000000..d86af46b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_relationships.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameters_list_get_response_data_item_relationships_definition import ( + TestparametersListGetResponseDataItemRelationshipsDefinition, + ) + + +T = TypeVar("T", bound="TestparametersListGetResponseDataItemRelationships") + + +@_attrs_define +class TestparametersListGetResponseDataItemRelationships: + """ + Attributes: + definition (Union[Unset, TestparametersListGetResponseDataItemRelationshipsDefinition]): + """ + + definition: Union[ + Unset, "TestparametersListGetResponseDataItemRelationshipsDefinition" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + definition: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.definition, Unset): + definition = self.definition.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if definition is not UNSET: + field_dict["definition"] = definition + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameters_list_get_response_data_item_relationships_definition import ( + TestparametersListGetResponseDataItemRelationshipsDefinition, + ) + + d = src_dict.copy() + _definition = d.pop("definition", UNSET) + definition: Union[ + Unset, TestparametersListGetResponseDataItemRelationshipsDefinition + ] + if isinstance(_definition, Unset): + definition = UNSET + else: + definition = TestparametersListGetResponseDataItemRelationshipsDefinition.from_dict( + _definition + ) + + testparameters_list_get_response_data_item_relationships_obj = cls( + definition=definition, + ) + + testparameters_list_get_response_data_item_relationships_obj.additional_properties = ( + d + ) + return testparameters_list_get_response_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_relationships_definition.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_relationships_definition.py new file mode 100644 index 00000000..8e680c86 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_relationships_definition.py @@ -0,0 +1,92 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameters_list_get_response_data_item_relationships_definition_data import ( + TestparametersListGetResponseDataItemRelationshipsDefinitionData, + ) + + +T = TypeVar( + "T", bound="TestparametersListGetResponseDataItemRelationshipsDefinition" +) + + +@_attrs_define +class TestparametersListGetResponseDataItemRelationshipsDefinition: + """ + Attributes: + data (Union[Unset, TestparametersListGetResponseDataItemRelationshipsDefinitionData]): + """ + + data: Union[ + Unset, + "TestparametersListGetResponseDataItemRelationshipsDefinitionData", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameters_list_get_response_data_item_relationships_definition_data import ( + TestparametersListGetResponseDataItemRelationshipsDefinitionData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestparametersListGetResponseDataItemRelationshipsDefinitionData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestparametersListGetResponseDataItemRelationshipsDefinitionData.from_dict( + _data + ) + + testparameters_list_get_response_data_item_relationships_definition_obj = cls( + data=data, + ) + + testparameters_list_get_response_data_item_relationships_definition_obj.additional_properties = ( + d + ) + return testparameters_list_get_response_data_item_relationships_definition_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_relationships_definition_data.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_relationships_definition_data.py new file mode 100644 index 00000000..9130f80d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_relationships_definition_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testparameters_list_get_response_data_item_relationships_definition_data_type import ( + TestparametersListGetResponseDataItemRelationshipsDefinitionDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestparametersListGetResponseDataItemRelationshipsDefinitionData", +) + + +@_attrs_define +class TestparametersListGetResponseDataItemRelationshipsDefinitionData: + """ + Attributes: + type (Union[Unset, TestparametersListGetResponseDataItemRelationshipsDefinitionDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestParamDefinition. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestparametersListGetResponseDataItemRelationshipsDefinitionDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestparametersListGetResponseDataItemRelationshipsDefinitionDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestparametersListGetResponseDataItemRelationshipsDefinitionDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testparameters_list_get_response_data_item_relationships_definition_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testparameters_list_get_response_data_item_relationships_definition_data_obj.additional_properties = ( + d + ) + return testparameters_list_get_response_data_item_relationships_definition_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_relationships_definition_data_type.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_relationships_definition_data_type.py new file mode 100644 index 00000000..dce6efb1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_relationships_definition_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestparametersListGetResponseDataItemRelationshipsDefinitionDataType( + str, Enum +): + TESTPARAMETER_DEFINITIONS = "testparameter_definitions" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_type.py new file mode 100644 index 00000000..b2700573 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestparametersListGetResponseDataItemType(str, Enum): + TESTPARAMETERS = "testparameters" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_included_item.py new file mode 100644 index 00000000..fa2ca5df --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestparametersListGetResponseIncludedItem") + + +@_attrs_define +class TestparametersListGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + testparameters_list_get_response_included_item_obj = cls() + + testparameters_list_get_response_included_item_obj.additional_properties = ( + d + ) + return testparameters_list_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_links.py new file mode 100644 index 00000000..05fbe1cb --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_links.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestparametersListGetResponseLinks") + + +@_attrs_define +class TestparametersListGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/testparameters?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/testparameters?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/testparameters?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/testparameters?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/testparameters?page%5Bsize%5D=10&page%5Bnumber%5D=9. + """ + + self_: Union[Unset, str] = UNSET + first: Union[Unset, str] = UNSET + prev: Union[Unset, str] = UNSET + next_: Union[Unset, str] = UNSET + last: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + first = self.first + + prev = self.prev + + next_ = self.next_ + + last = self.last + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if first is not UNSET: + field_dict["first"] = first + if prev is not UNSET: + field_dict["prev"] = prev + if next_ is not UNSET: + field_dict["next"] = next_ + if last is not UNSET: + field_dict["last"] = last + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + first = d.pop("first", UNSET) + + prev = d.pop("prev", UNSET) + + next_ = d.pop("next", UNSET) + + last = d.pop("last", UNSET) + + testparameters_list_get_response_links_obj = cls( + self_=self_, + first=first, + prev=prev, + next_=next_, + last=last, + ) + + testparameters_list_get_response_links_obj.additional_properties = d + return testparameters_list_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_meta.py new file mode 100644 index 00000000..821ae1cd --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_get_response_meta.py @@ -0,0 +1,63 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestparametersListGetResponseMeta") + + +@_attrs_define +class TestparametersListGetResponseMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + testparameters_list_get_response_meta_obj = cls( + total_count=total_count, + ) + + testparameters_list_get_response_meta_obj.additional_properties = d + return testparameters_list_get_response_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_post_request.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_post_request.py new file mode 100644 index 00000000..61c93089 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_post_request.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameters_list_post_request_data_item import ( + TestparametersListPostRequestDataItem, + ) + + +T = TypeVar("T", bound="TestparametersListPostRequest") + + +@_attrs_define +class TestparametersListPostRequest: + """ + Attributes: + data (Union[Unset, List['TestparametersListPostRequestDataItem']]): + """ + + data: Union[Unset, List["TestparametersListPostRequestDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameters_list_post_request_data_item import ( + TestparametersListPostRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestparametersListPostRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + testparameters_list_post_request_obj = cls( + data=data, + ) + + testparameters_list_post_request_obj.additional_properties = d + return testparameters_list_post_request_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_post_request_data_item.py new file mode 100644 index 00000000..126c3d1f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_post_request_data_item.py @@ -0,0 +1,109 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testparameters_list_post_request_data_item_type import ( + TestparametersListPostRequestDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameters_list_post_request_data_item_attributes import ( + TestparametersListPostRequestDataItemAttributes, + ) + + +T = TypeVar("T", bound="TestparametersListPostRequestDataItem") + + +@_attrs_define +class TestparametersListPostRequestDataItem: + """ + Attributes: + type (Union[Unset, TestparametersListPostRequestDataItemType]): + attributes (Union[Unset, TestparametersListPostRequestDataItemAttributes]): + """ + + type: Union[Unset, TestparametersListPostRequestDataItemType] = UNSET + attributes: Union[ + Unset, "TestparametersListPostRequestDataItemAttributes" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameters_list_post_request_data_item_attributes import ( + TestparametersListPostRequestDataItemAttributes, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestparametersListPostRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestparametersListPostRequestDataItemType(_type) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TestparametersListPostRequestDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + TestparametersListPostRequestDataItemAttributes.from_dict( + _attributes + ) + ) + + testparameters_list_post_request_data_item_obj = cls( + type=type, + attributes=attributes, + ) + + testparameters_list_post_request_data_item_obj.additional_properties = ( + d + ) + return testparameters_list_post_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_post_request_data_item_attributes.py new file mode 100644 index 00000000..a8424ad9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_post_request_data_item_attributes.py @@ -0,0 +1,74 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestparametersListPostRequestDataItemAttributes") + + +@_attrs_define +class TestparametersListPostRequestDataItemAttributes: + """ + Attributes: + name (Union[Unset, str]): Example: Example Test Parameter value. + value (Union[Unset, str]): Example: Example Test Parameter value. + """ + + name: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + 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: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name", UNSET) + + value = d.pop("value", UNSET) + + testparameters_list_post_request_data_item_attributes_obj = cls( + name=name, + value=value, + ) + + testparameters_list_post_request_data_item_attributes_obj.additional_properties = ( + d + ) + return testparameters_list_post_request_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_post_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_post_request_data_item_type.py new file mode 100644 index 00000000..715f0cb3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_post_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestparametersListPostRequestDataItemType(str, Enum): + TESTPARAMETERS = "testparameters" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testparameters_list_post_response.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_post_response.py new file mode 100644 index 00000000..7aa767f1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_post_response.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameters_list_post_response_data_item import ( + TestparametersListPostResponseDataItem, + ) + + +T = TypeVar("T", bound="TestparametersListPostResponse") + + +@_attrs_define +class TestparametersListPostResponse: + """ + Attributes: + data (Union[Unset, List['TestparametersListPostResponseDataItem']]): + """ + + data: Union[Unset, List["TestparametersListPostResponseDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameters_list_post_response_data_item import ( + TestparametersListPostResponseDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestparametersListPostResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + testparameters_list_post_response_obj = cls( + data=data, + ) + + testparameters_list_post_response_obj.additional_properties = d + return testparameters_list_post_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_post_response_data_item.py new file mode 100644 index 00000000..af3176e7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_post_response_data_item.py @@ -0,0 +1,112 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testparameters_list_post_response_data_item_type import ( + TestparametersListPostResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameters_list_post_response_data_item_links import ( + TestparametersListPostResponseDataItemLinks, + ) + + +T = TypeVar("T", bound="TestparametersListPostResponseDataItem") + + +@_attrs_define +class TestparametersListPostResponseDataItem: + """ + Attributes: + type (Union[Unset, TestparametersListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyTestParameter. + links (Union[Unset, TestparametersListPostResponseDataItemLinks]): + """ + + type: Union[Unset, TestparametersListPostResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + links: Union[Unset, "TestparametersListPostResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameters_list_post_response_data_item_links import ( + TestparametersListPostResponseDataItemLinks, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestparametersListPostResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestparametersListPostResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestparametersListPostResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestparametersListPostResponseDataItemLinks.from_dict( + _links + ) + + testparameters_list_post_response_data_item_obj = cls( + type=type, + id=id, + links=links, + ) + + testparameters_list_post_response_data_item_obj.additional_properties = ( + d + ) + return testparameters_list_post_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_post_response_data_item_links.py new file mode 100644 index 00000000..e88645a0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_post_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestparametersListPostResponseDataItemLinks") + + +@_attrs_define +class TestparametersListPostResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/testparameters/MyTestParameter. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testparameters_list_post_response_data_item_links_obj = cls( + self_=self_, + ) + + testparameters_list_post_response_data_item_links_obj.additional_properties = ( + d + ) + return testparameters_list_post_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_list_post_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testparameters_list_post_response_data_item_type.py new file mode 100644 index 00000000..95bdd7ca --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_list_post_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestparametersListPostResponseDataItemType(str, Enum): + TESTPARAMETERS = "testparameters" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response.py b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response.py new file mode 100644 index 00000000..775d7001 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response.py @@ -0,0 +1,135 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameters_single_get_response_data import ( + TestparametersSingleGetResponseData, + ) + from ..models.testparameters_single_get_response_included_item import ( + TestparametersSingleGetResponseIncludedItem, + ) + from ..models.testparameters_single_get_response_links import ( + TestparametersSingleGetResponseLinks, + ) + + +T = TypeVar("T", bound="TestparametersSingleGetResponse") + + +@_attrs_define +class TestparametersSingleGetResponse: + """ + Attributes: + data (Union[Unset, TestparametersSingleGetResponseData]): + included (Union[Unset, List['TestparametersSingleGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, TestparametersSingleGetResponseLinks]): + """ + + data: Union[Unset, "TestparametersSingleGetResponseData"] = UNSET + included: Union[ + Unset, List["TestparametersSingleGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "TestparametersSingleGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameters_single_get_response_data import ( + TestparametersSingleGetResponseData, + ) + from ..models.testparameters_single_get_response_included_item import ( + TestparametersSingleGetResponseIncludedItem, + ) + from ..models.testparameters_single_get_response_links import ( + TestparametersSingleGetResponseLinks, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, TestparametersSingleGetResponseData] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestparametersSingleGetResponseData.from_dict(_data) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + TestparametersSingleGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestparametersSingleGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestparametersSingleGetResponseLinks.from_dict(_links) + + testparameters_single_get_response_obj = cls( + data=data, + included=included, + links=links, + ) + + testparameters_single_get_response_obj.additional_properties = d + return testparameters_single_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data.py new file mode 100644 index 00000000..73a88198 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data.py @@ -0,0 +1,197 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testparameters_single_get_response_data_type import ( + TestparametersSingleGetResponseDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameters_single_get_response_data_attributes import ( + TestparametersSingleGetResponseDataAttributes, + ) + from ..models.testparameters_single_get_response_data_links import ( + TestparametersSingleGetResponseDataLinks, + ) + from ..models.testparameters_single_get_response_data_meta import ( + TestparametersSingleGetResponseDataMeta, + ) + from ..models.testparameters_single_get_response_data_relationships import ( + TestparametersSingleGetResponseDataRelationships, + ) + + +T = TypeVar("T", bound="TestparametersSingleGetResponseData") + + +@_attrs_define +class TestparametersSingleGetResponseData: + """ + Attributes: + type (Union[Unset, TestparametersSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyTestParameter. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TestparametersSingleGetResponseDataAttributes]): + relationships (Union[Unset, TestparametersSingleGetResponseDataRelationships]): + meta (Union[Unset, TestparametersSingleGetResponseDataMeta]): + links (Union[Unset, TestparametersSingleGetResponseDataLinks]): + """ + + type: Union[Unset, TestparametersSingleGetResponseDataType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestparametersSingleGetResponseDataAttributes" + ] = UNSET + relationships: Union[ + Unset, "TestparametersSingleGetResponseDataRelationships" + ] = UNSET + meta: Union[Unset, "TestparametersSingleGetResponseDataMeta"] = UNSET + links: Union[Unset, "TestparametersSingleGetResponseDataLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameters_single_get_response_data_attributes import ( + TestparametersSingleGetResponseDataAttributes, + ) + from ..models.testparameters_single_get_response_data_links import ( + TestparametersSingleGetResponseDataLinks, + ) + from ..models.testparameters_single_get_response_data_meta import ( + TestparametersSingleGetResponseDataMeta, + ) + from ..models.testparameters_single_get_response_data_relationships import ( + TestparametersSingleGetResponseDataRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestparametersSingleGetResponseDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestparametersSingleGetResponseDataType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, TestparametersSingleGetResponseDataAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + TestparametersSingleGetResponseDataAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TestparametersSingleGetResponseDataRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + TestparametersSingleGetResponseDataRelationships.from_dict( + _relationships + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestparametersSingleGetResponseDataMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestparametersSingleGetResponseDataMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestparametersSingleGetResponseDataLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestparametersSingleGetResponseDataLinks.from_dict(_links) + + testparameters_single_get_response_data_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + testparameters_single_get_response_data_obj.additional_properties = d + return testparameters_single_get_response_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_attributes.py new file mode 100644 index 00000000..e2f506a3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_attributes.py @@ -0,0 +1,74 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestparametersSingleGetResponseDataAttributes") + + +@_attrs_define +class TestparametersSingleGetResponseDataAttributes: + """ + Attributes: + name (Union[Unset, str]): Example: Example Test Parameter value. + value (Union[Unset, str]): Example: Example Test Parameter value. + """ + + name: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + 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: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name", UNSET) + + value = d.pop("value", UNSET) + + testparameters_single_get_response_data_attributes_obj = cls( + name=name, + value=value, + ) + + testparameters_single_get_response_data_attributes_obj.additional_properties = ( + d + ) + return testparameters_single_get_response_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_links.py new file mode 100644 index 00000000..a76ed18e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestparametersSingleGetResponseDataLinks") + + +@_attrs_define +class TestparametersSingleGetResponseDataLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/testparameters/MyTestParameter. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testparameters_single_get_response_data_links_obj = cls( + self_=self_, + ) + + testparameters_single_get_response_data_links_obj.additional_properties = ( + d + ) + return testparameters_single_get_response_data_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_meta.py new file mode 100644 index 00000000..56f4c16c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_meta.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameters_single_get_response_data_meta_errors_item import ( + TestparametersSingleGetResponseDataMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TestparametersSingleGetResponseDataMeta") + + +@_attrs_define +class TestparametersSingleGetResponseDataMeta: + """ + Attributes: + errors (Union[Unset, List['TestparametersSingleGetResponseDataMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["TestparametersSingleGetResponseDataMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameters_single_get_response_data_meta_errors_item import ( + TestparametersSingleGetResponseDataMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ( + TestparametersSingleGetResponseDataMetaErrorsItem.from_dict( + errors_item_data + ) + ) + + errors.append(errors_item) + + testparameters_single_get_response_data_meta_obj = cls( + errors=errors, + ) + + testparameters_single_get_response_data_meta_obj.additional_properties = ( + d + ) + return testparameters_single_get_response_data_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_meta_errors_item.py new file mode 100644 index 00000000..b4a8d56c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_meta_errors_item.py @@ -0,0 +1,116 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameters_single_get_response_data_meta_errors_item_source import ( + TestparametersSingleGetResponseDataMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="TestparametersSingleGetResponseDataMetaErrorsItem") + + +@_attrs_define +class TestparametersSingleGetResponseDataMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TestparametersSingleGetResponseDataMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "TestparametersSingleGetResponseDataMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameters_single_get_response_data_meta_errors_item_source import ( + TestparametersSingleGetResponseDataMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, TestparametersSingleGetResponseDataMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = TestparametersSingleGetResponseDataMetaErrorsItemSource.from_dict( + _source + ) + + testparameters_single_get_response_data_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + testparameters_single_get_response_data_meta_errors_item_obj.additional_properties = ( + d + ) + return testparameters_single_get_response_data_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_meta_errors_item_source.py new file mode 100644 index 00000000..14267964 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_meta_errors_item_source.py @@ -0,0 +1,115 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameters_single_get_response_data_meta_errors_item_source_resource import ( + TestparametersSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", bound="TestparametersSingleGetResponseDataMetaErrorsItemSource" +) + + +@_attrs_define +class TestparametersSingleGetResponseDataMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TestparametersSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the + error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "TestparametersSingleGetResponseDataMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameters_single_get_response_data_meta_errors_item_source_resource import ( + TestparametersSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + TestparametersSingleGetResponseDataMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TestparametersSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + + testparameters_single_get_response_data_meta_errors_item_source_obj = ( + cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + ) + + testparameters_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( + d + ) + return ( + testparameters_single_get_response_data_meta_errors_item_source_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..dc0b7cf5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestparametersSingleGetResponseDataMetaErrorsItemSourceResource", +) + + +@_attrs_define +class TestparametersSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + testparameters_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + testparameters_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return testparameters_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_relationships.py new file mode 100644 index 00000000..d58d69aa --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_relationships.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameters_single_get_response_data_relationships_definition import ( + TestparametersSingleGetResponseDataRelationshipsDefinition, + ) + + +T = TypeVar("T", bound="TestparametersSingleGetResponseDataRelationships") + + +@_attrs_define +class TestparametersSingleGetResponseDataRelationships: + """ + Attributes: + definition (Union[Unset, TestparametersSingleGetResponseDataRelationshipsDefinition]): + """ + + definition: Union[ + Unset, "TestparametersSingleGetResponseDataRelationshipsDefinition" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + definition: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.definition, Unset): + definition = self.definition.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if definition is not UNSET: + field_dict["definition"] = definition + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameters_single_get_response_data_relationships_definition import ( + TestparametersSingleGetResponseDataRelationshipsDefinition, + ) + + d = src_dict.copy() + _definition = d.pop("definition", UNSET) + definition: Union[ + Unset, TestparametersSingleGetResponseDataRelationshipsDefinition + ] + if isinstance(_definition, Unset): + definition = UNSET + else: + definition = TestparametersSingleGetResponseDataRelationshipsDefinition.from_dict( + _definition + ) + + testparameters_single_get_response_data_relationships_obj = cls( + definition=definition, + ) + + testparameters_single_get_response_data_relationships_obj.additional_properties = ( + d + ) + return testparameters_single_get_response_data_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_relationships_definition.py b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_relationships_definition.py new file mode 100644 index 00000000..7a8c2076 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_relationships_definition.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testparameters_single_get_response_data_relationships_definition_data import ( + TestparametersSingleGetResponseDataRelationshipsDefinitionData, + ) + + +T = TypeVar( + "T", bound="TestparametersSingleGetResponseDataRelationshipsDefinition" +) + + +@_attrs_define +class TestparametersSingleGetResponseDataRelationshipsDefinition: + """ + Attributes: + data (Union[Unset, TestparametersSingleGetResponseDataRelationshipsDefinitionData]): + """ + + data: Union[ + Unset, "TestparametersSingleGetResponseDataRelationshipsDefinitionData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testparameters_single_get_response_data_relationships_definition_data import ( + TestparametersSingleGetResponseDataRelationshipsDefinitionData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestparametersSingleGetResponseDataRelationshipsDefinitionData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestparametersSingleGetResponseDataRelationshipsDefinitionData.from_dict( + _data + ) + + testparameters_single_get_response_data_relationships_definition_obj = cls( + data=data, + ) + + testparameters_single_get_response_data_relationships_definition_obj.additional_properties = ( + d + ) + return testparameters_single_get_response_data_relationships_definition_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_relationships_definition_data.py b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_relationships_definition_data.py new file mode 100644 index 00000000..49b1b5f2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_relationships_definition_data.py @@ -0,0 +1,103 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testparameters_single_get_response_data_relationships_definition_data_type import ( + TestparametersSingleGetResponseDataRelationshipsDefinitionDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestparametersSingleGetResponseDataRelationshipsDefinitionData" +) + + +@_attrs_define +class TestparametersSingleGetResponseDataRelationshipsDefinitionData: + """ + Attributes: + type (Union[Unset, TestparametersSingleGetResponseDataRelationshipsDefinitionDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestParamDefinition. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestparametersSingleGetResponseDataRelationshipsDefinitionDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestparametersSingleGetResponseDataRelationshipsDefinitionDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestparametersSingleGetResponseDataRelationshipsDefinitionDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testparameters_single_get_response_data_relationships_definition_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testparameters_single_get_response_data_relationships_definition_data_obj.additional_properties = ( + d + ) + return testparameters_single_get_response_data_relationships_definition_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_relationships_definition_data_type.py b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_relationships_definition_data_type.py new file mode 100644 index 00000000..260146f4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_relationships_definition_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestparametersSingleGetResponseDataRelationshipsDefinitionDataType( + str, Enum +): + TESTPARAMETER_DEFINITIONS = "testparameter_definitions" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_type.py b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_type.py new file mode 100644 index 00000000..b0d2a0a2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestparametersSingleGetResponseDataType(str, Enum): + TESTPARAMETERS = "testparameters" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_included_item.py new file mode 100644 index 00000000..8af4d8ba --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestparametersSingleGetResponseIncludedItem") + + +@_attrs_define +class TestparametersSingleGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + testparameters_single_get_response_included_item_obj = cls() + + testparameters_single_get_response_included_item_obj.additional_properties = ( + d + ) + return testparameters_single_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_links.py new file mode 100644 index 00000000..2f8866f7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testparameters_single_get_response_links.py @@ -0,0 +1,64 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestparametersSingleGetResponseLinks") + + +@_attrs_define +class TestparametersSingleGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/testparameters/MyTestParameter. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testparameters_single_get_response_links_obj = cls( + self_=self_, + ) + + testparameters_single_get_response_links_obj.additional_properties = d + return testparameters_single_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response.py new file mode 100644 index 00000000..f1040e79 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response.py @@ -0,0 +1,164 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_list_get_response_data_item import ( + TestrecordAttachmentsListGetResponseDataItem, + ) + from ..models.testrecord_attachments_list_get_response_included_item import ( + TestrecordAttachmentsListGetResponseIncludedItem, + ) + from ..models.testrecord_attachments_list_get_response_links import ( + TestrecordAttachmentsListGetResponseLinks, + ) + from ..models.testrecord_attachments_list_get_response_meta import ( + TestrecordAttachmentsListGetResponseMeta, + ) + + +T = TypeVar("T", bound="TestrecordAttachmentsListGetResponse") + + +@_attrs_define +class TestrecordAttachmentsListGetResponse: + """ + Attributes: + meta (Union[Unset, TestrecordAttachmentsListGetResponseMeta]): + data (Union[Unset, List['TestrecordAttachmentsListGetResponseDataItem']]): + included (Union[Unset, List['TestrecordAttachmentsListGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, TestrecordAttachmentsListGetResponseLinks]): + """ + + meta: Union[Unset, "TestrecordAttachmentsListGetResponseMeta"] = UNSET + data: Union[ + Unset, List["TestrecordAttachmentsListGetResponseDataItem"] + ] = UNSET + included: Union[ + Unset, List["TestrecordAttachmentsListGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "TestrecordAttachmentsListGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_list_get_response_data_item import ( + TestrecordAttachmentsListGetResponseDataItem, + ) + from ..models.testrecord_attachments_list_get_response_included_item import ( + TestrecordAttachmentsListGetResponseIncludedItem, + ) + from ..models.testrecord_attachments_list_get_response_links import ( + TestrecordAttachmentsListGetResponseLinks, + ) + from ..models.testrecord_attachments_list_get_response_meta import ( + TestrecordAttachmentsListGetResponseMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestrecordAttachmentsListGetResponseMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrecordAttachmentsListGetResponseMeta.from_dict(_meta) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrecordAttachmentsListGetResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + TestrecordAttachmentsListGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrecordAttachmentsListGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrecordAttachmentsListGetResponseLinks.from_dict(_links) + + testrecord_attachments_list_get_response_obj = cls( + meta=meta, + data=data, + included=included, + links=links, + ) + + testrecord_attachments_list_get_response_obj.additional_properties = d + return testrecord_attachments_list_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item.py new file mode 100644 index 00000000..7ccaec7e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item.py @@ -0,0 +1,209 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecord_attachments_list_get_response_data_item_type import ( + TestrecordAttachmentsListGetResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_list_get_response_data_item_attributes import ( + TestrecordAttachmentsListGetResponseDataItemAttributes, + ) + from ..models.testrecord_attachments_list_get_response_data_item_links import ( + TestrecordAttachmentsListGetResponseDataItemLinks, + ) + from ..models.testrecord_attachments_list_get_response_data_item_meta import ( + TestrecordAttachmentsListGetResponseDataItemMeta, + ) + from ..models.testrecord_attachments_list_get_response_data_item_relationships import ( + TestrecordAttachmentsListGetResponseDataItemRelationships, + ) + + +T = TypeVar("T", bound="TestrecordAttachmentsListGetResponseDataItem") + + +@_attrs_define +class TestrecordAttachmentsListGetResponseDataItem: + """ + Attributes: + type (Union[Unset, TestrecordAttachmentsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/1234/MyProjectId/MyTestcaseId/0/MyAttachmentId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TestrecordAttachmentsListGetResponseDataItemAttributes]): + relationships (Union[Unset, TestrecordAttachmentsListGetResponseDataItemRelationships]): + meta (Union[Unset, TestrecordAttachmentsListGetResponseDataItemMeta]): + links (Union[Unset, TestrecordAttachmentsListGetResponseDataItemLinks]): + """ + + type: Union[ + Unset, TestrecordAttachmentsListGetResponseDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestrecordAttachmentsListGetResponseDataItemAttributes" + ] = UNSET + relationships: Union[ + Unset, "TestrecordAttachmentsListGetResponseDataItemRelationships" + ] = UNSET + meta: Union[ + Unset, "TestrecordAttachmentsListGetResponseDataItemMeta" + ] = UNSET + links: Union[ + Unset, "TestrecordAttachmentsListGetResponseDataItemLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_list_get_response_data_item_attributes import ( + TestrecordAttachmentsListGetResponseDataItemAttributes, + ) + from ..models.testrecord_attachments_list_get_response_data_item_links import ( + TestrecordAttachmentsListGetResponseDataItemLinks, + ) + from ..models.testrecord_attachments_list_get_response_data_item_meta import ( + TestrecordAttachmentsListGetResponseDataItemMeta, + ) + from ..models.testrecord_attachments_list_get_response_data_item_relationships import ( + TestrecordAttachmentsListGetResponseDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrecordAttachmentsListGetResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordAttachmentsListGetResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TestrecordAttachmentsListGetResponseDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TestrecordAttachmentsListGetResponseDataItemAttributes.from_dict( + _attributes + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TestrecordAttachmentsListGetResponseDataItemRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = TestrecordAttachmentsListGetResponseDataItemRelationships.from_dict( + _relationships + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestrecordAttachmentsListGetResponseDataItemMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrecordAttachmentsListGetResponseDataItemMeta.from_dict( + _meta + ) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrecordAttachmentsListGetResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = ( + TestrecordAttachmentsListGetResponseDataItemLinks.from_dict( + _links + ) + ) + + testrecord_attachments_list_get_response_data_item_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + testrecord_attachments_list_get_response_data_item_obj.additional_properties = ( + d + ) + return testrecord_attachments_list_get_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_attributes.py new file mode 100644 index 00000000..335c4a74 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_attributes.py @@ -0,0 +1,116 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrecordAttachmentsListGetResponseDataItemAttributes" +) + + +@_attrs_define +class TestrecordAttachmentsListGetResponseDataItemAttributes: + """ + Attributes: + file_name (Union[Unset, str]): Example: File Name. + id (Union[Unset, str]): Example: MyAttachmentId. + length (Union[Unset, int]): + title (Union[Unset, str]): Example: Title. + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + """ + + file_name: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + length: Union[Unset, int] = UNSET + title: Union[Unset, str] = UNSET + updated: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + file_name = self.file_name + + id = self.id + + length = self.length + + title = self.title + + updated: Union[Unset, str] = UNSET + if not isinstance(self.updated, Unset): + updated = self.updated.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if file_name is not UNSET: + field_dict["fileName"] = file_name + if id is not UNSET: + field_dict["id"] = id + if length is not UNSET: + field_dict["length"] = length + if title is not UNSET: + field_dict["title"] = title + if updated is not UNSET: + field_dict["updated"] = updated + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + file_name = d.pop("fileName", UNSET) + + id = d.pop("id", UNSET) + + length = d.pop("length", UNSET) + + title = d.pop("title", UNSET) + + _updated = d.pop("updated", UNSET) + updated: Union[Unset, datetime.datetime] + if isinstance(_updated, Unset): + updated = UNSET + else: + updated = isoparse(_updated) + + testrecord_attachments_list_get_response_data_item_attributes_obj = ( + cls( + file_name=file_name, + id=id, + length=length, + title=title, + updated=updated, + ) + ) + + testrecord_attachments_list_get_response_data_item_attributes_obj.additional_properties = ( + d + ) + return ( + testrecord_attachments_list_get_response_data_item_attributes_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_links.py new file mode 100644 index 00000000..190d2a89 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_links.py @@ -0,0 +1,76 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrecordAttachmentsListGetResponseDataItemLinks") + + +@_attrs_define +class TestrecordAttachmentsListGetResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId + /testrecords/MyProjectId/MyTestcaseId/0/attachments/MyAttachmentId?revision=1234. + content (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRun + Id/testrecords/MyProjectId/MyTestcaseId/0/attachments/MyAttachmentId/content?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + content: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + content = self.content + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if content is not UNSET: + field_dict["content"] = content + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + content = d.pop("content", UNSET) + + testrecord_attachments_list_get_response_data_item_links_obj = cls( + self_=self_, + content=content, + ) + + testrecord_attachments_list_get_response_data_item_links_obj.additional_properties = ( + d + ) + return testrecord_attachments_list_get_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_meta.py new file mode 100644 index 00000000..a6760c48 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_meta.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_list_get_response_data_item_meta_errors_item import ( + TestrecordAttachmentsListGetResponseDataItemMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TestrecordAttachmentsListGetResponseDataItemMeta") + + +@_attrs_define +class TestrecordAttachmentsListGetResponseDataItemMeta: + """ + Attributes: + errors (Union[Unset, List['TestrecordAttachmentsListGetResponseDataItemMetaErrorsItem']]): + """ + + errors: Union[ + Unset, + List["TestrecordAttachmentsListGetResponseDataItemMetaErrorsItem"], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_list_get_response_data_item_meta_errors_item import ( + TestrecordAttachmentsListGetResponseDataItemMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = TestrecordAttachmentsListGetResponseDataItemMetaErrorsItem.from_dict( + errors_item_data + ) + + errors.append(errors_item) + + testrecord_attachments_list_get_response_data_item_meta_obj = cls( + errors=errors, + ) + + testrecord_attachments_list_get_response_data_item_meta_obj.additional_properties = ( + d + ) + return testrecord_attachments_list_get_response_data_item_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_meta_errors_item.py new file mode 100644 index 00000000..1a78d757 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_meta_errors_item.py @@ -0,0 +1,120 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_list_get_response_data_item_meta_errors_item_source import ( + TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSource, + ) + + +T = TypeVar( + "T", bound="TestrecordAttachmentsListGetResponseDataItemMetaErrorsItem" +) + + +@_attrs_define +class TestrecordAttachmentsListGetResponseDataItemMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, + "TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_list_get_response_data_item_meta_errors_item_source import ( + TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, + TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSource, + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSource.from_dict( + _source + ) + + testrecord_attachments_list_get_response_data_item_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + testrecord_attachments_list_get_response_data_item_meta_errors_item_obj.additional_properties = ( + d + ) + return testrecord_attachments_list_get_response_data_item_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_meta_errors_item_source.py new file mode 100644 index 00000000..2e99c72c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_meta_errors_item_source.py @@ -0,0 +1,112 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_list_get_response_data_item_meta_errors_item_source_resource import ( + TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", + bound="TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSource", +) + + +@_attrs_define +class TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource + causing the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_list_get_response_data_item_meta_errors_item_source_resource import ( + TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + + testrecord_attachments_list_get_response_data_item_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + testrecord_attachments_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( + d + ) + return testrecord_attachments_list_get_response_data_item_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..49e3a935 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource", +) + + +@_attrs_define +class TestrecordAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + testrecord_attachments_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + testrecord_attachments_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return testrecord_attachments_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships.py new file mode 100644 index 00000000..a2c00963 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships.py @@ -0,0 +1,122 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_list_get_response_data_item_relationships_author import ( + TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthor, + ) + from ..models.testrecord_attachments_list_get_response_data_item_relationships_project import ( + TestrecordAttachmentsListGetResponseDataItemRelationshipsProject, + ) + + +T = TypeVar( + "T", bound="TestrecordAttachmentsListGetResponseDataItemRelationships" +) + + +@_attrs_define +class TestrecordAttachmentsListGetResponseDataItemRelationships: + """ + Attributes: + author (Union[Unset, TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthor]): + project (Union[Unset, TestrecordAttachmentsListGetResponseDataItemRelationshipsProject]): + """ + + author: Union[ + Unset, + "TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthor", + ] = UNSET + project: Union[ + Unset, + "TestrecordAttachmentsListGetResponseDataItemRelationshipsProject", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + author: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.author, Unset): + author = self.author.to_dict() + + project: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project, Unset): + project = self.project.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if author is not UNSET: + field_dict["author"] = author + if project is not UNSET: + field_dict["project"] = project + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_list_get_response_data_item_relationships_author import ( + TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthor, + ) + from ..models.testrecord_attachments_list_get_response_data_item_relationships_project import ( + TestrecordAttachmentsListGetResponseDataItemRelationshipsProject, + ) + + d = src_dict.copy() + _author = d.pop("author", UNSET) + author: Union[ + Unset, + TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthor, + ] + if isinstance(_author, Unset): + author = UNSET + else: + author = TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthor.from_dict( + _author + ) + + _project = d.pop("project", UNSET) + project: Union[ + Unset, + TestrecordAttachmentsListGetResponseDataItemRelationshipsProject, + ] + if isinstance(_project, Unset): + project = UNSET + else: + project = TestrecordAttachmentsListGetResponseDataItemRelationshipsProject.from_dict( + _project + ) + + testrecord_attachments_list_get_response_data_item_relationships_obj = cls( + author=author, + project=project, + ) + + testrecord_attachments_list_get_response_data_item_relationships_obj.additional_properties = ( + d + ) + return testrecord_attachments_list_get_response_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_author.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_author.py new file mode 100644 index 00000000..c1187b5f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_author.py @@ -0,0 +1,93 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_list_get_response_data_item_relationships_author_data import ( + TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthorData, + ) + + +T = TypeVar( + "T", + bound="TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthor", +) + + +@_attrs_define +class TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthor: + """ + Attributes: + data (Union[Unset, TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthorData]): + """ + + data: Union[ + Unset, + "TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthorData", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_list_get_response_data_item_relationships_author_data import ( + TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthorData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthorData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthorData.from_dict( + _data + ) + + testrecord_attachments_list_get_response_data_item_relationships_author_obj = cls( + data=data, + ) + + testrecord_attachments_list_get_response_data_item_relationships_author_obj.additional_properties = ( + d + ) + return testrecord_attachments_list_get_response_data_item_relationships_author_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_author_data.py new file mode 100644 index 00000000..0d443ec9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_author_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecord_attachments_list_get_response_data_item_relationships_author_data_type import ( + TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthorDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthorData", +) + + +@_attrs_define +class TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthorData: + """ + Attributes: + type (Union[Unset, TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthorDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthorDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthorDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrecord_attachments_list_get_response_data_item_relationships_author_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrecord_attachments_list_get_response_data_item_relationships_author_data_obj.additional_properties = ( + d + ) + return testrecord_attachments_list_get_response_data_item_relationships_author_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_author_data_type.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_author_data_type.py new file mode 100644 index 00000000..8446d9fb --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_author_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordAttachmentsListGetResponseDataItemRelationshipsAuthorDataType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_project.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_project.py new file mode 100644 index 00000000..1be2f972 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_project.py @@ -0,0 +1,93 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_list_get_response_data_item_relationships_project_data import ( + TestrecordAttachmentsListGetResponseDataItemRelationshipsProjectData, + ) + + +T = TypeVar( + "T", + bound="TestrecordAttachmentsListGetResponseDataItemRelationshipsProject", +) + + +@_attrs_define +class TestrecordAttachmentsListGetResponseDataItemRelationshipsProject: + """ + Attributes: + data (Union[Unset, TestrecordAttachmentsListGetResponseDataItemRelationshipsProjectData]): + """ + + data: Union[ + Unset, + "TestrecordAttachmentsListGetResponseDataItemRelationshipsProjectData", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_list_get_response_data_item_relationships_project_data import ( + TestrecordAttachmentsListGetResponseDataItemRelationshipsProjectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestrecordAttachmentsListGetResponseDataItemRelationshipsProjectData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrecordAttachmentsListGetResponseDataItemRelationshipsProjectData.from_dict( + _data + ) + + testrecord_attachments_list_get_response_data_item_relationships_project_obj = cls( + data=data, + ) + + testrecord_attachments_list_get_response_data_item_relationships_project_obj.additional_properties = ( + d + ) + return testrecord_attachments_list_get_response_data_item_relationships_project_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_project_data.py new file mode 100644 index 00000000..08a6768f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_project_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecord_attachments_list_get_response_data_item_relationships_project_data_type import ( + TestrecordAttachmentsListGetResponseDataItemRelationshipsProjectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrecordAttachmentsListGetResponseDataItemRelationshipsProjectData", +) + + +@_attrs_define +class TestrecordAttachmentsListGetResponseDataItemRelationshipsProjectData: + """ + Attributes: + type (Union[Unset, TestrecordAttachmentsListGetResponseDataItemRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestrecordAttachmentsListGetResponseDataItemRelationshipsProjectDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrecordAttachmentsListGetResponseDataItemRelationshipsProjectDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordAttachmentsListGetResponseDataItemRelationshipsProjectDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrecord_attachments_list_get_response_data_item_relationships_project_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrecord_attachments_list_get_response_data_item_relationships_project_data_obj.additional_properties = ( + d + ) + return testrecord_attachments_list_get_response_data_item_relationships_project_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_project_data_type.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_project_data_type.py new file mode 100644 index 00000000..316c6465 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_relationships_project_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordAttachmentsListGetResponseDataItemRelationshipsProjectDataType( + str, Enum +): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_type.py new file mode 100644 index 00000000..8ce84f4e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordAttachmentsListGetResponseDataItemType(str, Enum): + TESTRECORD_ATTACHMENTS = "testrecord_attachments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_included_item.py new file mode 100644 index 00000000..808b985a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestrecordAttachmentsListGetResponseIncludedItem") + + +@_attrs_define +class TestrecordAttachmentsListGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + testrecord_attachments_list_get_response_included_item_obj = cls() + + testrecord_attachments_list_get_response_included_item_obj.additional_properties = ( + d + ) + return testrecord_attachments_list_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_links.py new file mode 100644 index 00000000..96841837 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_links.py @@ -0,0 +1,106 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrecordAttachmentsListGetResponseLinks") + + +@_attrs_define +class TestrecordAttachmentsListGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId + /testrecords/MyProjectId/MyTestcaseId/0/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId + /testrecords/MyProjectId/MyTestcaseId/0/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId/ + testrecords/MyProjectId/MyTestcaseId/0/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId + /testrecords/MyProjectId/MyTestcaseId/0/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId/ + testrecords/MyProjectId/MyTestcaseId/0/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=9. + """ + + self_: Union[Unset, str] = UNSET + first: Union[Unset, str] = UNSET + prev: Union[Unset, str] = UNSET + next_: Union[Unset, str] = UNSET + last: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + first = self.first + + prev = self.prev + + next_ = self.next_ + + last = self.last + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if first is not UNSET: + field_dict["first"] = first + if prev is not UNSET: + field_dict["prev"] = prev + if next_ is not UNSET: + field_dict["next"] = next_ + if last is not UNSET: + field_dict["last"] = last + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + first = d.pop("first", UNSET) + + prev = d.pop("prev", UNSET) + + next_ = d.pop("next", UNSET) + + last = d.pop("last", UNSET) + + testrecord_attachments_list_get_response_links_obj = cls( + self_=self_, + first=first, + prev=prev, + next_=next_, + last=last, + ) + + testrecord_attachments_list_get_response_links_obj.additional_properties = ( + d + ) + return testrecord_attachments_list_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_meta.py new file mode 100644 index 00000000..8e48e210 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_get_response_meta.py @@ -0,0 +1,65 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrecordAttachmentsListGetResponseMeta") + + +@_attrs_define +class TestrecordAttachmentsListGetResponseMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + testrecord_attachments_list_get_response_meta_obj = cls( + total_count=total_count, + ) + + testrecord_attachments_list_get_response_meta_obj.additional_properties = ( + d + ) + return testrecord_attachments_list_get_response_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_request.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_request.py new file mode 100644 index 00000000..0fc5978f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_request.py @@ -0,0 +1,87 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_list_post_request_data_item import ( + TestrecordAttachmentsListPostRequestDataItem, + ) + + +T = TypeVar("T", bound="TestrecordAttachmentsListPostRequest") + + +@_attrs_define +class TestrecordAttachmentsListPostRequest: + """ + Attributes: + data (Union[Unset, List['TestrecordAttachmentsListPostRequestDataItem']]): + """ + + data: Union[ + Unset, List["TestrecordAttachmentsListPostRequestDataItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_list_post_request_data_item import ( + TestrecordAttachmentsListPostRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrecordAttachmentsListPostRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + testrecord_attachments_list_post_request_obj = cls( + data=data, + ) + + testrecord_attachments_list_post_request_obj.additional_properties = d + return testrecord_attachments_list_post_request_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_request_data_item.py new file mode 100644 index 00000000..872ae4d4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_request_data_item.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecord_attachments_list_post_request_data_item_type import ( + TestrecordAttachmentsListPostRequestDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_list_post_request_data_item_attributes import ( + TestrecordAttachmentsListPostRequestDataItemAttributes, + ) + + +T = TypeVar("T", bound="TestrecordAttachmentsListPostRequestDataItem") + + +@_attrs_define +class TestrecordAttachmentsListPostRequestDataItem: + """ + Attributes: + type (Union[Unset, TestrecordAttachmentsListPostRequestDataItemType]): + lid (Union[Unset, str]): + attributes (Union[Unset, TestrecordAttachmentsListPostRequestDataItemAttributes]): + """ + + type: Union[ + Unset, TestrecordAttachmentsListPostRequestDataItemType + ] = UNSET + lid: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestrecordAttachmentsListPostRequestDataItemAttributes" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + lid = self.lid + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if lid is not UNSET: + field_dict["lid"] = lid + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_list_post_request_data_item_attributes import ( + TestrecordAttachmentsListPostRequestDataItemAttributes, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrecordAttachmentsListPostRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordAttachmentsListPostRequestDataItemType(_type) + + lid = d.pop("lid", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TestrecordAttachmentsListPostRequestDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TestrecordAttachmentsListPostRequestDataItemAttributes.from_dict( + _attributes + ) + + testrecord_attachments_list_post_request_data_item_obj = cls( + type=type, + lid=lid, + attributes=attributes, + ) + + testrecord_attachments_list_post_request_data_item_obj.additional_properties = ( + d + ) + return testrecord_attachments_list_post_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_request_data_item_attributes.py new file mode 100644 index 00000000..9a497530 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_request_data_item_attributes.py @@ -0,0 +1,80 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrecordAttachmentsListPostRequestDataItemAttributes" +) + + +@_attrs_define +class TestrecordAttachmentsListPostRequestDataItemAttributes: + """ + Attributes: + file_name (Union[Unset, str]): Example: File Name. + title (Union[Unset, str]): Example: Title. + """ + + file_name: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + file_name = self.file_name + + title = self.title + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if file_name is not UNSET: + field_dict["fileName"] = file_name + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + file_name = d.pop("fileName", UNSET) + + title = d.pop("title", UNSET) + + testrecord_attachments_list_post_request_data_item_attributes_obj = ( + cls( + file_name=file_name, + title=title, + ) + ) + + testrecord_attachments_list_post_request_data_item_attributes_obj.additional_properties = ( + d + ) + return ( + testrecord_attachments_list_post_request_data_item_attributes_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_request_data_item_type.py new file mode 100644 index 00000000..38529c77 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordAttachmentsListPostRequestDataItemType(str, Enum): + TESTRECORD_ATTACHMENTS = "testrecord_attachments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_response.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_response.py new file mode 100644 index 00000000..a2ac1aa0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_response.py @@ -0,0 +1,89 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_list_post_response_data_item import ( + TestrecordAttachmentsListPostResponseDataItem, + ) + + +T = TypeVar("T", bound="TestrecordAttachmentsListPostResponse") + + +@_attrs_define +class TestrecordAttachmentsListPostResponse: + """ + Attributes: + data (Union[Unset, List['TestrecordAttachmentsListPostResponseDataItem']]): + """ + + data: Union[ + Unset, List["TestrecordAttachmentsListPostResponseDataItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_list_post_response_data_item import ( + TestrecordAttachmentsListPostResponseDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = ( + TestrecordAttachmentsListPostResponseDataItem.from_dict( + data_item_data + ) + ) + + data.append(data_item) + + testrecord_attachments_list_post_response_obj = cls( + data=data, + ) + + testrecord_attachments_list_post_response_obj.additional_properties = d + return testrecord_attachments_list_post_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_response_data_item.py new file mode 100644 index 00000000..84afe32e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_response_data_item.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecord_attachments_list_post_response_data_item_type import ( + TestrecordAttachmentsListPostResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_list_post_response_data_item_links import ( + TestrecordAttachmentsListPostResponseDataItemLinks, + ) + + +T = TypeVar("T", bound="TestrecordAttachmentsListPostResponseDataItem") + + +@_attrs_define +class TestrecordAttachmentsListPostResponseDataItem: + """ + Attributes: + type (Union[Unset, TestrecordAttachmentsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/1234/MyProjectId/MyTestcaseId/0/MyAttachmentId. + links (Union[Unset, TestrecordAttachmentsListPostResponseDataItemLinks]): + """ + + type: Union[ + Unset, TestrecordAttachmentsListPostResponseDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + links: Union[ + Unset, "TestrecordAttachmentsListPostResponseDataItemLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_list_post_response_data_item_links import ( + TestrecordAttachmentsListPostResponseDataItemLinks, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrecordAttachmentsListPostResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordAttachmentsListPostResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrecordAttachmentsListPostResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = ( + TestrecordAttachmentsListPostResponseDataItemLinks.from_dict( + _links + ) + ) + + testrecord_attachments_list_post_response_data_item_obj = cls( + type=type, + id=id, + links=links, + ) + + testrecord_attachments_list_post_response_data_item_obj.additional_properties = ( + d + ) + return testrecord_attachments_list_post_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_response_data_item_links.py new file mode 100644 index 00000000..433ef7d3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_response_data_item_links.py @@ -0,0 +1,76 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrecordAttachmentsListPostResponseDataItemLinks") + + +@_attrs_define +class TestrecordAttachmentsListPostResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId + /testrecords/MyProjectId/MyTestcaseId/0/attachments/MyAttachmentId?revision=1234. + content (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRun + Id/testrecords/MyProjectId/MyTestcaseId/0/attachments/MyAttachmentId/content?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + content: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + content = self.content + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if content is not UNSET: + field_dict["content"] = content + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + content = d.pop("content", UNSET) + + testrecord_attachments_list_post_response_data_item_links_obj = cls( + self_=self_, + content=content, + ) + + testrecord_attachments_list_post_response_data_item_links_obj.additional_properties = ( + d + ) + return testrecord_attachments_list_post_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_response_data_item_type.py new file mode 100644 index 00000000..e4150998 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_list_post_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordAttachmentsListPostResponseDataItemType(str, Enum): + TESTRECORD_ATTACHMENTS = "testrecord_attachments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response.py new file mode 100644 index 00000000..860a14ca --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response.py @@ -0,0 +1,139 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_single_get_response_data import ( + TestrecordAttachmentsSingleGetResponseData, + ) + from ..models.testrecord_attachments_single_get_response_included_item import ( + TestrecordAttachmentsSingleGetResponseIncludedItem, + ) + from ..models.testrecord_attachments_single_get_response_links import ( + TestrecordAttachmentsSingleGetResponseLinks, + ) + + +T = TypeVar("T", bound="TestrecordAttachmentsSingleGetResponse") + + +@_attrs_define +class TestrecordAttachmentsSingleGetResponse: + """ + Attributes: + data (Union[Unset, TestrecordAttachmentsSingleGetResponseData]): + included (Union[Unset, List['TestrecordAttachmentsSingleGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, TestrecordAttachmentsSingleGetResponseLinks]): + """ + + data: Union[Unset, "TestrecordAttachmentsSingleGetResponseData"] = UNSET + included: Union[ + Unset, List["TestrecordAttachmentsSingleGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "TestrecordAttachmentsSingleGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_single_get_response_data import ( + TestrecordAttachmentsSingleGetResponseData, + ) + from ..models.testrecord_attachments_single_get_response_included_item import ( + TestrecordAttachmentsSingleGetResponseIncludedItem, + ) + from ..models.testrecord_attachments_single_get_response_links import ( + TestrecordAttachmentsSingleGetResponseLinks, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, TestrecordAttachmentsSingleGetResponseData] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrecordAttachmentsSingleGetResponseData.from_dict(_data) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + TestrecordAttachmentsSingleGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrecordAttachmentsSingleGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrecordAttachmentsSingleGetResponseLinks.from_dict( + _links + ) + + testrecord_attachments_single_get_response_obj = cls( + data=data, + included=included, + links=links, + ) + + testrecord_attachments_single_get_response_obj.additional_properties = ( + d + ) + return testrecord_attachments_single_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data.py new file mode 100644 index 00000000..8003475e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data.py @@ -0,0 +1,207 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecord_attachments_single_get_response_data_type import ( + TestrecordAttachmentsSingleGetResponseDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_single_get_response_data_attributes import ( + TestrecordAttachmentsSingleGetResponseDataAttributes, + ) + from ..models.testrecord_attachments_single_get_response_data_links import ( + TestrecordAttachmentsSingleGetResponseDataLinks, + ) + from ..models.testrecord_attachments_single_get_response_data_meta import ( + TestrecordAttachmentsSingleGetResponseDataMeta, + ) + from ..models.testrecord_attachments_single_get_response_data_relationships import ( + TestrecordAttachmentsSingleGetResponseDataRelationships, + ) + + +T = TypeVar("T", bound="TestrecordAttachmentsSingleGetResponseData") + + +@_attrs_define +class TestrecordAttachmentsSingleGetResponseData: + """ + Attributes: + type (Union[Unset, TestrecordAttachmentsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/1234/MyProjectId/MyTestcaseId/0/MyAttachmentId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TestrecordAttachmentsSingleGetResponseDataAttributes]): + relationships (Union[Unset, TestrecordAttachmentsSingleGetResponseDataRelationships]): + meta (Union[Unset, TestrecordAttachmentsSingleGetResponseDataMeta]): + links (Union[Unset, TestrecordAttachmentsSingleGetResponseDataLinks]): + """ + + type: Union[Unset, TestrecordAttachmentsSingleGetResponseDataType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestrecordAttachmentsSingleGetResponseDataAttributes" + ] = UNSET + relationships: Union[ + Unset, "TestrecordAttachmentsSingleGetResponseDataRelationships" + ] = UNSET + meta: Union[ + Unset, "TestrecordAttachmentsSingleGetResponseDataMeta" + ] = UNSET + links: Union[ + Unset, "TestrecordAttachmentsSingleGetResponseDataLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_single_get_response_data_attributes import ( + TestrecordAttachmentsSingleGetResponseDataAttributes, + ) + from ..models.testrecord_attachments_single_get_response_data_links import ( + TestrecordAttachmentsSingleGetResponseDataLinks, + ) + from ..models.testrecord_attachments_single_get_response_data_meta import ( + TestrecordAttachmentsSingleGetResponseDataMeta, + ) + from ..models.testrecord_attachments_single_get_response_data_relationships import ( + TestrecordAttachmentsSingleGetResponseDataRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrecordAttachmentsSingleGetResponseDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordAttachmentsSingleGetResponseDataType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TestrecordAttachmentsSingleGetResponseDataAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + TestrecordAttachmentsSingleGetResponseDataAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TestrecordAttachmentsSingleGetResponseDataRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = TestrecordAttachmentsSingleGetResponseDataRelationships.from_dict( + _relationships + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestrecordAttachmentsSingleGetResponseDataMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrecordAttachmentsSingleGetResponseDataMeta.from_dict( + _meta + ) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrecordAttachmentsSingleGetResponseDataLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrecordAttachmentsSingleGetResponseDataLinks.from_dict( + _links + ) + + testrecord_attachments_single_get_response_data_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + testrecord_attachments_single_get_response_data_obj.additional_properties = ( + d + ) + return testrecord_attachments_single_get_response_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_attributes.py new file mode 100644 index 00000000..15c934cf --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_attributes.py @@ -0,0 +1,110 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrecordAttachmentsSingleGetResponseDataAttributes") + + +@_attrs_define +class TestrecordAttachmentsSingleGetResponseDataAttributes: + """ + Attributes: + file_name (Union[Unset, str]): Example: File Name. + id (Union[Unset, str]): Example: MyAttachmentId. + length (Union[Unset, int]): + title (Union[Unset, str]): Example: Title. + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + """ + + file_name: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + length: Union[Unset, int] = UNSET + title: Union[Unset, str] = UNSET + updated: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + file_name = self.file_name + + id = self.id + + length = self.length + + title = self.title + + updated: Union[Unset, str] = UNSET + if not isinstance(self.updated, Unset): + updated = self.updated.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if file_name is not UNSET: + field_dict["fileName"] = file_name + if id is not UNSET: + field_dict["id"] = id + if length is not UNSET: + field_dict["length"] = length + if title is not UNSET: + field_dict["title"] = title + if updated is not UNSET: + field_dict["updated"] = updated + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + file_name = d.pop("fileName", UNSET) + + id = d.pop("id", UNSET) + + length = d.pop("length", UNSET) + + title = d.pop("title", UNSET) + + _updated = d.pop("updated", UNSET) + updated: Union[Unset, datetime.datetime] + if isinstance(_updated, Unset): + updated = UNSET + else: + updated = isoparse(_updated) + + testrecord_attachments_single_get_response_data_attributes_obj = cls( + file_name=file_name, + id=id, + length=length, + title=title, + updated=updated, + ) + + testrecord_attachments_single_get_response_data_attributes_obj.additional_properties = ( + d + ) + return testrecord_attachments_single_get_response_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_links.py new file mode 100644 index 00000000..3522ce33 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_links.py @@ -0,0 +1,76 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrecordAttachmentsSingleGetResponseDataLinks") + + +@_attrs_define +class TestrecordAttachmentsSingleGetResponseDataLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId + /testrecords/MyProjectId/MyTestcaseId/0/attachments/MyAttachmentId?revision=1234. + content (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRun + Id/testrecords/MyProjectId/MyTestcaseId/0/attachments/MyAttachmentId/content?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + content: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + content = self.content + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if content is not UNSET: + field_dict["content"] = content + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + content = d.pop("content", UNSET) + + testrecord_attachments_single_get_response_data_links_obj = cls( + self_=self_, + content=content, + ) + + testrecord_attachments_single_get_response_data_links_obj.additional_properties = ( + d + ) + return testrecord_attachments_single_get_response_data_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_meta.py new file mode 100644 index 00000000..99da2d47 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_meta.py @@ -0,0 +1,89 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_single_get_response_data_meta_errors_item import ( + TestrecordAttachmentsSingleGetResponseDataMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TestrecordAttachmentsSingleGetResponseDataMeta") + + +@_attrs_define +class TestrecordAttachmentsSingleGetResponseDataMeta: + """ + Attributes: + errors (Union[Unset, List['TestrecordAttachmentsSingleGetResponseDataMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["TestrecordAttachmentsSingleGetResponseDataMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_single_get_response_data_meta_errors_item import ( + TestrecordAttachmentsSingleGetResponseDataMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = TestrecordAttachmentsSingleGetResponseDataMetaErrorsItem.from_dict( + errors_item_data + ) + + errors.append(errors_item) + + testrecord_attachments_single_get_response_data_meta_obj = cls( + errors=errors, + ) + + testrecord_attachments_single_get_response_data_meta_obj.additional_properties = ( + d + ) + return testrecord_attachments_single_get_response_data_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_meta_errors_item.py new file mode 100644 index 00000000..b35a0c60 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_meta_errors_item.py @@ -0,0 +1,119 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_single_get_response_data_meta_errors_item_source import ( + TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSource, + ) + + +T = TypeVar( + "T", bound="TestrecordAttachmentsSingleGetResponseDataMetaErrorsItem" +) + + +@_attrs_define +class TestrecordAttachmentsSingleGetResponseDataMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_single_get_response_data_meta_errors_item_source import ( + TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, + TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSource, + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSource.from_dict( + _source + ) + + testrecord_attachments_single_get_response_data_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + testrecord_attachments_single_get_response_data_meta_errors_item_obj.additional_properties = ( + d + ) + return testrecord_attachments_single_get_response_data_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_meta_errors_item_source.py new file mode 100644 index 00000000..45fbeb4d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_meta_errors_item_source.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_single_get_response_data_meta_errors_item_source_resource import ( + TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", bound="TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSource" +) + + +@_attrs_define +class TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource + causing the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_single_get_response_data_meta_errors_item_source_resource import ( + TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + + testrecord_attachments_single_get_response_data_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + testrecord_attachments_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( + d + ) + return testrecord_attachments_single_get_response_data_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..85aa19d3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource", +) + + +@_attrs_define +class TestrecordAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + testrecord_attachments_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + testrecord_attachments_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return testrecord_attachments_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships.py new file mode 100644 index 00000000..8dad55b5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships.py @@ -0,0 +1,124 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_single_get_response_data_relationships_author import ( + TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthor, + ) + from ..models.testrecord_attachments_single_get_response_data_relationships_project import ( + TestrecordAttachmentsSingleGetResponseDataRelationshipsProject, + ) + + +T = TypeVar( + "T", bound="TestrecordAttachmentsSingleGetResponseDataRelationships" +) + + +@_attrs_define +class TestrecordAttachmentsSingleGetResponseDataRelationships: + """ + Attributes: + author (Union[Unset, TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthor]): + project (Union[Unset, TestrecordAttachmentsSingleGetResponseDataRelationshipsProject]): + """ + + author: Union[ + Unset, "TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthor" + ] = UNSET + project: Union[ + Unset, "TestrecordAttachmentsSingleGetResponseDataRelationshipsProject" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + author: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.author, Unset): + author = self.author.to_dict() + + project: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project, Unset): + project = self.project.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if author is not UNSET: + field_dict["author"] = author + if project is not UNSET: + field_dict["project"] = project + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_single_get_response_data_relationships_author import ( + TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthor, + ) + from ..models.testrecord_attachments_single_get_response_data_relationships_project import ( + TestrecordAttachmentsSingleGetResponseDataRelationshipsProject, + ) + + d = src_dict.copy() + _author = d.pop("author", UNSET) + author: Union[ + Unset, + TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthor, + ] + if isinstance(_author, Unset): + author = UNSET + else: + author = TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthor.from_dict( + _author + ) + + _project = d.pop("project", UNSET) + project: Union[ + Unset, + TestrecordAttachmentsSingleGetResponseDataRelationshipsProject, + ] + if isinstance(_project, Unset): + project = UNSET + else: + project = TestrecordAttachmentsSingleGetResponseDataRelationshipsProject.from_dict( + _project + ) + + testrecord_attachments_single_get_response_data_relationships_obj = ( + cls( + author=author, + project=project, + ) + ) + + testrecord_attachments_single_get_response_data_relationships_obj.additional_properties = ( + d + ) + return ( + testrecord_attachments_single_get_response_data_relationships_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_author.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_author.py new file mode 100644 index 00000000..3e090885 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_author.py @@ -0,0 +1,92 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_single_get_response_data_relationships_author_data import ( + TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthorData, + ) + + +T = TypeVar( + "T", bound="TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthor" +) + + +@_attrs_define +class TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthor: + """ + Attributes: + data (Union[Unset, TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthorData]): + """ + + data: Union[ + Unset, + "TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthorData", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_single_get_response_data_relationships_author_data import ( + TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthorData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthorData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthorData.from_dict( + _data + ) + + testrecord_attachments_single_get_response_data_relationships_author_obj = cls( + data=data, + ) + + testrecord_attachments_single_get_response_data_relationships_author_obj.additional_properties = ( + d + ) + return testrecord_attachments_single_get_response_data_relationships_author_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_author_data.py new file mode 100644 index 00000000..bd7d474a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_author_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecord_attachments_single_get_response_data_relationships_author_data_type import ( + TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthorDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthorData", +) + + +@_attrs_define +class TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthorData: + """ + Attributes: + type (Union[Unset, TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthorDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthorDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthorDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrecord_attachments_single_get_response_data_relationships_author_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrecord_attachments_single_get_response_data_relationships_author_data_obj.additional_properties = ( + d + ) + return testrecord_attachments_single_get_response_data_relationships_author_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_author_data_type.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_author_data_type.py new file mode 100644 index 00000000..c7a7c517 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_author_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordAttachmentsSingleGetResponseDataRelationshipsAuthorDataType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_project.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_project.py new file mode 100644 index 00000000..3fd6524c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_project.py @@ -0,0 +1,92 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecord_attachments_single_get_response_data_relationships_project_data import ( + TestrecordAttachmentsSingleGetResponseDataRelationshipsProjectData, + ) + + +T = TypeVar( + "T", bound="TestrecordAttachmentsSingleGetResponseDataRelationshipsProject" +) + + +@_attrs_define +class TestrecordAttachmentsSingleGetResponseDataRelationshipsProject: + """ + Attributes: + data (Union[Unset, TestrecordAttachmentsSingleGetResponseDataRelationshipsProjectData]): + """ + + data: Union[ + Unset, + "TestrecordAttachmentsSingleGetResponseDataRelationshipsProjectData", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecord_attachments_single_get_response_data_relationships_project_data import ( + TestrecordAttachmentsSingleGetResponseDataRelationshipsProjectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestrecordAttachmentsSingleGetResponseDataRelationshipsProjectData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrecordAttachmentsSingleGetResponseDataRelationshipsProjectData.from_dict( + _data + ) + + testrecord_attachments_single_get_response_data_relationships_project_obj = cls( + data=data, + ) + + testrecord_attachments_single_get_response_data_relationships_project_obj.additional_properties = ( + d + ) + return testrecord_attachments_single_get_response_data_relationships_project_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_project_data.py new file mode 100644 index 00000000..b0debc30 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_project_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecord_attachments_single_get_response_data_relationships_project_data_type import ( + TestrecordAttachmentsSingleGetResponseDataRelationshipsProjectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrecordAttachmentsSingleGetResponseDataRelationshipsProjectData", +) + + +@_attrs_define +class TestrecordAttachmentsSingleGetResponseDataRelationshipsProjectData: + """ + Attributes: + type (Union[Unset, TestrecordAttachmentsSingleGetResponseDataRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestrecordAttachmentsSingleGetResponseDataRelationshipsProjectDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrecordAttachmentsSingleGetResponseDataRelationshipsProjectDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordAttachmentsSingleGetResponseDataRelationshipsProjectDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrecord_attachments_single_get_response_data_relationships_project_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrecord_attachments_single_get_response_data_relationships_project_data_obj.additional_properties = ( + d + ) + return testrecord_attachments_single_get_response_data_relationships_project_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_project_data_type.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_project_data_type.py new file mode 100644 index 00000000..bd2e43ad --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_relationships_project_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordAttachmentsSingleGetResponseDataRelationshipsProjectDataType( + str, Enum +): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_type.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_type.py new file mode 100644 index 00000000..4a7c1eb1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordAttachmentsSingleGetResponseDataType(str, Enum): + TESTRECORD_ATTACHMENTS = "testrecord_attachments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_included_item.py new file mode 100644 index 00000000..6ee36dba --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestrecordAttachmentsSingleGetResponseIncludedItem") + + +@_attrs_define +class TestrecordAttachmentsSingleGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + testrecord_attachments_single_get_response_included_item_obj = cls() + + testrecord_attachments_single_get_response_included_item_obj.additional_properties = ( + d + ) + return testrecord_attachments_single_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_links.py new file mode 100644 index 00000000..a5313b14 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecord_attachments_single_get_response_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrecordAttachmentsSingleGetResponseLinks") + + +@_attrs_define +class TestrecordAttachmentsSingleGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId + /testrecords/MyProjectId/MyTestcaseId/0/attachments/MyAttachmentId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testrecord_attachments_single_get_response_links_obj = cls( + self_=self_, + ) + + testrecord_attachments_single_get_response_links_obj.additional_properties = ( + d + ) + return testrecord_attachments_single_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response.py new file mode 100644 index 00000000..5f2374c6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response.py @@ -0,0 +1,160 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_get_response_data_item import ( + TestrecordsListGetResponseDataItem, + ) + from ..models.testrecords_list_get_response_included_item import ( + TestrecordsListGetResponseIncludedItem, + ) + from ..models.testrecords_list_get_response_links import ( + TestrecordsListGetResponseLinks, + ) + from ..models.testrecords_list_get_response_meta import ( + TestrecordsListGetResponseMeta, + ) + + +T = TypeVar("T", bound="TestrecordsListGetResponse") + + +@_attrs_define +class TestrecordsListGetResponse: + """ + Attributes: + meta (Union[Unset, TestrecordsListGetResponseMeta]): + data (Union[Unset, List['TestrecordsListGetResponseDataItem']]): + included (Union[Unset, List['TestrecordsListGetResponseIncludedItem']]): Related entities might be returned, see + Rest API + User Guide. + links (Union[Unset, TestrecordsListGetResponseLinks]): + """ + + meta: Union[Unset, "TestrecordsListGetResponseMeta"] = UNSET + data: Union[Unset, List["TestrecordsListGetResponseDataItem"]] = UNSET + included: Union[ + Unset, List["TestrecordsListGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "TestrecordsListGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_get_response_data_item import ( + TestrecordsListGetResponseDataItem, + ) + from ..models.testrecords_list_get_response_included_item import ( + TestrecordsListGetResponseIncludedItem, + ) + from ..models.testrecords_list_get_response_links import ( + TestrecordsListGetResponseLinks, + ) + from ..models.testrecords_list_get_response_meta import ( + TestrecordsListGetResponseMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestrecordsListGetResponseMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrecordsListGetResponseMeta.from_dict(_meta) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrecordsListGetResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = TestrecordsListGetResponseIncludedItem.from_dict( + included_item_data + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrecordsListGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrecordsListGetResponseLinks.from_dict(_links) + + testrecords_list_get_response_obj = cls( + meta=meta, + data=data, + included=included, + links=links, + ) + + testrecords_list_get_response_obj.additional_properties = d + return testrecords_list_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item.py new file mode 100644 index 00000000..35d76eb7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item.py @@ -0,0 +1,197 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_list_get_response_data_item_type import ( + TestrecordsListGetResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_get_response_data_item_attributes import ( + TestrecordsListGetResponseDataItemAttributes, + ) + from ..models.testrecords_list_get_response_data_item_links import ( + TestrecordsListGetResponseDataItemLinks, + ) + from ..models.testrecords_list_get_response_data_item_meta import ( + TestrecordsListGetResponseDataItemMeta, + ) + from ..models.testrecords_list_get_response_data_item_relationships import ( + TestrecordsListGetResponseDataItemRelationships, + ) + + +T = TypeVar("T", bound="TestrecordsListGetResponseDataItem") + + +@_attrs_define +class TestrecordsListGetResponseDataItem: + """ + Attributes: + type (Union[Unset, TestrecordsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: elibrary/MyTestRunId/MyProjectId/MyTestcaseId/0. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TestrecordsListGetResponseDataItemAttributes]): + relationships (Union[Unset, TestrecordsListGetResponseDataItemRelationships]): + meta (Union[Unset, TestrecordsListGetResponseDataItemMeta]): + links (Union[Unset, TestrecordsListGetResponseDataItemLinks]): + """ + + type: Union[Unset, TestrecordsListGetResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestrecordsListGetResponseDataItemAttributes" + ] = UNSET + relationships: Union[ + Unset, "TestrecordsListGetResponseDataItemRelationships" + ] = UNSET + meta: Union[Unset, "TestrecordsListGetResponseDataItemMeta"] = UNSET + links: Union[Unset, "TestrecordsListGetResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_get_response_data_item_attributes import ( + TestrecordsListGetResponseDataItemAttributes, + ) + from ..models.testrecords_list_get_response_data_item_links import ( + TestrecordsListGetResponseDataItemLinks, + ) + from ..models.testrecords_list_get_response_data_item_meta import ( + TestrecordsListGetResponseDataItemMeta, + ) + from ..models.testrecords_list_get_response_data_item_relationships import ( + TestrecordsListGetResponseDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrecordsListGetResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordsListGetResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, TestrecordsListGetResponseDataItemAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + TestrecordsListGetResponseDataItemAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TestrecordsListGetResponseDataItemRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + TestrecordsListGetResponseDataItemRelationships.from_dict( + _relationships + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestrecordsListGetResponseDataItemMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrecordsListGetResponseDataItemMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrecordsListGetResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrecordsListGetResponseDataItemLinks.from_dict(_links) + + testrecords_list_get_response_data_item_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + testrecords_list_get_response_data_item_obj.additional_properties = d + return testrecords_list_get_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_attributes.py new file mode 100644 index 00000000..fa59d1f8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_attributes.py @@ -0,0 +1,144 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_get_response_data_item_attributes_comment import ( + TestrecordsListGetResponseDataItemAttributesComment, + ) + + +T = TypeVar("T", bound="TestrecordsListGetResponseDataItemAttributes") + + +@_attrs_define +class TestrecordsListGetResponseDataItemAttributes: + """ + Attributes: + comment (Union[Unset, TestrecordsListGetResponseDataItemAttributesComment]): + duration (Union[Unset, float]): + executed (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + iteration (Union[Unset, int]): + result (Union[Unset, str]): Example: passed. + test_case_revision (Union[Unset, str]): Example: Test Case Revision. + """ + + comment: Union[ + Unset, "TestrecordsListGetResponseDataItemAttributesComment" + ] = UNSET + duration: Union[Unset, float] = UNSET + executed: Union[Unset, datetime.datetime] = UNSET + iteration: Union[Unset, int] = UNSET + result: Union[Unset, str] = UNSET + test_case_revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + comment: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.comment, Unset): + comment = self.comment.to_dict() + + duration = self.duration + + executed: Union[Unset, str] = UNSET + if not isinstance(self.executed, Unset): + executed = self.executed.isoformat() + + iteration = self.iteration + + result = self.result + + test_case_revision = self.test_case_revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if comment is not UNSET: + field_dict["comment"] = comment + if duration is not UNSET: + field_dict["duration"] = duration + if executed is not UNSET: + field_dict["executed"] = executed + if iteration is not UNSET: + field_dict["iteration"] = iteration + if result is not UNSET: + field_dict["result"] = result + if test_case_revision is not UNSET: + field_dict["testCaseRevision"] = test_case_revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_get_response_data_item_attributes_comment import ( + TestrecordsListGetResponseDataItemAttributesComment, + ) + + d = src_dict.copy() + _comment = d.pop("comment", UNSET) + comment: Union[ + Unset, TestrecordsListGetResponseDataItemAttributesComment + ] + if isinstance(_comment, Unset): + comment = UNSET + else: + comment = ( + TestrecordsListGetResponseDataItemAttributesComment.from_dict( + _comment + ) + ) + + duration = d.pop("duration", UNSET) + + _executed = d.pop("executed", UNSET) + executed: Union[Unset, datetime.datetime] + if isinstance(_executed, Unset): + executed = UNSET + else: + executed = isoparse(_executed) + + iteration = d.pop("iteration", UNSET) + + result = d.pop("result", UNSET) + + test_case_revision = d.pop("testCaseRevision", UNSET) + + testrecords_list_get_response_data_item_attributes_obj = cls( + comment=comment, + duration=duration, + executed=executed, + iteration=iteration, + result=result, + test_case_revision=test_case_revision, + ) + + testrecords_list_get_response_data_item_attributes_obj.additional_properties = ( + d + ) + return testrecords_list_get_response_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_attributes_comment.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_attributes_comment.py new file mode 100644 index 00000000..cd9a6ba9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_attributes_comment.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_list_get_response_data_item_attributes_comment_type import ( + TestrecordsListGetResponseDataItemAttributesCommentType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrecordsListGetResponseDataItemAttributesComment") + + +@_attrs_define +class TestrecordsListGetResponseDataItemAttributesComment: + """ + Attributes: + type (Union[Unset, TestrecordsListGetResponseDataItemAttributesCommentType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TestrecordsListGetResponseDataItemAttributesCommentType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrecordsListGetResponseDataItemAttributesCommentType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordsListGetResponseDataItemAttributesCommentType( + _type + ) + + value = d.pop("value", UNSET) + + testrecords_list_get_response_data_item_attributes_comment_obj = cls( + type=type, + value=value, + ) + + testrecords_list_get_response_data_item_attributes_comment_obj.additional_properties = ( + d + ) + return testrecords_list_get_response_data_item_attributes_comment_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_attributes_comment_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_attributes_comment_type.py new file mode 100644 index 00000000..84261f8b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_attributes_comment_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsListGetResponseDataItemAttributesCommentType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_links.py new file mode 100644 index 00000000..b8d2279a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrecordsListGetResponseDataItemLinks") + + +@_attrs_define +class TestrecordsListGetResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/elibrary/testruns/MyTestRunId/testrecords/MyProjectId/MyTestcaseId/0. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testrecords_list_get_response_data_item_links_obj = cls( + self_=self_, + ) + + testrecords_list_get_response_data_item_links_obj.additional_properties = ( + d + ) + return testrecords_list_get_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_meta.py new file mode 100644 index 00000000..8d2870ec --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_meta.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_get_response_data_item_meta_errors_item import ( + TestrecordsListGetResponseDataItemMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TestrecordsListGetResponseDataItemMeta") + + +@_attrs_define +class TestrecordsListGetResponseDataItemMeta: + """ + Attributes: + errors (Union[Unset, List['TestrecordsListGetResponseDataItemMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["TestrecordsListGetResponseDataItemMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_get_response_data_item_meta_errors_item import ( + TestrecordsListGetResponseDataItemMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ( + TestrecordsListGetResponseDataItemMetaErrorsItem.from_dict( + errors_item_data + ) + ) + + errors.append(errors_item) + + testrecords_list_get_response_data_item_meta_obj = cls( + errors=errors, + ) + + testrecords_list_get_response_data_item_meta_obj.additional_properties = ( + d + ) + return testrecords_list_get_response_data_item_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_meta_errors_item.py new file mode 100644 index 00000000..2bd28d0f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_meta_errors_item.py @@ -0,0 +1,116 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_get_response_data_item_meta_errors_item_source import ( + TestrecordsListGetResponseDataItemMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="TestrecordsListGetResponseDataItemMetaErrorsItem") + + +@_attrs_define +class TestrecordsListGetResponseDataItemMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TestrecordsListGetResponseDataItemMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "TestrecordsListGetResponseDataItemMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_get_response_data_item_meta_errors_item_source import ( + TestrecordsListGetResponseDataItemMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, TestrecordsListGetResponseDataItemMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = TestrecordsListGetResponseDataItemMetaErrorsItemSource.from_dict( + _source + ) + + testrecords_list_get_response_data_item_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + testrecords_list_get_response_data_item_meta_errors_item_obj.additional_properties = ( + d + ) + return testrecords_list_get_response_data_item_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_meta_errors_item_source.py new file mode 100644 index 00000000..934781f3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_meta_errors_item_source.py @@ -0,0 +1,114 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_get_response_data_item_meta_errors_item_source_resource import ( + TestrecordsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", bound="TestrecordsListGetResponseDataItemMetaErrorsItemSource" +) + + +@_attrs_define +class TestrecordsListGetResponseDataItemMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TestrecordsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing the + error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "TestrecordsListGetResponseDataItemMetaErrorsItemSourceResource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_get_response_data_item_meta_errors_item_source_resource import ( + TestrecordsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + TestrecordsListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TestrecordsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + + testrecords_list_get_response_data_item_meta_errors_item_source_obj = ( + cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + ) + + testrecords_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( + d + ) + return ( + testrecords_list_get_response_data_item_meta_errors_item_source_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..2c67e8f2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrecordsListGetResponseDataItemMetaErrorsItemSourceResource" +) + + +@_attrs_define +class TestrecordsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + testrecords_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + testrecords_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return testrecords_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships.py new file mode 100644 index 00000000..1d0a7ae8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships.py @@ -0,0 +1,144 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_get_response_data_item_relationships_defect import ( + TestrecordsListGetResponseDataItemRelationshipsDefect, + ) + from ..models.testrecords_list_get_response_data_item_relationships_executed_by import ( + TestrecordsListGetResponseDataItemRelationshipsExecutedBy, + ) + from ..models.testrecords_list_get_response_data_item_relationships_test_case import ( + TestrecordsListGetResponseDataItemRelationshipsTestCase, + ) + + +T = TypeVar("T", bound="TestrecordsListGetResponseDataItemRelationships") + + +@_attrs_define +class TestrecordsListGetResponseDataItemRelationships: + """ + Attributes: + defect (Union[Unset, TestrecordsListGetResponseDataItemRelationshipsDefect]): + executed_by (Union[Unset, TestrecordsListGetResponseDataItemRelationshipsExecutedBy]): + test_case (Union[Unset, TestrecordsListGetResponseDataItemRelationshipsTestCase]): + """ + + defect: Union[ + Unset, "TestrecordsListGetResponseDataItemRelationshipsDefect" + ] = UNSET + executed_by: Union[ + Unset, "TestrecordsListGetResponseDataItemRelationshipsExecutedBy" + ] = UNSET + test_case: Union[ + Unset, "TestrecordsListGetResponseDataItemRelationshipsTestCase" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + defect: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.defect, Unset): + defect = self.defect.to_dict() + + executed_by: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.executed_by, Unset): + executed_by = self.executed_by.to_dict() + + test_case: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.test_case, Unset): + test_case = self.test_case.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if defect is not UNSET: + field_dict["defect"] = defect + if executed_by is not UNSET: + field_dict["executedBy"] = executed_by + if test_case is not UNSET: + field_dict["testCase"] = test_case + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_get_response_data_item_relationships_defect import ( + TestrecordsListGetResponseDataItemRelationshipsDefect, + ) + from ..models.testrecords_list_get_response_data_item_relationships_executed_by import ( + TestrecordsListGetResponseDataItemRelationshipsExecutedBy, + ) + from ..models.testrecords_list_get_response_data_item_relationships_test_case import ( + TestrecordsListGetResponseDataItemRelationshipsTestCase, + ) + + d = src_dict.copy() + _defect = d.pop("defect", UNSET) + defect: Union[ + Unset, TestrecordsListGetResponseDataItemRelationshipsDefect + ] + if isinstance(_defect, Unset): + defect = UNSET + else: + defect = TestrecordsListGetResponseDataItemRelationshipsDefect.from_dict( + _defect + ) + + _executed_by = d.pop("executedBy", UNSET) + executed_by: Union[ + Unset, TestrecordsListGetResponseDataItemRelationshipsExecutedBy + ] + if isinstance(_executed_by, Unset): + executed_by = UNSET + else: + executed_by = TestrecordsListGetResponseDataItemRelationshipsExecutedBy.from_dict( + _executed_by + ) + + _test_case = d.pop("testCase", UNSET) + test_case: Union[ + Unset, TestrecordsListGetResponseDataItemRelationshipsTestCase + ] + if isinstance(_test_case, Unset): + test_case = UNSET + else: + test_case = TestrecordsListGetResponseDataItemRelationshipsTestCase.from_dict( + _test_case + ) + + testrecords_list_get_response_data_item_relationships_obj = cls( + defect=defect, + executed_by=executed_by, + test_case=test_case, + ) + + testrecords_list_get_response_data_item_relationships_obj.additional_properties = ( + d + ) + return testrecords_list_get_response_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_defect.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_defect.py new file mode 100644 index 00000000..bc30955c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_defect.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_get_response_data_item_relationships_defect_data import ( + TestrecordsListGetResponseDataItemRelationshipsDefectData, + ) + + +T = TypeVar("T", bound="TestrecordsListGetResponseDataItemRelationshipsDefect") + + +@_attrs_define +class TestrecordsListGetResponseDataItemRelationshipsDefect: + """ + Attributes: + data (Union[Unset, TestrecordsListGetResponseDataItemRelationshipsDefectData]): + """ + + data: Union[ + Unset, "TestrecordsListGetResponseDataItemRelationshipsDefectData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_get_response_data_item_relationships_defect_data import ( + TestrecordsListGetResponseDataItemRelationshipsDefectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrecordsListGetResponseDataItemRelationshipsDefectData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrecordsListGetResponseDataItemRelationshipsDefectData.from_dict( + _data + ) + + testrecords_list_get_response_data_item_relationships_defect_obj = cls( + data=data, + ) + + testrecords_list_get_response_data_item_relationships_defect_obj.additional_properties = ( + d + ) + return testrecords_list_get_response_data_item_relationships_defect_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_defect_data.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_defect_data.py new file mode 100644 index 00000000..eab62d30 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_defect_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_list_get_response_data_item_relationships_defect_data_type import ( + TestrecordsListGetResponseDataItemRelationshipsDefectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrecordsListGetResponseDataItemRelationshipsDefectData" +) + + +@_attrs_define +class TestrecordsListGetResponseDataItemRelationshipsDefectData: + """ + Attributes: + type (Union[Unset, TestrecordsListGetResponseDataItemRelationshipsDefectDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, TestrecordsListGetResponseDataItemRelationshipsDefectDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrecordsListGetResponseDataItemRelationshipsDefectDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + TestrecordsListGetResponseDataItemRelationshipsDefectDataType( + _type + ) + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrecords_list_get_response_data_item_relationships_defect_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrecords_list_get_response_data_item_relationships_defect_data_obj.additional_properties = ( + d + ) + return testrecords_list_get_response_data_item_relationships_defect_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_defect_data_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_defect_data_type.py new file mode 100644 index 00000000..9d301169 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_defect_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsListGetResponseDataItemRelationshipsDefectDataType(str, Enum): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_executed_by.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_executed_by.py new file mode 100644 index 00000000..53c17775 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_executed_by.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_get_response_data_item_relationships_executed_by_data import ( + TestrecordsListGetResponseDataItemRelationshipsExecutedByData, + ) + + +T = TypeVar( + "T", bound="TestrecordsListGetResponseDataItemRelationshipsExecutedBy" +) + + +@_attrs_define +class TestrecordsListGetResponseDataItemRelationshipsExecutedBy: + """ + Attributes: + data (Union[Unset, TestrecordsListGetResponseDataItemRelationshipsExecutedByData]): + """ + + data: Union[ + Unset, "TestrecordsListGetResponseDataItemRelationshipsExecutedByData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_get_response_data_item_relationships_executed_by_data import ( + TestrecordsListGetResponseDataItemRelationshipsExecutedByData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestrecordsListGetResponseDataItemRelationshipsExecutedByData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrecordsListGetResponseDataItemRelationshipsExecutedByData.from_dict( + _data + ) + + testrecords_list_get_response_data_item_relationships_executed_by_obj = cls( + data=data, + ) + + testrecords_list_get_response_data_item_relationships_executed_by_obj.additional_properties = ( + d + ) + return testrecords_list_get_response_data_item_relationships_executed_by_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_executed_by_data.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_executed_by_data.py new file mode 100644 index 00000000..c44270ef --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_executed_by_data.py @@ -0,0 +1,103 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_list_get_response_data_item_relationships_executed_by_data_type import ( + TestrecordsListGetResponseDataItemRelationshipsExecutedByDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrecordsListGetResponseDataItemRelationshipsExecutedByData" +) + + +@_attrs_define +class TestrecordsListGetResponseDataItemRelationshipsExecutedByData: + """ + Attributes: + type (Union[Unset, TestrecordsListGetResponseDataItemRelationshipsExecutedByDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestrecordsListGetResponseDataItemRelationshipsExecutedByDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrecordsListGetResponseDataItemRelationshipsExecutedByDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordsListGetResponseDataItemRelationshipsExecutedByDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrecords_list_get_response_data_item_relationships_executed_by_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrecords_list_get_response_data_item_relationships_executed_by_data_obj.additional_properties = ( + d + ) + return testrecords_list_get_response_data_item_relationships_executed_by_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_executed_by_data_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_executed_by_data_type.py new file mode 100644 index 00000000..9331bdd9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_executed_by_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsListGetResponseDataItemRelationshipsExecutedByDataType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_test_case.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_test_case.py new file mode 100644 index 00000000..8b41006c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_test_case.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_get_response_data_item_relationships_test_case_data import ( + TestrecordsListGetResponseDataItemRelationshipsTestCaseData, + ) + + +T = TypeVar( + "T", bound="TestrecordsListGetResponseDataItemRelationshipsTestCase" +) + + +@_attrs_define +class TestrecordsListGetResponseDataItemRelationshipsTestCase: + """ + Attributes: + data (Union[Unset, TestrecordsListGetResponseDataItemRelationshipsTestCaseData]): + """ + + data: Union[ + Unset, "TestrecordsListGetResponseDataItemRelationshipsTestCaseData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_get_response_data_item_relationships_test_case_data import ( + TestrecordsListGetResponseDataItemRelationshipsTestCaseData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrecordsListGetResponseDataItemRelationshipsTestCaseData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrecordsListGetResponseDataItemRelationshipsTestCaseData.from_dict( + _data + ) + + testrecords_list_get_response_data_item_relationships_test_case_obj = ( + cls( + data=data, + ) + ) + + testrecords_list_get_response_data_item_relationships_test_case_obj.additional_properties = ( + d + ) + return ( + testrecords_list_get_response_data_item_relationships_test_case_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_test_case_data.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_test_case_data.py new file mode 100644 index 00000000..379ede01 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_test_case_data.py @@ -0,0 +1,102 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_list_get_response_data_item_relationships_test_case_data_type import ( + TestrecordsListGetResponseDataItemRelationshipsTestCaseDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrecordsListGetResponseDataItemRelationshipsTestCaseData" +) + + +@_attrs_define +class TestrecordsListGetResponseDataItemRelationshipsTestCaseData: + """ + Attributes: + type (Union[Unset, TestrecordsListGetResponseDataItemRelationshipsTestCaseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, TestrecordsListGetResponseDataItemRelationshipsTestCaseDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrecordsListGetResponseDataItemRelationshipsTestCaseDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordsListGetResponseDataItemRelationshipsTestCaseDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrecords_list_get_response_data_item_relationships_test_case_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrecords_list_get_response_data_item_relationships_test_case_data_obj.additional_properties = ( + d + ) + return testrecords_list_get_response_data_item_relationships_test_case_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_test_case_data_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_test_case_data_type.py new file mode 100644 index 00000000..e7d5102d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_relationships_test_case_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsListGetResponseDataItemRelationshipsTestCaseDataType( + str, Enum +): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_type.py new file mode 100644 index 00000000..a1f2fa40 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsListGetResponseDataItemType(str, Enum): + TESTRECORDS = "testrecords" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_included_item.py new file mode 100644 index 00000000..9c599758 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestrecordsListGetResponseIncludedItem") + + +@_attrs_define +class TestrecordsListGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + testrecords_list_get_response_included_item_obj = cls() + + testrecords_list_get_response_included_item_obj.additional_properties = ( + d + ) + return testrecords_list_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_links.py new file mode 100644 index 00000000..59263ae6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_links.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrecordsListGetResponseLinks") + + +@_attrs_define +class TestrecordsListGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/elibrary/testruns/MyTestRunId/te + strecords/MyProjectId/MyTestcaseId?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application-path/projects/elibrary/testruns/MyTestRunId/te + strecords/MyProjectId/MyTestcaseId?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application-path/projects/elibrary/testruns/MyTestRunId/tes + trecords/MyProjectId/MyTestcaseId?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application-path/projects/elibrary/testruns/MyTestRunId/te + strecords/MyProjectId/MyTestcaseId?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application-path/projects/elibrary/testruns/MyTestRunId/tes + trecords/MyProjectId/MyTestcaseId?page%5Bsize%5D=10&page%5Bnumber%5D=9. + """ + + self_: Union[Unset, str] = UNSET + first: Union[Unset, str] = UNSET + prev: Union[Unset, str] = UNSET + next_: Union[Unset, str] = UNSET + last: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + first = self.first + + prev = self.prev + + next_ = self.next_ + + last = self.last + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if first is not UNSET: + field_dict["first"] = first + if prev is not UNSET: + field_dict["prev"] = prev + if next_ is not UNSET: + field_dict["next"] = next_ + if last is not UNSET: + field_dict["last"] = last + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + first = d.pop("first", UNSET) + + prev = d.pop("prev", UNSET) + + next_ = d.pop("next", UNSET) + + last = d.pop("last", UNSET) + + testrecords_list_get_response_links_obj = cls( + self_=self_, + first=first, + prev=prev, + next_=next_, + last=last, + ) + + testrecords_list_get_response_links_obj.additional_properties = d + return testrecords_list_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_meta.py new file mode 100644 index 00000000..472852ec --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_get_response_meta.py @@ -0,0 +1,63 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrecordsListGetResponseMeta") + + +@_attrs_define +class TestrecordsListGetResponseMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + testrecords_list_get_response_meta_obj = cls( + total_count=total_count, + ) + + testrecords_list_get_response_meta_obj.additional_properties = d + return testrecords_list_get_response_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request.py new file mode 100644 index 00000000..a1888dcd --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_post_request_data_item import ( + TestrecordsListPostRequestDataItem, + ) + + +T = TypeVar("T", bound="TestrecordsListPostRequest") + + +@_attrs_define +class TestrecordsListPostRequest: + """ + Attributes: + data (Union[Unset, List['TestrecordsListPostRequestDataItem']]): + """ + + data: Union[Unset, List["TestrecordsListPostRequestDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_post_request_data_item import ( + TestrecordsListPostRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrecordsListPostRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + testrecords_list_post_request_obj = cls( + data=data, + ) + + testrecords_list_post_request_obj.additional_properties = d + return testrecords_list_post_request_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item.py new file mode 100644 index 00000000..d63c9690 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item.py @@ -0,0 +1,135 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_list_post_request_data_item_type import ( + TestrecordsListPostRequestDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_post_request_data_item_attributes import ( + TestrecordsListPostRequestDataItemAttributes, + ) + from ..models.testrecords_list_post_request_data_item_relationships import ( + TestrecordsListPostRequestDataItemRelationships, + ) + + +T = TypeVar("T", bound="TestrecordsListPostRequestDataItem") + + +@_attrs_define +class TestrecordsListPostRequestDataItem: + """ + Attributes: + type (Union[Unset, TestrecordsListPostRequestDataItemType]): + attributes (Union[Unset, TestrecordsListPostRequestDataItemAttributes]): + relationships (Union[Unset, TestrecordsListPostRequestDataItemRelationships]): + """ + + type: Union[Unset, TestrecordsListPostRequestDataItemType] = UNSET + attributes: Union[ + Unset, "TestrecordsListPostRequestDataItemAttributes" + ] = UNSET + relationships: Union[ + Unset, "TestrecordsListPostRequestDataItemRelationships" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_post_request_data_item_attributes import ( + TestrecordsListPostRequestDataItemAttributes, + ) + from ..models.testrecords_list_post_request_data_item_relationships import ( + TestrecordsListPostRequestDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrecordsListPostRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordsListPostRequestDataItemType(_type) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, TestrecordsListPostRequestDataItemAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + TestrecordsListPostRequestDataItemAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TestrecordsListPostRequestDataItemRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + TestrecordsListPostRequestDataItemRelationships.from_dict( + _relationships + ) + ) + + testrecords_list_post_request_data_item_obj = cls( + type=type, + attributes=attributes, + relationships=relationships, + ) + + testrecords_list_post_request_data_item_obj.additional_properties = d + return testrecords_list_post_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_attributes.py new file mode 100644 index 00000000..d926fce6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_attributes.py @@ -0,0 +1,135 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_post_request_data_item_attributes_comment import ( + TestrecordsListPostRequestDataItemAttributesComment, + ) + + +T = TypeVar("T", bound="TestrecordsListPostRequestDataItemAttributes") + + +@_attrs_define +class TestrecordsListPostRequestDataItemAttributes: + """ + Attributes: + comment (Union[Unset, TestrecordsListPostRequestDataItemAttributesComment]): + duration (Union[Unset, float]): + executed (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + result (Union[Unset, str]): Example: passed. + test_case_revision (Union[Unset, str]): Example: Test Case Revision. + """ + + comment: Union[ + Unset, "TestrecordsListPostRequestDataItemAttributesComment" + ] = UNSET + duration: Union[Unset, float] = UNSET + executed: Union[Unset, datetime.datetime] = UNSET + result: Union[Unset, str] = UNSET + test_case_revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + comment: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.comment, Unset): + comment = self.comment.to_dict() + + duration = self.duration + + executed: Union[Unset, str] = UNSET + if not isinstance(self.executed, Unset): + executed = self.executed.isoformat() + + result = self.result + + test_case_revision = self.test_case_revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if comment is not UNSET: + field_dict["comment"] = comment + if duration is not UNSET: + field_dict["duration"] = duration + if executed is not UNSET: + field_dict["executed"] = executed + if result is not UNSET: + field_dict["result"] = result + if test_case_revision is not UNSET: + field_dict["testCaseRevision"] = test_case_revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_post_request_data_item_attributes_comment import ( + TestrecordsListPostRequestDataItemAttributesComment, + ) + + d = src_dict.copy() + _comment = d.pop("comment", UNSET) + comment: Union[ + Unset, TestrecordsListPostRequestDataItemAttributesComment + ] + if isinstance(_comment, Unset): + comment = UNSET + else: + comment = ( + TestrecordsListPostRequestDataItemAttributesComment.from_dict( + _comment + ) + ) + + duration = d.pop("duration", UNSET) + + _executed = d.pop("executed", UNSET) + executed: Union[Unset, datetime.datetime] + if isinstance(_executed, Unset): + executed = UNSET + else: + executed = isoparse(_executed) + + result = d.pop("result", UNSET) + + test_case_revision = d.pop("testCaseRevision", UNSET) + + testrecords_list_post_request_data_item_attributes_obj = cls( + comment=comment, + duration=duration, + executed=executed, + result=result, + test_case_revision=test_case_revision, + ) + + testrecords_list_post_request_data_item_attributes_obj.additional_properties = ( + d + ) + return testrecords_list_post_request_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_attributes_comment.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_attributes_comment.py new file mode 100644 index 00000000..4f5dfded --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_attributes_comment.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_list_post_request_data_item_attributes_comment_type import ( + TestrecordsListPostRequestDataItemAttributesCommentType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrecordsListPostRequestDataItemAttributesComment") + + +@_attrs_define +class TestrecordsListPostRequestDataItemAttributesComment: + """ + Attributes: + type (Union[Unset, TestrecordsListPostRequestDataItemAttributesCommentType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TestrecordsListPostRequestDataItemAttributesCommentType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrecordsListPostRequestDataItemAttributesCommentType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordsListPostRequestDataItemAttributesCommentType( + _type + ) + + value = d.pop("value", UNSET) + + testrecords_list_post_request_data_item_attributes_comment_obj = cls( + type=type, + value=value, + ) + + testrecords_list_post_request_data_item_attributes_comment_obj.additional_properties = ( + d + ) + return testrecords_list_post_request_data_item_attributes_comment_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_attributes_comment_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_attributes_comment_type.py new file mode 100644 index 00000000..385c693f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_attributes_comment_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsListPostRequestDataItemAttributesCommentType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships.py new file mode 100644 index 00000000..c95e48ea --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships.py @@ -0,0 +1,144 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_post_request_data_item_relationships_defect import ( + TestrecordsListPostRequestDataItemRelationshipsDefect, + ) + from ..models.testrecords_list_post_request_data_item_relationships_executed_by import ( + TestrecordsListPostRequestDataItemRelationshipsExecutedBy, + ) + from ..models.testrecords_list_post_request_data_item_relationships_test_case import ( + TestrecordsListPostRequestDataItemRelationshipsTestCase, + ) + + +T = TypeVar("T", bound="TestrecordsListPostRequestDataItemRelationships") + + +@_attrs_define +class TestrecordsListPostRequestDataItemRelationships: + """ + Attributes: + defect (Union[Unset, TestrecordsListPostRequestDataItemRelationshipsDefect]): + executed_by (Union[Unset, TestrecordsListPostRequestDataItemRelationshipsExecutedBy]): + test_case (Union[Unset, TestrecordsListPostRequestDataItemRelationshipsTestCase]): + """ + + defect: Union[ + Unset, "TestrecordsListPostRequestDataItemRelationshipsDefect" + ] = UNSET + executed_by: Union[ + Unset, "TestrecordsListPostRequestDataItemRelationshipsExecutedBy" + ] = UNSET + test_case: Union[ + Unset, "TestrecordsListPostRequestDataItemRelationshipsTestCase" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + defect: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.defect, Unset): + defect = self.defect.to_dict() + + executed_by: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.executed_by, Unset): + executed_by = self.executed_by.to_dict() + + test_case: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.test_case, Unset): + test_case = self.test_case.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if defect is not UNSET: + field_dict["defect"] = defect + if executed_by is not UNSET: + field_dict["executedBy"] = executed_by + if test_case is not UNSET: + field_dict["testCase"] = test_case + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_post_request_data_item_relationships_defect import ( + TestrecordsListPostRequestDataItemRelationshipsDefect, + ) + from ..models.testrecords_list_post_request_data_item_relationships_executed_by import ( + TestrecordsListPostRequestDataItemRelationshipsExecutedBy, + ) + from ..models.testrecords_list_post_request_data_item_relationships_test_case import ( + TestrecordsListPostRequestDataItemRelationshipsTestCase, + ) + + d = src_dict.copy() + _defect = d.pop("defect", UNSET) + defect: Union[ + Unset, TestrecordsListPostRequestDataItemRelationshipsDefect + ] + if isinstance(_defect, Unset): + defect = UNSET + else: + defect = TestrecordsListPostRequestDataItemRelationshipsDefect.from_dict( + _defect + ) + + _executed_by = d.pop("executedBy", UNSET) + executed_by: Union[ + Unset, TestrecordsListPostRequestDataItemRelationshipsExecutedBy + ] + if isinstance(_executed_by, Unset): + executed_by = UNSET + else: + executed_by = TestrecordsListPostRequestDataItemRelationshipsExecutedBy.from_dict( + _executed_by + ) + + _test_case = d.pop("testCase", UNSET) + test_case: Union[ + Unset, TestrecordsListPostRequestDataItemRelationshipsTestCase + ] + if isinstance(_test_case, Unset): + test_case = UNSET + else: + test_case = TestrecordsListPostRequestDataItemRelationshipsTestCase.from_dict( + _test_case + ) + + testrecords_list_post_request_data_item_relationships_obj = cls( + defect=defect, + executed_by=executed_by, + test_case=test_case, + ) + + testrecords_list_post_request_data_item_relationships_obj.additional_properties = ( + d + ) + return testrecords_list_post_request_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_defect.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_defect.py new file mode 100644 index 00000000..f2ec8926 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_defect.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_post_request_data_item_relationships_defect_data import ( + TestrecordsListPostRequestDataItemRelationshipsDefectData, + ) + + +T = TypeVar("T", bound="TestrecordsListPostRequestDataItemRelationshipsDefect") + + +@_attrs_define +class TestrecordsListPostRequestDataItemRelationshipsDefect: + """ + Attributes: + data (Union[Unset, TestrecordsListPostRequestDataItemRelationshipsDefectData]): + """ + + data: Union[ + Unset, "TestrecordsListPostRequestDataItemRelationshipsDefectData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_post_request_data_item_relationships_defect_data import ( + TestrecordsListPostRequestDataItemRelationshipsDefectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrecordsListPostRequestDataItemRelationshipsDefectData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrecordsListPostRequestDataItemRelationshipsDefectData.from_dict( + _data + ) + + testrecords_list_post_request_data_item_relationships_defect_obj = cls( + data=data, + ) + + testrecords_list_post_request_data_item_relationships_defect_obj.additional_properties = ( + d + ) + return testrecords_list_post_request_data_item_relationships_defect_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_defect_data.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_defect_data.py new file mode 100644 index 00000000..3936f351 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_defect_data.py @@ -0,0 +1,95 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_list_post_request_data_item_relationships_defect_data_type import ( + TestrecordsListPostRequestDataItemRelationshipsDefectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrecordsListPostRequestDataItemRelationshipsDefectData" +) + + +@_attrs_define +class TestrecordsListPostRequestDataItemRelationshipsDefectData: + """ + Attributes: + type (Union[Unset, TestrecordsListPostRequestDataItemRelationshipsDefectDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + """ + + type: Union[ + Unset, TestrecordsListPostRequestDataItemRelationshipsDefectDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrecordsListPostRequestDataItemRelationshipsDefectDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + TestrecordsListPostRequestDataItemRelationshipsDefectDataType( + _type + ) + ) + + id = d.pop("id", UNSET) + + testrecords_list_post_request_data_item_relationships_defect_data_obj = cls( + type=type, + id=id, + ) + + testrecords_list_post_request_data_item_relationships_defect_data_obj.additional_properties = ( + d + ) + return testrecords_list_post_request_data_item_relationships_defect_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_defect_data_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_defect_data_type.py new file mode 100644 index 00000000..be7b190a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_defect_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsListPostRequestDataItemRelationshipsDefectDataType(str, Enum): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_executed_by.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_executed_by.py new file mode 100644 index 00000000..af3f6d55 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_executed_by.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_post_request_data_item_relationships_executed_by_data import ( + TestrecordsListPostRequestDataItemRelationshipsExecutedByData, + ) + + +T = TypeVar( + "T", bound="TestrecordsListPostRequestDataItemRelationshipsExecutedBy" +) + + +@_attrs_define +class TestrecordsListPostRequestDataItemRelationshipsExecutedBy: + """ + Attributes: + data (Union[Unset, TestrecordsListPostRequestDataItemRelationshipsExecutedByData]): + """ + + data: Union[ + Unset, "TestrecordsListPostRequestDataItemRelationshipsExecutedByData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_post_request_data_item_relationships_executed_by_data import ( + TestrecordsListPostRequestDataItemRelationshipsExecutedByData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestrecordsListPostRequestDataItemRelationshipsExecutedByData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrecordsListPostRequestDataItemRelationshipsExecutedByData.from_dict( + _data + ) + + testrecords_list_post_request_data_item_relationships_executed_by_obj = cls( + data=data, + ) + + testrecords_list_post_request_data_item_relationships_executed_by_obj.additional_properties = ( + d + ) + return testrecords_list_post_request_data_item_relationships_executed_by_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_executed_by_data.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_executed_by_data.py new file mode 100644 index 00000000..218652aa --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_executed_by_data.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_list_post_request_data_item_relationships_executed_by_data_type import ( + TestrecordsListPostRequestDataItemRelationshipsExecutedByDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrecordsListPostRequestDataItemRelationshipsExecutedByData" +) + + +@_attrs_define +class TestrecordsListPostRequestDataItemRelationshipsExecutedByData: + """ + Attributes: + type (Union[Unset, TestrecordsListPostRequestDataItemRelationshipsExecutedByDataType]): + id (Union[Unset, str]): Example: MyUserId. + """ + + type: Union[ + Unset, + TestrecordsListPostRequestDataItemRelationshipsExecutedByDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrecordsListPostRequestDataItemRelationshipsExecutedByDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordsListPostRequestDataItemRelationshipsExecutedByDataType( + _type + ) + + id = d.pop("id", UNSET) + + testrecords_list_post_request_data_item_relationships_executed_by_data_obj = cls( + type=type, + id=id, + ) + + testrecords_list_post_request_data_item_relationships_executed_by_data_obj.additional_properties = ( + d + ) + return testrecords_list_post_request_data_item_relationships_executed_by_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_executed_by_data_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_executed_by_data_type.py new file mode 100644 index 00000000..11b281a8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_executed_by_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsListPostRequestDataItemRelationshipsExecutedByDataType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_test_case.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_test_case.py new file mode 100644 index 00000000..6f4e6c9b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_test_case.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_post_request_data_item_relationships_test_case_data import ( + TestrecordsListPostRequestDataItemRelationshipsTestCaseData, + ) + + +T = TypeVar( + "T", bound="TestrecordsListPostRequestDataItemRelationshipsTestCase" +) + + +@_attrs_define +class TestrecordsListPostRequestDataItemRelationshipsTestCase: + """ + Attributes: + data (Union[Unset, TestrecordsListPostRequestDataItemRelationshipsTestCaseData]): + """ + + data: Union[ + Unset, "TestrecordsListPostRequestDataItemRelationshipsTestCaseData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_post_request_data_item_relationships_test_case_data import ( + TestrecordsListPostRequestDataItemRelationshipsTestCaseData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrecordsListPostRequestDataItemRelationshipsTestCaseData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrecordsListPostRequestDataItemRelationshipsTestCaseData.from_dict( + _data + ) + + testrecords_list_post_request_data_item_relationships_test_case_obj = ( + cls( + data=data, + ) + ) + + testrecords_list_post_request_data_item_relationships_test_case_obj.additional_properties = ( + d + ) + return ( + testrecords_list_post_request_data_item_relationships_test_case_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_test_case_data.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_test_case_data.py new file mode 100644 index 00000000..d77e32b7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_test_case_data.py @@ -0,0 +1,93 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_list_post_request_data_item_relationships_test_case_data_type import ( + TestrecordsListPostRequestDataItemRelationshipsTestCaseDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrecordsListPostRequestDataItemRelationshipsTestCaseData" +) + + +@_attrs_define +class TestrecordsListPostRequestDataItemRelationshipsTestCaseData: + """ + Attributes: + type (Union[Unset, TestrecordsListPostRequestDataItemRelationshipsTestCaseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + """ + + type: Union[ + Unset, TestrecordsListPostRequestDataItemRelationshipsTestCaseDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrecordsListPostRequestDataItemRelationshipsTestCaseDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordsListPostRequestDataItemRelationshipsTestCaseDataType( + _type + ) + + id = d.pop("id", UNSET) + + testrecords_list_post_request_data_item_relationships_test_case_data_obj = cls( + type=type, + id=id, + ) + + testrecords_list_post_request_data_item_relationships_test_case_data_obj.additional_properties = ( + d + ) + return testrecords_list_post_request_data_item_relationships_test_case_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_test_case_data_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_test_case_data_type.py new file mode 100644 index 00000000..c9d6e8ac --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_relationships_test_case_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsListPostRequestDataItemRelationshipsTestCaseDataType( + str, Enum +): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_type.py new file mode 100644 index 00000000..f7ac4fc5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsListPostRequestDataItemType(str, Enum): + TESTRECORDS = "testrecords" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_list_post_response.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_response.py new file mode 100644 index 00000000..40f5c6f8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_response.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_post_response_data_item import ( + TestrecordsListPostResponseDataItem, + ) + + +T = TypeVar("T", bound="TestrecordsListPostResponse") + + +@_attrs_define +class TestrecordsListPostResponse: + """ + Attributes: + data (Union[Unset, List['TestrecordsListPostResponseDataItem']]): + """ + + data: Union[Unset, List["TestrecordsListPostResponseDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_post_response_data_item import ( + TestrecordsListPostResponseDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrecordsListPostResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + testrecords_list_post_response_obj = cls( + data=data, + ) + + testrecords_list_post_response_obj.additional_properties = d + return testrecords_list_post_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_response_data_item.py new file mode 100644 index 00000000..8c674f79 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_response_data_item.py @@ -0,0 +1,108 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_list_post_response_data_item_type import ( + TestrecordsListPostResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_list_post_response_data_item_links import ( + TestrecordsListPostResponseDataItemLinks, + ) + + +T = TypeVar("T", bound="TestrecordsListPostResponseDataItem") + + +@_attrs_define +class TestrecordsListPostResponseDataItem: + """ + Attributes: + type (Union[Unset, TestrecordsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: elibrary/MyTestRunId/MyProjectId/MyTestcaseId/0. + links (Union[Unset, TestrecordsListPostResponseDataItemLinks]): + """ + + type: Union[Unset, TestrecordsListPostResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + links: Union[Unset, "TestrecordsListPostResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_list_post_response_data_item_links import ( + TestrecordsListPostResponseDataItemLinks, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrecordsListPostResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordsListPostResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrecordsListPostResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrecordsListPostResponseDataItemLinks.from_dict(_links) + + testrecords_list_post_response_data_item_obj = cls( + type=type, + id=id, + links=links, + ) + + testrecords_list_post_response_data_item_obj.additional_properties = d + return testrecords_list_post_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_response_data_item_links.py new file mode 100644 index 00000000..728a542d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrecordsListPostResponseDataItemLinks") + + +@_attrs_define +class TestrecordsListPostResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/elibrary/testruns/MyTestRunId/testrecords/MyProjectId/MyTestcaseId/0. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testrecords_list_post_response_data_item_links_obj = cls( + self_=self_, + ) + + testrecords_list_post_response_data_item_links_obj.additional_properties = ( + d + ) + return testrecords_list_post_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_list_post_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_response_data_item_type.py new file mode 100644 index 00000000..6804d6f1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_list_post_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsListPostResponseDataItemType(str, Enum): + TESTRECORDS = "testrecords" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response.py new file mode 100644 index 00000000..905156ef --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response.py @@ -0,0 +1,133 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_single_get_response_data import ( + TestrecordsSingleGetResponseData, + ) + from ..models.testrecords_single_get_response_included_item import ( + TestrecordsSingleGetResponseIncludedItem, + ) + from ..models.testrecords_single_get_response_links import ( + TestrecordsSingleGetResponseLinks, + ) + + +T = TypeVar("T", bound="TestrecordsSingleGetResponse") + + +@_attrs_define +class TestrecordsSingleGetResponse: + """ + Attributes: + data (Union[Unset, TestrecordsSingleGetResponseData]): + included (Union[Unset, List['TestrecordsSingleGetResponseIncludedItem']]): Related entities might be returned, + see Rest API + User Guide. + links (Union[Unset, TestrecordsSingleGetResponseLinks]): + """ + + data: Union[Unset, "TestrecordsSingleGetResponseData"] = UNSET + included: Union[ + Unset, List["TestrecordsSingleGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "TestrecordsSingleGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_single_get_response_data import ( + TestrecordsSingleGetResponseData, + ) + from ..models.testrecords_single_get_response_included_item import ( + TestrecordsSingleGetResponseIncludedItem, + ) + from ..models.testrecords_single_get_response_links import ( + TestrecordsSingleGetResponseLinks, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, TestrecordsSingleGetResponseData] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrecordsSingleGetResponseData.from_dict(_data) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = TestrecordsSingleGetResponseIncludedItem.from_dict( + included_item_data + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrecordsSingleGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrecordsSingleGetResponseLinks.from_dict(_links) + + testrecords_single_get_response_obj = cls( + data=data, + included=included, + links=links, + ) + + testrecords_single_get_response_obj.additional_properties = d + return testrecords_single_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data.py new file mode 100644 index 00000000..60749acf --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data.py @@ -0,0 +1,195 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_single_get_response_data_type import ( + TestrecordsSingleGetResponseDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_single_get_response_data_attributes import ( + TestrecordsSingleGetResponseDataAttributes, + ) + from ..models.testrecords_single_get_response_data_links import ( + TestrecordsSingleGetResponseDataLinks, + ) + from ..models.testrecords_single_get_response_data_meta import ( + TestrecordsSingleGetResponseDataMeta, + ) + from ..models.testrecords_single_get_response_data_relationships import ( + TestrecordsSingleGetResponseDataRelationships, + ) + + +T = TypeVar("T", bound="TestrecordsSingleGetResponseData") + + +@_attrs_define +class TestrecordsSingleGetResponseData: + """ + Attributes: + type (Union[Unset, TestrecordsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: elibrary/MyTestRunId/MyProjectId/MyTestcaseId/0. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TestrecordsSingleGetResponseDataAttributes]): + relationships (Union[Unset, TestrecordsSingleGetResponseDataRelationships]): + meta (Union[Unset, TestrecordsSingleGetResponseDataMeta]): + links (Union[Unset, TestrecordsSingleGetResponseDataLinks]): + """ + + type: Union[Unset, TestrecordsSingleGetResponseDataType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestrecordsSingleGetResponseDataAttributes" + ] = UNSET + relationships: Union[ + Unset, "TestrecordsSingleGetResponseDataRelationships" + ] = UNSET + meta: Union[Unset, "TestrecordsSingleGetResponseDataMeta"] = UNSET + links: Union[Unset, "TestrecordsSingleGetResponseDataLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_single_get_response_data_attributes import ( + TestrecordsSingleGetResponseDataAttributes, + ) + from ..models.testrecords_single_get_response_data_links import ( + TestrecordsSingleGetResponseDataLinks, + ) + from ..models.testrecords_single_get_response_data_meta import ( + TestrecordsSingleGetResponseDataMeta, + ) + from ..models.testrecords_single_get_response_data_relationships import ( + TestrecordsSingleGetResponseDataRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrecordsSingleGetResponseDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordsSingleGetResponseDataType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, TestrecordsSingleGetResponseDataAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TestrecordsSingleGetResponseDataAttributes.from_dict( + _attributes + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TestrecordsSingleGetResponseDataRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + TestrecordsSingleGetResponseDataRelationships.from_dict( + _relationships + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestrecordsSingleGetResponseDataMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrecordsSingleGetResponseDataMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrecordsSingleGetResponseDataLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrecordsSingleGetResponseDataLinks.from_dict(_links) + + testrecords_single_get_response_data_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + testrecords_single_get_response_data_obj.additional_properties = d + return testrecords_single_get_response_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_attributes.py new file mode 100644 index 00000000..aef57969 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_attributes.py @@ -0,0 +1,144 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_single_get_response_data_attributes_comment import ( + TestrecordsSingleGetResponseDataAttributesComment, + ) + + +T = TypeVar("T", bound="TestrecordsSingleGetResponseDataAttributes") + + +@_attrs_define +class TestrecordsSingleGetResponseDataAttributes: + """ + Attributes: + comment (Union[Unset, TestrecordsSingleGetResponseDataAttributesComment]): + duration (Union[Unset, float]): + executed (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + iteration (Union[Unset, int]): + result (Union[Unset, str]): Example: passed. + test_case_revision (Union[Unset, str]): Example: Test Case Revision. + """ + + comment: Union[ + Unset, "TestrecordsSingleGetResponseDataAttributesComment" + ] = UNSET + duration: Union[Unset, float] = UNSET + executed: Union[Unset, datetime.datetime] = UNSET + iteration: Union[Unset, int] = UNSET + result: Union[Unset, str] = UNSET + test_case_revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + comment: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.comment, Unset): + comment = self.comment.to_dict() + + duration = self.duration + + executed: Union[Unset, str] = UNSET + if not isinstance(self.executed, Unset): + executed = self.executed.isoformat() + + iteration = self.iteration + + result = self.result + + test_case_revision = self.test_case_revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if comment is not UNSET: + field_dict["comment"] = comment + if duration is not UNSET: + field_dict["duration"] = duration + if executed is not UNSET: + field_dict["executed"] = executed + if iteration is not UNSET: + field_dict["iteration"] = iteration + if result is not UNSET: + field_dict["result"] = result + if test_case_revision is not UNSET: + field_dict["testCaseRevision"] = test_case_revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_single_get_response_data_attributes_comment import ( + TestrecordsSingleGetResponseDataAttributesComment, + ) + + d = src_dict.copy() + _comment = d.pop("comment", UNSET) + comment: Union[ + Unset, TestrecordsSingleGetResponseDataAttributesComment + ] + if isinstance(_comment, Unset): + comment = UNSET + else: + comment = ( + TestrecordsSingleGetResponseDataAttributesComment.from_dict( + _comment + ) + ) + + duration = d.pop("duration", UNSET) + + _executed = d.pop("executed", UNSET) + executed: Union[Unset, datetime.datetime] + if isinstance(_executed, Unset): + executed = UNSET + else: + executed = isoparse(_executed) + + iteration = d.pop("iteration", UNSET) + + result = d.pop("result", UNSET) + + test_case_revision = d.pop("testCaseRevision", UNSET) + + testrecords_single_get_response_data_attributes_obj = cls( + comment=comment, + duration=duration, + executed=executed, + iteration=iteration, + result=result, + test_case_revision=test_case_revision, + ) + + testrecords_single_get_response_data_attributes_obj.additional_properties = ( + d + ) + return testrecords_single_get_response_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_attributes_comment.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_attributes_comment.py new file mode 100644 index 00000000..770fd671 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_attributes_comment.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_single_get_response_data_attributes_comment_type import ( + TestrecordsSingleGetResponseDataAttributesCommentType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrecordsSingleGetResponseDataAttributesComment") + + +@_attrs_define +class TestrecordsSingleGetResponseDataAttributesComment: + """ + Attributes: + type (Union[Unset, TestrecordsSingleGetResponseDataAttributesCommentType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TestrecordsSingleGetResponseDataAttributesCommentType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrecordsSingleGetResponseDataAttributesCommentType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordsSingleGetResponseDataAttributesCommentType(_type) + + value = d.pop("value", UNSET) + + testrecords_single_get_response_data_attributes_comment_obj = cls( + type=type, + value=value, + ) + + testrecords_single_get_response_data_attributes_comment_obj.additional_properties = ( + d + ) + return testrecords_single_get_response_data_attributes_comment_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_attributes_comment_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_attributes_comment_type.py new file mode 100644 index 00000000..4d887822 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_attributes_comment_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsSingleGetResponseDataAttributesCommentType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_links.py new file mode 100644 index 00000000..35b3851c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrecordsSingleGetResponseDataLinks") + + +@_attrs_define +class TestrecordsSingleGetResponseDataLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/elibrary/testruns/MyTestRunId/testrecords/MyProjectId/MyTestcaseId/0. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testrecords_single_get_response_data_links_obj = cls( + self_=self_, + ) + + testrecords_single_get_response_data_links_obj.additional_properties = ( + d + ) + return testrecords_single_get_response_data_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_meta.py new file mode 100644 index 00000000..bffa9491 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_meta.py @@ -0,0 +1,89 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_single_get_response_data_meta_errors_item import ( + TestrecordsSingleGetResponseDataMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TestrecordsSingleGetResponseDataMeta") + + +@_attrs_define +class TestrecordsSingleGetResponseDataMeta: + """ + Attributes: + errors (Union[Unset, List['TestrecordsSingleGetResponseDataMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["TestrecordsSingleGetResponseDataMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_single_get_response_data_meta_errors_item import ( + TestrecordsSingleGetResponseDataMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ( + TestrecordsSingleGetResponseDataMetaErrorsItem.from_dict( + errors_item_data + ) + ) + + errors.append(errors_item) + + testrecords_single_get_response_data_meta_obj = cls( + errors=errors, + ) + + testrecords_single_get_response_data_meta_obj.additional_properties = d + return testrecords_single_get_response_data_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_meta_errors_item.py new file mode 100644 index 00000000..859e27f4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_meta_errors_item.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_single_get_response_data_meta_errors_item_source import ( + TestrecordsSingleGetResponseDataMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="TestrecordsSingleGetResponseDataMetaErrorsItem") + + +@_attrs_define +class TestrecordsSingleGetResponseDataMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TestrecordsSingleGetResponseDataMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "TestrecordsSingleGetResponseDataMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_single_get_response_data_meta_errors_item_source import ( + TestrecordsSingleGetResponseDataMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, TestrecordsSingleGetResponseDataMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = ( + TestrecordsSingleGetResponseDataMetaErrorsItemSource.from_dict( + _source + ) + ) + + testrecords_single_get_response_data_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + testrecords_single_get_response_data_meta_errors_item_obj.additional_properties = ( + d + ) + return testrecords_single_get_response_data_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_meta_errors_item_source.py new file mode 100644 index 00000000..918f0a8a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_meta_errors_item_source.py @@ -0,0 +1,107 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_single_get_response_data_meta_errors_item_source_resource import ( + TestrecordsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + +T = TypeVar("T", bound="TestrecordsSingleGetResponseDataMetaErrorsItemSource") + + +@_attrs_define +class TestrecordsSingleGetResponseDataMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TestrecordsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the + error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "TestrecordsSingleGetResponseDataMetaErrorsItemSourceResource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_single_get_response_data_meta_errors_item_source_resource import ( + TestrecordsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, TestrecordsSingleGetResponseDataMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TestrecordsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + + testrecords_single_get_response_data_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + testrecords_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( + d + ) + return testrecords_single_get_response_data_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..72055975 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrecordsSingleGetResponseDataMetaErrorsItemSourceResource" +) + + +@_attrs_define +class TestrecordsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + testrecords_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + testrecords_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return testrecords_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships.py new file mode 100644 index 00000000..b5837f58 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships.py @@ -0,0 +1,146 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_single_get_response_data_relationships_defect import ( + TestrecordsSingleGetResponseDataRelationshipsDefect, + ) + from ..models.testrecords_single_get_response_data_relationships_executed_by import ( + TestrecordsSingleGetResponseDataRelationshipsExecutedBy, + ) + from ..models.testrecords_single_get_response_data_relationships_test_case import ( + TestrecordsSingleGetResponseDataRelationshipsTestCase, + ) + + +T = TypeVar("T", bound="TestrecordsSingleGetResponseDataRelationships") + + +@_attrs_define +class TestrecordsSingleGetResponseDataRelationships: + """ + Attributes: + defect (Union[Unset, TestrecordsSingleGetResponseDataRelationshipsDefect]): + executed_by (Union[Unset, TestrecordsSingleGetResponseDataRelationshipsExecutedBy]): + test_case (Union[Unset, TestrecordsSingleGetResponseDataRelationshipsTestCase]): + """ + + defect: Union[ + Unset, "TestrecordsSingleGetResponseDataRelationshipsDefect" + ] = UNSET + executed_by: Union[ + Unset, "TestrecordsSingleGetResponseDataRelationshipsExecutedBy" + ] = UNSET + test_case: Union[ + Unset, "TestrecordsSingleGetResponseDataRelationshipsTestCase" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + defect: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.defect, Unset): + defect = self.defect.to_dict() + + executed_by: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.executed_by, Unset): + executed_by = self.executed_by.to_dict() + + test_case: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.test_case, Unset): + test_case = self.test_case.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if defect is not UNSET: + field_dict["defect"] = defect + if executed_by is not UNSET: + field_dict["executedBy"] = executed_by + if test_case is not UNSET: + field_dict["testCase"] = test_case + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_single_get_response_data_relationships_defect import ( + TestrecordsSingleGetResponseDataRelationshipsDefect, + ) + from ..models.testrecords_single_get_response_data_relationships_executed_by import ( + TestrecordsSingleGetResponseDataRelationshipsExecutedBy, + ) + from ..models.testrecords_single_get_response_data_relationships_test_case import ( + TestrecordsSingleGetResponseDataRelationshipsTestCase, + ) + + d = src_dict.copy() + _defect = d.pop("defect", UNSET) + defect: Union[ + Unset, TestrecordsSingleGetResponseDataRelationshipsDefect + ] + if isinstance(_defect, Unset): + defect = UNSET + else: + defect = ( + TestrecordsSingleGetResponseDataRelationshipsDefect.from_dict( + _defect + ) + ) + + _executed_by = d.pop("executedBy", UNSET) + executed_by: Union[ + Unset, TestrecordsSingleGetResponseDataRelationshipsExecutedBy + ] + if isinstance(_executed_by, Unset): + executed_by = UNSET + else: + executed_by = TestrecordsSingleGetResponseDataRelationshipsExecutedBy.from_dict( + _executed_by + ) + + _test_case = d.pop("testCase", UNSET) + test_case: Union[ + Unset, TestrecordsSingleGetResponseDataRelationshipsTestCase + ] + if isinstance(_test_case, Unset): + test_case = UNSET + else: + test_case = TestrecordsSingleGetResponseDataRelationshipsTestCase.from_dict( + _test_case + ) + + testrecords_single_get_response_data_relationships_obj = cls( + defect=defect, + executed_by=executed_by, + test_case=test_case, + ) + + testrecords_single_get_response_data_relationships_obj.additional_properties = ( + d + ) + return testrecords_single_get_response_data_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_defect.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_defect.py new file mode 100644 index 00000000..0137cb1f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_defect.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_single_get_response_data_relationships_defect_data import ( + TestrecordsSingleGetResponseDataRelationshipsDefectData, + ) + + +T = TypeVar("T", bound="TestrecordsSingleGetResponseDataRelationshipsDefect") + + +@_attrs_define +class TestrecordsSingleGetResponseDataRelationshipsDefect: + """ + Attributes: + data (Union[Unset, TestrecordsSingleGetResponseDataRelationshipsDefectData]): + """ + + data: Union[ + Unset, "TestrecordsSingleGetResponseDataRelationshipsDefectData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_single_get_response_data_relationships_defect_data import ( + TestrecordsSingleGetResponseDataRelationshipsDefectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrecordsSingleGetResponseDataRelationshipsDefectData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrecordsSingleGetResponseDataRelationshipsDefectData.from_dict( + _data + ) + + testrecords_single_get_response_data_relationships_defect_obj = cls( + data=data, + ) + + testrecords_single_get_response_data_relationships_defect_obj.additional_properties = ( + d + ) + return testrecords_single_get_response_data_relationships_defect_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_defect_data.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_defect_data.py new file mode 100644 index 00000000..4b09b79a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_defect_data.py @@ -0,0 +1,105 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_single_get_response_data_relationships_defect_data_type import ( + TestrecordsSingleGetResponseDataRelationshipsDefectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrecordsSingleGetResponseDataRelationshipsDefectData" +) + + +@_attrs_define +class TestrecordsSingleGetResponseDataRelationshipsDefectData: + """ + Attributes: + type (Union[Unset, TestrecordsSingleGetResponseDataRelationshipsDefectDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, TestrecordsSingleGetResponseDataRelationshipsDefectDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrecordsSingleGetResponseDataRelationshipsDefectDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordsSingleGetResponseDataRelationshipsDefectDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrecords_single_get_response_data_relationships_defect_data_obj = ( + cls( + type=type, + id=id, + revision=revision, + ) + ) + + testrecords_single_get_response_data_relationships_defect_data_obj.additional_properties = ( + d + ) + return ( + testrecords_single_get_response_data_relationships_defect_data_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_defect_data_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_defect_data_type.py new file mode 100644 index 00000000..7d44122e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_defect_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsSingleGetResponseDataRelationshipsDefectDataType(str, Enum): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_executed_by.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_executed_by.py new file mode 100644 index 00000000..25052831 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_executed_by.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_single_get_response_data_relationships_executed_by_data import ( + TestrecordsSingleGetResponseDataRelationshipsExecutedByData, + ) + + +T = TypeVar( + "T", bound="TestrecordsSingleGetResponseDataRelationshipsExecutedBy" +) + + +@_attrs_define +class TestrecordsSingleGetResponseDataRelationshipsExecutedBy: + """ + Attributes: + data (Union[Unset, TestrecordsSingleGetResponseDataRelationshipsExecutedByData]): + """ + + data: Union[ + Unset, "TestrecordsSingleGetResponseDataRelationshipsExecutedByData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_single_get_response_data_relationships_executed_by_data import ( + TestrecordsSingleGetResponseDataRelationshipsExecutedByData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrecordsSingleGetResponseDataRelationshipsExecutedByData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrecordsSingleGetResponseDataRelationshipsExecutedByData.from_dict( + _data + ) + + testrecords_single_get_response_data_relationships_executed_by_obj = ( + cls( + data=data, + ) + ) + + testrecords_single_get_response_data_relationships_executed_by_obj.additional_properties = ( + d + ) + return ( + testrecords_single_get_response_data_relationships_executed_by_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_executed_by_data.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_executed_by_data.py new file mode 100644 index 00000000..efb1efe3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_executed_by_data.py @@ -0,0 +1,102 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_single_get_response_data_relationships_executed_by_data_type import ( + TestrecordsSingleGetResponseDataRelationshipsExecutedByDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrecordsSingleGetResponseDataRelationshipsExecutedByData" +) + + +@_attrs_define +class TestrecordsSingleGetResponseDataRelationshipsExecutedByData: + """ + Attributes: + type (Union[Unset, TestrecordsSingleGetResponseDataRelationshipsExecutedByDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, TestrecordsSingleGetResponseDataRelationshipsExecutedByDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrecordsSingleGetResponseDataRelationshipsExecutedByDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordsSingleGetResponseDataRelationshipsExecutedByDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrecords_single_get_response_data_relationships_executed_by_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrecords_single_get_response_data_relationships_executed_by_data_obj.additional_properties = ( + d + ) + return testrecords_single_get_response_data_relationships_executed_by_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_executed_by_data_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_executed_by_data_type.py new file mode 100644 index 00000000..229490d6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_executed_by_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsSingleGetResponseDataRelationshipsExecutedByDataType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_test_case.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_test_case.py new file mode 100644 index 00000000..7af5794d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_test_case.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_single_get_response_data_relationships_test_case_data import ( + TestrecordsSingleGetResponseDataRelationshipsTestCaseData, + ) + + +T = TypeVar("T", bound="TestrecordsSingleGetResponseDataRelationshipsTestCase") + + +@_attrs_define +class TestrecordsSingleGetResponseDataRelationshipsTestCase: + """ + Attributes: + data (Union[Unset, TestrecordsSingleGetResponseDataRelationshipsTestCaseData]): + """ + + data: Union[ + Unset, "TestrecordsSingleGetResponseDataRelationshipsTestCaseData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_single_get_response_data_relationships_test_case_data import ( + TestrecordsSingleGetResponseDataRelationshipsTestCaseData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrecordsSingleGetResponseDataRelationshipsTestCaseData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrecordsSingleGetResponseDataRelationshipsTestCaseData.from_dict( + _data + ) + + testrecords_single_get_response_data_relationships_test_case_obj = cls( + data=data, + ) + + testrecords_single_get_response_data_relationships_test_case_obj.additional_properties = ( + d + ) + return testrecords_single_get_response_data_relationships_test_case_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_test_case_data.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_test_case_data.py new file mode 100644 index 00000000..bdb36df1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_test_case_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_single_get_response_data_relationships_test_case_data_type import ( + TestrecordsSingleGetResponseDataRelationshipsTestCaseDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrecordsSingleGetResponseDataRelationshipsTestCaseData" +) + + +@_attrs_define +class TestrecordsSingleGetResponseDataRelationshipsTestCaseData: + """ + Attributes: + type (Union[Unset, TestrecordsSingleGetResponseDataRelationshipsTestCaseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, TestrecordsSingleGetResponseDataRelationshipsTestCaseDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrecordsSingleGetResponseDataRelationshipsTestCaseDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + TestrecordsSingleGetResponseDataRelationshipsTestCaseDataType( + _type + ) + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrecords_single_get_response_data_relationships_test_case_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrecords_single_get_response_data_relationships_test_case_data_obj.additional_properties = ( + d + ) + return testrecords_single_get_response_data_relationships_test_case_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_test_case_data_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_test_case_data_type.py new file mode 100644 index 00000000..a7024087 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_relationships_test_case_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsSingleGetResponseDataRelationshipsTestCaseDataType(str, Enum): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_type.py new file mode 100644 index 00000000..38a095b0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsSingleGetResponseDataType(str, Enum): + TESTRECORDS = "testrecords" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_included_item.py new file mode 100644 index 00000000..b7360bb2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestrecordsSingleGetResponseIncludedItem") + + +@_attrs_define +class TestrecordsSingleGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + testrecords_single_get_response_included_item_obj = cls() + + testrecords_single_get_response_included_item_obj.additional_properties = ( + d + ) + return testrecords_single_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_links.py new file mode 100644 index 00000000..ca1af2ee --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_get_response_links.py @@ -0,0 +1,64 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrecordsSingleGetResponseLinks") + + +@_attrs_define +class TestrecordsSingleGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/elibrary/testruns/MyTestRunId/testrecords/MyProjectId/MyTestcaseId/0. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testrecords_single_get_response_links_obj = cls( + self_=self_, + ) + + testrecords_single_get_response_links_obj.additional_properties = d + return testrecords_single_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request.py new file mode 100644 index 00000000..4c6ee7e1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request.py @@ -0,0 +1,80 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_single_patch_request_data import ( + TestrecordsSinglePatchRequestData, + ) + + +T = TypeVar("T", bound="TestrecordsSinglePatchRequest") + + +@_attrs_define +class TestrecordsSinglePatchRequest: + """ + Attributes: + data (Union[Unset, TestrecordsSinglePatchRequestData]): + """ + + data: Union[Unset, "TestrecordsSinglePatchRequestData"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_single_patch_request_data import ( + TestrecordsSinglePatchRequestData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, TestrecordsSinglePatchRequestData] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrecordsSinglePatchRequestData.from_dict(_data) + + testrecords_single_patch_request_obj = cls( + data=data, + ) + + testrecords_single_patch_request_obj.additional_properties = d + return testrecords_single_patch_request_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data.py new file mode 100644 index 00000000..aa9aa6a5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data.py @@ -0,0 +1,142 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_single_patch_request_data_type import ( + TestrecordsSinglePatchRequestDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_single_patch_request_data_attributes import ( + TestrecordsSinglePatchRequestDataAttributes, + ) + from ..models.testrecords_single_patch_request_data_relationships import ( + TestrecordsSinglePatchRequestDataRelationships, + ) + + +T = TypeVar("T", bound="TestrecordsSinglePatchRequestData") + + +@_attrs_define +class TestrecordsSinglePatchRequestData: + """ + Attributes: + type (Union[Unset, TestrecordsSinglePatchRequestDataType]): + id (Union[Unset, str]): Example: elibrary/MyTestRunId/MyProjectId/MyTestcaseId/0. + attributes (Union[Unset, TestrecordsSinglePatchRequestDataAttributes]): + relationships (Union[Unset, TestrecordsSinglePatchRequestDataRelationships]): + """ + + type: Union[Unset, TestrecordsSinglePatchRequestDataType] = UNSET + id: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestrecordsSinglePatchRequestDataAttributes" + ] = UNSET + relationships: Union[ + Unset, "TestrecordsSinglePatchRequestDataRelationships" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_single_patch_request_data_attributes import ( + TestrecordsSinglePatchRequestDataAttributes, + ) + from ..models.testrecords_single_patch_request_data_relationships import ( + TestrecordsSinglePatchRequestDataRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrecordsSinglePatchRequestDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordsSinglePatchRequestDataType(_type) + + id = d.pop("id", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, TestrecordsSinglePatchRequestDataAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TestrecordsSinglePatchRequestDataAttributes.from_dict( + _attributes + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TestrecordsSinglePatchRequestDataRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + TestrecordsSinglePatchRequestDataRelationships.from_dict( + _relationships + ) + ) + + testrecords_single_patch_request_data_obj = cls( + type=type, + id=id, + attributes=attributes, + relationships=relationships, + ) + + testrecords_single_patch_request_data_obj.additional_properties = d + return testrecords_single_patch_request_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_attributes.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_attributes.py new file mode 100644 index 00000000..748519b9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_attributes.py @@ -0,0 +1,135 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_single_patch_request_data_attributes_comment import ( + TestrecordsSinglePatchRequestDataAttributesComment, + ) + + +T = TypeVar("T", bound="TestrecordsSinglePatchRequestDataAttributes") + + +@_attrs_define +class TestrecordsSinglePatchRequestDataAttributes: + """ + Attributes: + comment (Union[Unset, TestrecordsSinglePatchRequestDataAttributesComment]): + duration (Union[Unset, float]): + executed (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + result (Union[Unset, str]): Example: passed. + test_case_revision (Union[Unset, str]): Example: Test Case Revision. + """ + + comment: Union[ + Unset, "TestrecordsSinglePatchRequestDataAttributesComment" + ] = UNSET + duration: Union[Unset, float] = UNSET + executed: Union[Unset, datetime.datetime] = UNSET + result: Union[Unset, str] = UNSET + test_case_revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + comment: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.comment, Unset): + comment = self.comment.to_dict() + + duration = self.duration + + executed: Union[Unset, str] = UNSET + if not isinstance(self.executed, Unset): + executed = self.executed.isoformat() + + result = self.result + + test_case_revision = self.test_case_revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if comment is not UNSET: + field_dict["comment"] = comment + if duration is not UNSET: + field_dict["duration"] = duration + if executed is not UNSET: + field_dict["executed"] = executed + if result is not UNSET: + field_dict["result"] = result + if test_case_revision is not UNSET: + field_dict["testCaseRevision"] = test_case_revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_single_patch_request_data_attributes_comment import ( + TestrecordsSinglePatchRequestDataAttributesComment, + ) + + d = src_dict.copy() + _comment = d.pop("comment", UNSET) + comment: Union[ + Unset, TestrecordsSinglePatchRequestDataAttributesComment + ] + if isinstance(_comment, Unset): + comment = UNSET + else: + comment = ( + TestrecordsSinglePatchRequestDataAttributesComment.from_dict( + _comment + ) + ) + + duration = d.pop("duration", UNSET) + + _executed = d.pop("executed", UNSET) + executed: Union[Unset, datetime.datetime] + if isinstance(_executed, Unset): + executed = UNSET + else: + executed = isoparse(_executed) + + result = d.pop("result", UNSET) + + test_case_revision = d.pop("testCaseRevision", UNSET) + + testrecords_single_patch_request_data_attributes_obj = cls( + comment=comment, + duration=duration, + executed=executed, + result=result, + test_case_revision=test_case_revision, + ) + + testrecords_single_patch_request_data_attributes_obj.additional_properties = ( + d + ) + return testrecords_single_patch_request_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_attributes_comment.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_attributes_comment.py new file mode 100644 index 00000000..35f058c4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_attributes_comment.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_single_patch_request_data_attributes_comment_type import ( + TestrecordsSinglePatchRequestDataAttributesCommentType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrecordsSinglePatchRequestDataAttributesComment") + + +@_attrs_define +class TestrecordsSinglePatchRequestDataAttributesComment: + """ + Attributes: + type (Union[Unset, TestrecordsSinglePatchRequestDataAttributesCommentType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TestrecordsSinglePatchRequestDataAttributesCommentType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrecordsSinglePatchRequestDataAttributesCommentType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordsSinglePatchRequestDataAttributesCommentType( + _type + ) + + value = d.pop("value", UNSET) + + testrecords_single_patch_request_data_attributes_comment_obj = cls( + type=type, + value=value, + ) + + testrecords_single_patch_request_data_attributes_comment_obj.additional_properties = ( + d + ) + return testrecords_single_patch_request_data_attributes_comment_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_attributes_comment_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_attributes_comment_type.py new file mode 100644 index 00000000..9255d9ed --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_attributes_comment_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsSinglePatchRequestDataAttributesCommentType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships.py new file mode 100644 index 00000000..7663aa75 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_single_patch_request_data_relationships_defect import ( + TestrecordsSinglePatchRequestDataRelationshipsDefect, + ) + from ..models.testrecords_single_patch_request_data_relationships_executed_by import ( + TestrecordsSinglePatchRequestDataRelationshipsExecutedBy, + ) + + +T = TypeVar("T", bound="TestrecordsSinglePatchRequestDataRelationships") + + +@_attrs_define +class TestrecordsSinglePatchRequestDataRelationships: + """ + Attributes: + defect (Union[Unset, TestrecordsSinglePatchRequestDataRelationshipsDefect]): + executed_by (Union[Unset, TestrecordsSinglePatchRequestDataRelationshipsExecutedBy]): + """ + + defect: Union[ + Unset, "TestrecordsSinglePatchRequestDataRelationshipsDefect" + ] = UNSET + executed_by: Union[ + Unset, "TestrecordsSinglePatchRequestDataRelationshipsExecutedBy" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + defect: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.defect, Unset): + defect = self.defect.to_dict() + + executed_by: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.executed_by, Unset): + executed_by = self.executed_by.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if defect is not UNSET: + field_dict["defect"] = defect + if executed_by is not UNSET: + field_dict["executedBy"] = executed_by + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_single_patch_request_data_relationships_defect import ( + TestrecordsSinglePatchRequestDataRelationshipsDefect, + ) + from ..models.testrecords_single_patch_request_data_relationships_executed_by import ( + TestrecordsSinglePatchRequestDataRelationshipsExecutedBy, + ) + + d = src_dict.copy() + _defect = d.pop("defect", UNSET) + defect: Union[ + Unset, TestrecordsSinglePatchRequestDataRelationshipsDefect + ] + if isinstance(_defect, Unset): + defect = UNSET + else: + defect = ( + TestrecordsSinglePatchRequestDataRelationshipsDefect.from_dict( + _defect + ) + ) + + _executed_by = d.pop("executedBy", UNSET) + executed_by: Union[ + Unset, TestrecordsSinglePatchRequestDataRelationshipsExecutedBy + ] + if isinstance(_executed_by, Unset): + executed_by = UNSET + else: + executed_by = TestrecordsSinglePatchRequestDataRelationshipsExecutedBy.from_dict( + _executed_by + ) + + testrecords_single_patch_request_data_relationships_obj = cls( + defect=defect, + executed_by=executed_by, + ) + + testrecords_single_patch_request_data_relationships_obj.additional_properties = ( + d + ) + return testrecords_single_patch_request_data_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_defect.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_defect.py new file mode 100644 index 00000000..bf8227f6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_defect.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_single_patch_request_data_relationships_defect_data import ( + TestrecordsSinglePatchRequestDataRelationshipsDefectData, + ) + + +T = TypeVar("T", bound="TestrecordsSinglePatchRequestDataRelationshipsDefect") + + +@_attrs_define +class TestrecordsSinglePatchRequestDataRelationshipsDefect: + """ + Attributes: + data (Union[Unset, TestrecordsSinglePatchRequestDataRelationshipsDefectData]): + """ + + data: Union[ + Unset, "TestrecordsSinglePatchRequestDataRelationshipsDefectData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_single_patch_request_data_relationships_defect_data import ( + TestrecordsSinglePatchRequestDataRelationshipsDefectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrecordsSinglePatchRequestDataRelationshipsDefectData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrecordsSinglePatchRequestDataRelationshipsDefectData.from_dict( + _data + ) + + testrecords_single_patch_request_data_relationships_defect_obj = cls( + data=data, + ) + + testrecords_single_patch_request_data_relationships_defect_obj.additional_properties = ( + d + ) + return testrecords_single_patch_request_data_relationships_defect_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_defect_data.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_defect_data.py new file mode 100644 index 00000000..535e2018 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_defect_data.py @@ -0,0 +1,98 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_single_patch_request_data_relationships_defect_data_type import ( + TestrecordsSinglePatchRequestDataRelationshipsDefectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrecordsSinglePatchRequestDataRelationshipsDefectData" +) + + +@_attrs_define +class TestrecordsSinglePatchRequestDataRelationshipsDefectData: + """ + Attributes: + type (Union[Unset, TestrecordsSinglePatchRequestDataRelationshipsDefectDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + """ + + type: Union[ + Unset, TestrecordsSinglePatchRequestDataRelationshipsDefectDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrecordsSinglePatchRequestDataRelationshipsDefectDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + TestrecordsSinglePatchRequestDataRelationshipsDefectDataType( + _type + ) + ) + + id = d.pop("id", UNSET) + + testrecords_single_patch_request_data_relationships_defect_data_obj = ( + cls( + type=type, + id=id, + ) + ) + + testrecords_single_patch_request_data_relationships_defect_data_obj.additional_properties = ( + d + ) + return ( + testrecords_single_patch_request_data_relationships_defect_data_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_defect_data_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_defect_data_type.py new file mode 100644 index 00000000..817c48e5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_defect_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsSinglePatchRequestDataRelationshipsDefectDataType(str, Enum): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_executed_by.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_executed_by.py new file mode 100644 index 00000000..01569ee7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_executed_by.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrecords_single_patch_request_data_relationships_executed_by_data import ( + TestrecordsSinglePatchRequestDataRelationshipsExecutedByData, + ) + + +T = TypeVar( + "T", bound="TestrecordsSinglePatchRequestDataRelationshipsExecutedBy" +) + + +@_attrs_define +class TestrecordsSinglePatchRequestDataRelationshipsExecutedBy: + """ + Attributes: + data (Union[Unset, TestrecordsSinglePatchRequestDataRelationshipsExecutedByData]): + """ + + data: Union[ + Unset, "TestrecordsSinglePatchRequestDataRelationshipsExecutedByData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrecords_single_patch_request_data_relationships_executed_by_data import ( + TestrecordsSinglePatchRequestDataRelationshipsExecutedByData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrecordsSinglePatchRequestDataRelationshipsExecutedByData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrecordsSinglePatchRequestDataRelationshipsExecutedByData.from_dict( + _data + ) + + testrecords_single_patch_request_data_relationships_executed_by_obj = ( + cls( + data=data, + ) + ) + + testrecords_single_patch_request_data_relationships_executed_by_obj.additional_properties = ( + d + ) + return ( + testrecords_single_patch_request_data_relationships_executed_by_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_executed_by_data.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_executed_by_data.py new file mode 100644 index 00000000..bb060369 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_executed_by_data.py @@ -0,0 +1,93 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrecords_single_patch_request_data_relationships_executed_by_data_type import ( + TestrecordsSinglePatchRequestDataRelationshipsExecutedByDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrecordsSinglePatchRequestDataRelationshipsExecutedByData" +) + + +@_attrs_define +class TestrecordsSinglePatchRequestDataRelationshipsExecutedByData: + """ + Attributes: + type (Union[Unset, TestrecordsSinglePatchRequestDataRelationshipsExecutedByDataType]): + id (Union[Unset, str]): Example: MyUserId. + """ + + type: Union[ + Unset, TestrecordsSinglePatchRequestDataRelationshipsExecutedByDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrecordsSinglePatchRequestDataRelationshipsExecutedByDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrecordsSinglePatchRequestDataRelationshipsExecutedByDataType( + _type + ) + + id = d.pop("id", UNSET) + + testrecords_single_patch_request_data_relationships_executed_by_data_obj = cls( + type=type, + id=id, + ) + + testrecords_single_patch_request_data_relationships_executed_by_data_obj.additional_properties = ( + d + ) + return testrecords_single_patch_request_data_relationships_executed_by_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_executed_by_data_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_executed_by_data_type.py new file mode 100644 index 00000000..9a9a4913 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_relationships_executed_by_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsSinglePatchRequestDataRelationshipsExecutedByDataType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_type.py b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_type.py new file mode 100644 index 00000000..47892ffa --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrecords_single_patch_request_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrecordsSinglePatchRequestDataType(str, Enum): + TESTRECORDS = "testrecords" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response.py new file mode 100644 index 00000000..c7a6ffa4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response.py @@ -0,0 +1,164 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_list_get_response_data_item import ( + TestrunAttachmentsListGetResponseDataItem, + ) + from ..models.testrun_attachments_list_get_response_included_item import ( + TestrunAttachmentsListGetResponseIncludedItem, + ) + from ..models.testrun_attachments_list_get_response_links import ( + TestrunAttachmentsListGetResponseLinks, + ) + from ..models.testrun_attachments_list_get_response_meta import ( + TestrunAttachmentsListGetResponseMeta, + ) + + +T = TypeVar("T", bound="TestrunAttachmentsListGetResponse") + + +@_attrs_define +class TestrunAttachmentsListGetResponse: + """ + Attributes: + meta (Union[Unset, TestrunAttachmentsListGetResponseMeta]): + data (Union[Unset, List['TestrunAttachmentsListGetResponseDataItem']]): + included (Union[Unset, List['TestrunAttachmentsListGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, TestrunAttachmentsListGetResponseLinks]): + """ + + meta: Union[Unset, "TestrunAttachmentsListGetResponseMeta"] = UNSET + data: Union[ + Unset, List["TestrunAttachmentsListGetResponseDataItem"] + ] = UNSET + included: Union[ + Unset, List["TestrunAttachmentsListGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "TestrunAttachmentsListGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_list_get_response_data_item import ( + TestrunAttachmentsListGetResponseDataItem, + ) + from ..models.testrun_attachments_list_get_response_included_item import ( + TestrunAttachmentsListGetResponseIncludedItem, + ) + from ..models.testrun_attachments_list_get_response_links import ( + TestrunAttachmentsListGetResponseLinks, + ) + from ..models.testrun_attachments_list_get_response_meta import ( + TestrunAttachmentsListGetResponseMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestrunAttachmentsListGetResponseMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrunAttachmentsListGetResponseMeta.from_dict(_meta) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrunAttachmentsListGetResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + TestrunAttachmentsListGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrunAttachmentsListGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrunAttachmentsListGetResponseLinks.from_dict(_links) + + testrun_attachments_list_get_response_obj = cls( + meta=meta, + data=data, + included=included, + links=links, + ) + + testrun_attachments_list_get_response_obj.additional_properties = d + return testrun_attachments_list_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item.py new file mode 100644 index 00000000..0462055e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item.py @@ -0,0 +1,205 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_attachments_list_get_response_data_item_type import ( + TestrunAttachmentsListGetResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_list_get_response_data_item_attributes import ( + TestrunAttachmentsListGetResponseDataItemAttributes, + ) + from ..models.testrun_attachments_list_get_response_data_item_links import ( + TestrunAttachmentsListGetResponseDataItemLinks, + ) + from ..models.testrun_attachments_list_get_response_data_item_meta import ( + TestrunAttachmentsListGetResponseDataItemMeta, + ) + from ..models.testrun_attachments_list_get_response_data_item_relationships import ( + TestrunAttachmentsListGetResponseDataItemRelationships, + ) + + +T = TypeVar("T", bound="TestrunAttachmentsListGetResponseDataItem") + + +@_attrs_define +class TestrunAttachmentsListGetResponseDataItem: + """ + Attributes: + type (Union[Unset, TestrunAttachmentsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyAttachmentId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TestrunAttachmentsListGetResponseDataItemAttributes]): + relationships (Union[Unset, TestrunAttachmentsListGetResponseDataItemRelationships]): + meta (Union[Unset, TestrunAttachmentsListGetResponseDataItemMeta]): + links (Union[Unset, TestrunAttachmentsListGetResponseDataItemLinks]): + """ + + type: Union[Unset, TestrunAttachmentsListGetResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestrunAttachmentsListGetResponseDataItemAttributes" + ] = UNSET + relationships: Union[ + Unset, "TestrunAttachmentsListGetResponseDataItemRelationships" + ] = UNSET + meta: Union[Unset, "TestrunAttachmentsListGetResponseDataItemMeta"] = UNSET + links: Union[ + Unset, "TestrunAttachmentsListGetResponseDataItemLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_list_get_response_data_item_attributes import ( + TestrunAttachmentsListGetResponseDataItemAttributes, + ) + from ..models.testrun_attachments_list_get_response_data_item_links import ( + TestrunAttachmentsListGetResponseDataItemLinks, + ) + from ..models.testrun_attachments_list_get_response_data_item_meta import ( + TestrunAttachmentsListGetResponseDataItemMeta, + ) + from ..models.testrun_attachments_list_get_response_data_item_relationships import ( + TestrunAttachmentsListGetResponseDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrunAttachmentsListGetResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunAttachmentsListGetResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TestrunAttachmentsListGetResponseDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + TestrunAttachmentsListGetResponseDataItemAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TestrunAttachmentsListGetResponseDataItemRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = TestrunAttachmentsListGetResponseDataItemRelationships.from_dict( + _relationships + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestrunAttachmentsListGetResponseDataItemMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrunAttachmentsListGetResponseDataItemMeta.from_dict( + _meta + ) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrunAttachmentsListGetResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrunAttachmentsListGetResponseDataItemLinks.from_dict( + _links + ) + + testrun_attachments_list_get_response_data_item_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + testrun_attachments_list_get_response_data_item_obj.additional_properties = ( + d + ) + return testrun_attachments_list_get_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_attributes.py new file mode 100644 index 00000000..12f9b2c8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_attributes.py @@ -0,0 +1,110 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunAttachmentsListGetResponseDataItemAttributes") + + +@_attrs_define +class TestrunAttachmentsListGetResponseDataItemAttributes: + """ + Attributes: + file_name (Union[Unset, str]): Example: File Name. + id (Union[Unset, str]): Example: MyAttachmentId. + length (Union[Unset, int]): + title (Union[Unset, str]): Example: Title. + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + """ + + file_name: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + length: Union[Unset, int] = UNSET + title: Union[Unset, str] = UNSET + updated: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + file_name = self.file_name + + id = self.id + + length = self.length + + title = self.title + + updated: Union[Unset, str] = UNSET + if not isinstance(self.updated, Unset): + updated = self.updated.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if file_name is not UNSET: + field_dict["fileName"] = file_name + if id is not UNSET: + field_dict["id"] = id + if length is not UNSET: + field_dict["length"] = length + if title is not UNSET: + field_dict["title"] = title + if updated is not UNSET: + field_dict["updated"] = updated + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + file_name = d.pop("fileName", UNSET) + + id = d.pop("id", UNSET) + + length = d.pop("length", UNSET) + + title = d.pop("title", UNSET) + + _updated = d.pop("updated", UNSET) + updated: Union[Unset, datetime.datetime] + if isinstance(_updated, Unset): + updated = UNSET + else: + updated = isoparse(_updated) + + testrun_attachments_list_get_response_data_item_attributes_obj = cls( + file_name=file_name, + id=id, + length=length, + title=title, + updated=updated, + ) + + testrun_attachments_list_get_response_data_item_attributes_obj.additional_properties = ( + d + ) + return testrun_attachments_list_get_response_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_links.py new file mode 100644 index 00000000..1d50215e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_links.py @@ -0,0 +1,76 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunAttachmentsListGetResponseDataItemLinks") + + +@_attrs_define +class TestrunAttachmentsListGetResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/attachments/MyAttachmentId?revision=1234. + content (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/attachments/MyAttachmentId/content?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + content: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + content = self.content + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if content is not UNSET: + field_dict["content"] = content + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + content = d.pop("content", UNSET) + + testrun_attachments_list_get_response_data_item_links_obj = cls( + self_=self_, + content=content, + ) + + testrun_attachments_list_get_response_data_item_links_obj.additional_properties = ( + d + ) + return testrun_attachments_list_get_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_meta.py new file mode 100644 index 00000000..6a970fe7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_meta.py @@ -0,0 +1,89 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_list_get_response_data_item_meta_errors_item import ( + TestrunAttachmentsListGetResponseDataItemMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TestrunAttachmentsListGetResponseDataItemMeta") + + +@_attrs_define +class TestrunAttachmentsListGetResponseDataItemMeta: + """ + Attributes: + errors (Union[Unset, List['TestrunAttachmentsListGetResponseDataItemMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["TestrunAttachmentsListGetResponseDataItemMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_list_get_response_data_item_meta_errors_item import ( + TestrunAttachmentsListGetResponseDataItemMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = TestrunAttachmentsListGetResponseDataItemMetaErrorsItem.from_dict( + errors_item_data + ) + + errors.append(errors_item) + + testrun_attachments_list_get_response_data_item_meta_obj = cls( + errors=errors, + ) + + testrun_attachments_list_get_response_data_item_meta_obj.additional_properties = ( + d + ) + return testrun_attachments_list_get_response_data_item_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_meta_errors_item.py new file mode 100644 index 00000000..4eeb9690 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_meta_errors_item.py @@ -0,0 +1,119 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_list_get_response_data_item_meta_errors_item_source import ( + TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSource, + ) + + +T = TypeVar( + "T", bound="TestrunAttachmentsListGetResponseDataItemMetaErrorsItem" +) + + +@_attrs_define +class TestrunAttachmentsListGetResponseDataItemMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_list_get_response_data_item_meta_errors_item_source import ( + TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, + TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSource, + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSource.from_dict( + _source + ) + + testrun_attachments_list_get_response_data_item_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + testrun_attachments_list_get_response_data_item_meta_errors_item_obj.additional_properties = ( + d + ) + return testrun_attachments_list_get_response_data_item_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_meta_errors_item_source.py new file mode 100644 index 00000000..d942186a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_meta_errors_item_source.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_list_get_response_data_item_meta_errors_item_source_resource import ( + TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", bound="TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSource" +) + + +@_attrs_define +class TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing + the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_list_get_response_data_item_meta_errors_item_source_resource import ( + TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + + testrun_attachments_list_get_response_data_item_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + testrun_attachments_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( + d + ) + return testrun_attachments_list_get_response_data_item_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..2dc52448 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource", +) + + +@_attrs_define +class TestrunAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + testrun_attachments_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + testrun_attachments_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return testrun_attachments_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships.py new file mode 100644 index 00000000..e0510022 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships.py @@ -0,0 +1,123 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_list_get_response_data_item_relationships_author import ( + TestrunAttachmentsListGetResponseDataItemRelationshipsAuthor, + ) + from ..models.testrun_attachments_list_get_response_data_item_relationships_project import ( + TestrunAttachmentsListGetResponseDataItemRelationshipsProject, + ) + + +T = TypeVar( + "T", bound="TestrunAttachmentsListGetResponseDataItemRelationships" +) + + +@_attrs_define +class TestrunAttachmentsListGetResponseDataItemRelationships: + """ + Attributes: + author (Union[Unset, TestrunAttachmentsListGetResponseDataItemRelationshipsAuthor]): + project (Union[Unset, TestrunAttachmentsListGetResponseDataItemRelationshipsProject]): + """ + + author: Union[ + Unset, "TestrunAttachmentsListGetResponseDataItemRelationshipsAuthor" + ] = UNSET + project: Union[ + Unset, "TestrunAttachmentsListGetResponseDataItemRelationshipsProject" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + author: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.author, Unset): + author = self.author.to_dict() + + project: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project, Unset): + project = self.project.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if author is not UNSET: + field_dict["author"] = author + if project is not UNSET: + field_dict["project"] = project + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_list_get_response_data_item_relationships_author import ( + TestrunAttachmentsListGetResponseDataItemRelationshipsAuthor, + ) + from ..models.testrun_attachments_list_get_response_data_item_relationships_project import ( + TestrunAttachmentsListGetResponseDataItemRelationshipsProject, + ) + + d = src_dict.copy() + _author = d.pop("author", UNSET) + author: Union[ + Unset, TestrunAttachmentsListGetResponseDataItemRelationshipsAuthor + ] + if isinstance(_author, Unset): + author = UNSET + else: + author = TestrunAttachmentsListGetResponseDataItemRelationshipsAuthor.from_dict( + _author + ) + + _project = d.pop("project", UNSET) + project: Union[ + Unset, + TestrunAttachmentsListGetResponseDataItemRelationshipsProject, + ] + if isinstance(_project, Unset): + project = UNSET + else: + project = TestrunAttachmentsListGetResponseDataItemRelationshipsProject.from_dict( + _project + ) + + testrun_attachments_list_get_response_data_item_relationships_obj = ( + cls( + author=author, + project=project, + ) + ) + + testrun_attachments_list_get_response_data_item_relationships_obj.additional_properties = ( + d + ) + return ( + testrun_attachments_list_get_response_data_item_relationships_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_author.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_author.py new file mode 100644 index 00000000..da1926b5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_author.py @@ -0,0 +1,92 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_list_get_response_data_item_relationships_author_data import ( + TestrunAttachmentsListGetResponseDataItemRelationshipsAuthorData, + ) + + +T = TypeVar( + "T", bound="TestrunAttachmentsListGetResponseDataItemRelationshipsAuthor" +) + + +@_attrs_define +class TestrunAttachmentsListGetResponseDataItemRelationshipsAuthor: + """ + Attributes: + data (Union[Unset, TestrunAttachmentsListGetResponseDataItemRelationshipsAuthorData]): + """ + + data: Union[ + Unset, + "TestrunAttachmentsListGetResponseDataItemRelationshipsAuthorData", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_list_get_response_data_item_relationships_author_data import ( + TestrunAttachmentsListGetResponseDataItemRelationshipsAuthorData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestrunAttachmentsListGetResponseDataItemRelationshipsAuthorData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunAttachmentsListGetResponseDataItemRelationshipsAuthorData.from_dict( + _data + ) + + testrun_attachments_list_get_response_data_item_relationships_author_obj = cls( + data=data, + ) + + testrun_attachments_list_get_response_data_item_relationships_author_obj.additional_properties = ( + d + ) + return testrun_attachments_list_get_response_data_item_relationships_author_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_author_data.py new file mode 100644 index 00000000..ab4cd945 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_author_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_attachments_list_get_response_data_item_relationships_author_data_type import ( + TestrunAttachmentsListGetResponseDataItemRelationshipsAuthorDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrunAttachmentsListGetResponseDataItemRelationshipsAuthorData", +) + + +@_attrs_define +class TestrunAttachmentsListGetResponseDataItemRelationshipsAuthorData: + """ + Attributes: + type (Union[Unset, TestrunAttachmentsListGetResponseDataItemRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestrunAttachmentsListGetResponseDataItemRelationshipsAuthorDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunAttachmentsListGetResponseDataItemRelationshipsAuthorDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunAttachmentsListGetResponseDataItemRelationshipsAuthorDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrun_attachments_list_get_response_data_item_relationships_author_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrun_attachments_list_get_response_data_item_relationships_author_data_obj.additional_properties = ( + d + ) + return testrun_attachments_list_get_response_data_item_relationships_author_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_author_data_type.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_author_data_type.py new file mode 100644 index 00000000..f2dbf17a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_author_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunAttachmentsListGetResponseDataItemRelationshipsAuthorDataType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_project.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_project.py new file mode 100644 index 00000000..95afd6de --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_project.py @@ -0,0 +1,92 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_list_get_response_data_item_relationships_project_data import ( + TestrunAttachmentsListGetResponseDataItemRelationshipsProjectData, + ) + + +T = TypeVar( + "T", bound="TestrunAttachmentsListGetResponseDataItemRelationshipsProject" +) + + +@_attrs_define +class TestrunAttachmentsListGetResponseDataItemRelationshipsProject: + """ + Attributes: + data (Union[Unset, TestrunAttachmentsListGetResponseDataItemRelationshipsProjectData]): + """ + + data: Union[ + Unset, + "TestrunAttachmentsListGetResponseDataItemRelationshipsProjectData", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_list_get_response_data_item_relationships_project_data import ( + TestrunAttachmentsListGetResponseDataItemRelationshipsProjectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestrunAttachmentsListGetResponseDataItemRelationshipsProjectData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunAttachmentsListGetResponseDataItemRelationshipsProjectData.from_dict( + _data + ) + + testrun_attachments_list_get_response_data_item_relationships_project_obj = cls( + data=data, + ) + + testrun_attachments_list_get_response_data_item_relationships_project_obj.additional_properties = ( + d + ) + return testrun_attachments_list_get_response_data_item_relationships_project_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_project_data.py new file mode 100644 index 00000000..3dbb6e21 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_project_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_attachments_list_get_response_data_item_relationships_project_data_type import ( + TestrunAttachmentsListGetResponseDataItemRelationshipsProjectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrunAttachmentsListGetResponseDataItemRelationshipsProjectData", +) + + +@_attrs_define +class TestrunAttachmentsListGetResponseDataItemRelationshipsProjectData: + """ + Attributes: + type (Union[Unset, TestrunAttachmentsListGetResponseDataItemRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestrunAttachmentsListGetResponseDataItemRelationshipsProjectDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunAttachmentsListGetResponseDataItemRelationshipsProjectDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunAttachmentsListGetResponseDataItemRelationshipsProjectDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrun_attachments_list_get_response_data_item_relationships_project_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrun_attachments_list_get_response_data_item_relationships_project_data_obj.additional_properties = ( + d + ) + return testrun_attachments_list_get_response_data_item_relationships_project_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_project_data_type.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_project_data_type.py new file mode 100644 index 00000000..2fef33ca --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_relationships_project_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunAttachmentsListGetResponseDataItemRelationshipsProjectDataType( + str, Enum +): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_type.py new file mode 100644 index 00000000..9a0510a6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunAttachmentsListGetResponseDataItemType(str, Enum): + TESTRUN_ATTACHMENTS = "testrun_attachments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_included_item.py new file mode 100644 index 00000000..ed7beb6c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestrunAttachmentsListGetResponseIncludedItem") + + +@_attrs_define +class TestrunAttachmentsListGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + testrun_attachments_list_get_response_included_item_obj = cls() + + testrun_attachments_list_get_response_included_item_obj.additional_properties = ( + d + ) + return testrun_attachments_list_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_links.py new file mode 100644 index 00000000..a69d5be8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_links.py @@ -0,0 +1,106 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunAttachmentsListGetResponseLinks") + + +@_attrs_define +class TestrunAttachmentsListGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=9. + """ + + self_: Union[Unset, str] = UNSET + first: Union[Unset, str] = UNSET + prev: Union[Unset, str] = UNSET + next_: Union[Unset, str] = UNSET + last: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + first = self.first + + prev = self.prev + + next_ = self.next_ + + last = self.last + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if first is not UNSET: + field_dict["first"] = first + if prev is not UNSET: + field_dict["prev"] = prev + if next_ is not UNSET: + field_dict["next"] = next_ + if last is not UNSET: + field_dict["last"] = last + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + first = d.pop("first", UNSET) + + prev = d.pop("prev", UNSET) + + next_ = d.pop("next", UNSET) + + last = d.pop("last", UNSET) + + testrun_attachments_list_get_response_links_obj = cls( + self_=self_, + first=first, + prev=prev, + next_=next_, + last=last, + ) + + testrun_attachments_list_get_response_links_obj.additional_properties = ( + d + ) + return testrun_attachments_list_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_meta.py new file mode 100644 index 00000000..f8c81932 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_get_response_meta.py @@ -0,0 +1,65 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunAttachmentsListGetResponseMeta") + + +@_attrs_define +class TestrunAttachmentsListGetResponseMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + testrun_attachments_list_get_response_meta_obj = cls( + total_count=total_count, + ) + + testrun_attachments_list_get_response_meta_obj.additional_properties = ( + d + ) + return testrun_attachments_list_get_response_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_request.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_request.py new file mode 100644 index 00000000..2028a21a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_request.py @@ -0,0 +1,87 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_list_post_request_data_item import ( + TestrunAttachmentsListPostRequestDataItem, + ) + + +T = TypeVar("T", bound="TestrunAttachmentsListPostRequest") + + +@_attrs_define +class TestrunAttachmentsListPostRequest: + """ + Attributes: + data (Union[Unset, List['TestrunAttachmentsListPostRequestDataItem']]): + """ + + data: Union[ + Unset, List["TestrunAttachmentsListPostRequestDataItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_list_post_request_data_item import ( + TestrunAttachmentsListPostRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrunAttachmentsListPostRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + testrun_attachments_list_post_request_obj = cls( + data=data, + ) + + testrun_attachments_list_post_request_obj.additional_properties = d + return testrun_attachments_list_post_request_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_request_data_item.py new file mode 100644 index 00000000..1e77812e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_request_data_item.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_attachments_list_post_request_data_item_type import ( + TestrunAttachmentsListPostRequestDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_list_post_request_data_item_attributes import ( + TestrunAttachmentsListPostRequestDataItemAttributes, + ) + + +T = TypeVar("T", bound="TestrunAttachmentsListPostRequestDataItem") + + +@_attrs_define +class TestrunAttachmentsListPostRequestDataItem: + """ + Attributes: + type (Union[Unset, TestrunAttachmentsListPostRequestDataItemType]): + lid (Union[Unset, str]): + attributes (Union[Unset, TestrunAttachmentsListPostRequestDataItemAttributes]): + """ + + type: Union[Unset, TestrunAttachmentsListPostRequestDataItemType] = UNSET + lid: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestrunAttachmentsListPostRequestDataItemAttributes" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + lid = self.lid + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if lid is not UNSET: + field_dict["lid"] = lid + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_list_post_request_data_item_attributes import ( + TestrunAttachmentsListPostRequestDataItemAttributes, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrunAttachmentsListPostRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunAttachmentsListPostRequestDataItemType(_type) + + lid = d.pop("lid", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TestrunAttachmentsListPostRequestDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + TestrunAttachmentsListPostRequestDataItemAttributes.from_dict( + _attributes + ) + ) + + testrun_attachments_list_post_request_data_item_obj = cls( + type=type, + lid=lid, + attributes=attributes, + ) + + testrun_attachments_list_post_request_data_item_obj.additional_properties = ( + d + ) + return testrun_attachments_list_post_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_request_data_item_attributes.py new file mode 100644 index 00000000..1e8d94f4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_request_data_item_attributes.py @@ -0,0 +1,74 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunAttachmentsListPostRequestDataItemAttributes") + + +@_attrs_define +class TestrunAttachmentsListPostRequestDataItemAttributes: + """ + Attributes: + file_name (Union[Unset, str]): Example: File Name. + title (Union[Unset, str]): Example: Title. + """ + + file_name: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + file_name = self.file_name + + title = self.title + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if file_name is not UNSET: + field_dict["fileName"] = file_name + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + file_name = d.pop("fileName", UNSET) + + title = d.pop("title", UNSET) + + testrun_attachments_list_post_request_data_item_attributes_obj = cls( + file_name=file_name, + title=title, + ) + + testrun_attachments_list_post_request_data_item_attributes_obj.additional_properties = ( + d + ) + return testrun_attachments_list_post_request_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_request_data_item_type.py new file mode 100644 index 00000000..3e31debd --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunAttachmentsListPostRequestDataItemType(str, Enum): + TESTRUN_ATTACHMENTS = "testrun_attachments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_response.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_response.py new file mode 100644 index 00000000..ca2178ca --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_response.py @@ -0,0 +1,87 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_list_post_response_data_item import ( + TestrunAttachmentsListPostResponseDataItem, + ) + + +T = TypeVar("T", bound="TestrunAttachmentsListPostResponse") + + +@_attrs_define +class TestrunAttachmentsListPostResponse: + """ + Attributes: + data (Union[Unset, List['TestrunAttachmentsListPostResponseDataItem']]): + """ + + data: Union[ + Unset, List["TestrunAttachmentsListPostResponseDataItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_list_post_response_data_item import ( + TestrunAttachmentsListPostResponseDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrunAttachmentsListPostResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + testrun_attachments_list_post_response_obj = cls( + data=data, + ) + + testrun_attachments_list_post_response_obj.additional_properties = d + return testrun_attachments_list_post_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_response_data_item.py new file mode 100644 index 00000000..cc7f4457 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_response_data_item.py @@ -0,0 +1,114 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_attachments_list_post_response_data_item_type import ( + TestrunAttachmentsListPostResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_list_post_response_data_item_links import ( + TestrunAttachmentsListPostResponseDataItemLinks, + ) + + +T = TypeVar("T", bound="TestrunAttachmentsListPostResponseDataItem") + + +@_attrs_define +class TestrunAttachmentsListPostResponseDataItem: + """ + Attributes: + type (Union[Unset, TestrunAttachmentsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyAttachmentId. + links (Union[Unset, TestrunAttachmentsListPostResponseDataItemLinks]): + """ + + type: Union[Unset, TestrunAttachmentsListPostResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + links: Union[ + Unset, "TestrunAttachmentsListPostResponseDataItemLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_list_post_response_data_item_links import ( + TestrunAttachmentsListPostResponseDataItemLinks, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrunAttachmentsListPostResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunAttachmentsListPostResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrunAttachmentsListPostResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrunAttachmentsListPostResponseDataItemLinks.from_dict( + _links + ) + + testrun_attachments_list_post_response_data_item_obj = cls( + type=type, + id=id, + links=links, + ) + + testrun_attachments_list_post_response_data_item_obj.additional_properties = ( + d + ) + return testrun_attachments_list_post_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_response_data_item_links.py new file mode 100644 index 00000000..6fc7a34f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_response_data_item_links.py @@ -0,0 +1,76 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunAttachmentsListPostResponseDataItemLinks") + + +@_attrs_define +class TestrunAttachmentsListPostResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/attachments/MyAttachmentId?revision=1234. + content (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/attachments/MyAttachmentId/content?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + content: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + content = self.content + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if content is not UNSET: + field_dict["content"] = content + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + content = d.pop("content", UNSET) + + testrun_attachments_list_post_response_data_item_links_obj = cls( + self_=self_, + content=content, + ) + + testrun_attachments_list_post_response_data_item_links_obj.additional_properties = ( + d + ) + return testrun_attachments_list_post_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_response_data_item_type.py new file mode 100644 index 00000000..5ae918ee --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_list_post_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunAttachmentsListPostResponseDataItemType(str, Enum): + TESTRUN_ATTACHMENTS = "testrun_attachments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response.py new file mode 100644 index 00000000..1ccaf19b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response.py @@ -0,0 +1,135 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_single_get_response_data import ( + TestrunAttachmentsSingleGetResponseData, + ) + from ..models.testrun_attachments_single_get_response_included_item import ( + TestrunAttachmentsSingleGetResponseIncludedItem, + ) + from ..models.testrun_attachments_single_get_response_links import ( + TestrunAttachmentsSingleGetResponseLinks, + ) + + +T = TypeVar("T", bound="TestrunAttachmentsSingleGetResponse") + + +@_attrs_define +class TestrunAttachmentsSingleGetResponse: + """ + Attributes: + data (Union[Unset, TestrunAttachmentsSingleGetResponseData]): + included (Union[Unset, List['TestrunAttachmentsSingleGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, TestrunAttachmentsSingleGetResponseLinks]): + """ + + data: Union[Unset, "TestrunAttachmentsSingleGetResponseData"] = UNSET + included: Union[ + Unset, List["TestrunAttachmentsSingleGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "TestrunAttachmentsSingleGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_single_get_response_data import ( + TestrunAttachmentsSingleGetResponseData, + ) + from ..models.testrun_attachments_single_get_response_included_item import ( + TestrunAttachmentsSingleGetResponseIncludedItem, + ) + from ..models.testrun_attachments_single_get_response_links import ( + TestrunAttachmentsSingleGetResponseLinks, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, TestrunAttachmentsSingleGetResponseData] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunAttachmentsSingleGetResponseData.from_dict(_data) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + TestrunAttachmentsSingleGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrunAttachmentsSingleGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrunAttachmentsSingleGetResponseLinks.from_dict(_links) + + testrun_attachments_single_get_response_obj = cls( + data=data, + included=included, + links=links, + ) + + testrun_attachments_single_get_response_obj.additional_properties = d + return testrun_attachments_single_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data.py new file mode 100644 index 00000000..4de0b798 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data.py @@ -0,0 +1,203 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_attachments_single_get_response_data_type import ( + TestrunAttachmentsSingleGetResponseDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_single_get_response_data_attributes import ( + TestrunAttachmentsSingleGetResponseDataAttributes, + ) + from ..models.testrun_attachments_single_get_response_data_links import ( + TestrunAttachmentsSingleGetResponseDataLinks, + ) + from ..models.testrun_attachments_single_get_response_data_meta import ( + TestrunAttachmentsSingleGetResponseDataMeta, + ) + from ..models.testrun_attachments_single_get_response_data_relationships import ( + TestrunAttachmentsSingleGetResponseDataRelationships, + ) + + +T = TypeVar("T", bound="TestrunAttachmentsSingleGetResponseData") + + +@_attrs_define +class TestrunAttachmentsSingleGetResponseData: + """ + Attributes: + type (Union[Unset, TestrunAttachmentsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyAttachmentId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TestrunAttachmentsSingleGetResponseDataAttributes]): + relationships (Union[Unset, TestrunAttachmentsSingleGetResponseDataRelationships]): + meta (Union[Unset, TestrunAttachmentsSingleGetResponseDataMeta]): + links (Union[Unset, TestrunAttachmentsSingleGetResponseDataLinks]): + """ + + type: Union[Unset, TestrunAttachmentsSingleGetResponseDataType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestrunAttachmentsSingleGetResponseDataAttributes" + ] = UNSET + relationships: Union[ + Unset, "TestrunAttachmentsSingleGetResponseDataRelationships" + ] = UNSET + meta: Union[Unset, "TestrunAttachmentsSingleGetResponseDataMeta"] = UNSET + links: Union[Unset, "TestrunAttachmentsSingleGetResponseDataLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_single_get_response_data_attributes import ( + TestrunAttachmentsSingleGetResponseDataAttributes, + ) + from ..models.testrun_attachments_single_get_response_data_links import ( + TestrunAttachmentsSingleGetResponseDataLinks, + ) + from ..models.testrun_attachments_single_get_response_data_meta import ( + TestrunAttachmentsSingleGetResponseDataMeta, + ) + from ..models.testrun_attachments_single_get_response_data_relationships import ( + TestrunAttachmentsSingleGetResponseDataRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrunAttachmentsSingleGetResponseDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunAttachmentsSingleGetResponseDataType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TestrunAttachmentsSingleGetResponseDataAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + TestrunAttachmentsSingleGetResponseDataAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TestrunAttachmentsSingleGetResponseDataRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + TestrunAttachmentsSingleGetResponseDataRelationships.from_dict( + _relationships + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestrunAttachmentsSingleGetResponseDataMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrunAttachmentsSingleGetResponseDataMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrunAttachmentsSingleGetResponseDataLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrunAttachmentsSingleGetResponseDataLinks.from_dict( + _links + ) + + testrun_attachments_single_get_response_data_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + testrun_attachments_single_get_response_data_obj.additional_properties = ( + d + ) + return testrun_attachments_single_get_response_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_attributes.py new file mode 100644 index 00000000..5e490577 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_attributes.py @@ -0,0 +1,110 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunAttachmentsSingleGetResponseDataAttributes") + + +@_attrs_define +class TestrunAttachmentsSingleGetResponseDataAttributes: + """ + Attributes: + file_name (Union[Unset, str]): Example: File Name. + id (Union[Unset, str]): Example: MyAttachmentId. + length (Union[Unset, int]): + title (Union[Unset, str]): Example: Title. + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + """ + + file_name: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + length: Union[Unset, int] = UNSET + title: Union[Unset, str] = UNSET + updated: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + file_name = self.file_name + + id = self.id + + length = self.length + + title = self.title + + updated: Union[Unset, str] = UNSET + if not isinstance(self.updated, Unset): + updated = self.updated.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if file_name is not UNSET: + field_dict["fileName"] = file_name + if id is not UNSET: + field_dict["id"] = id + if length is not UNSET: + field_dict["length"] = length + if title is not UNSET: + field_dict["title"] = title + if updated is not UNSET: + field_dict["updated"] = updated + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + file_name = d.pop("fileName", UNSET) + + id = d.pop("id", UNSET) + + length = d.pop("length", UNSET) + + title = d.pop("title", UNSET) + + _updated = d.pop("updated", UNSET) + updated: Union[Unset, datetime.datetime] + if isinstance(_updated, Unset): + updated = UNSET + else: + updated = isoparse(_updated) + + testrun_attachments_single_get_response_data_attributes_obj = cls( + file_name=file_name, + id=id, + length=length, + title=title, + updated=updated, + ) + + testrun_attachments_single_get_response_data_attributes_obj.additional_properties = ( + d + ) + return testrun_attachments_single_get_response_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_links.py new file mode 100644 index 00000000..9cb3c8a0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_links.py @@ -0,0 +1,76 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunAttachmentsSingleGetResponseDataLinks") + + +@_attrs_define +class TestrunAttachmentsSingleGetResponseDataLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/attachments/MyAttachmentId?revision=1234. + content (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/attachments/MyAttachmentId/content?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + content: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + content = self.content + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if content is not UNSET: + field_dict["content"] = content + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + content = d.pop("content", UNSET) + + testrun_attachments_single_get_response_data_links_obj = cls( + self_=self_, + content=content, + ) + + testrun_attachments_single_get_response_data_links_obj.additional_properties = ( + d + ) + return testrun_attachments_single_get_response_data_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_meta.py new file mode 100644 index 00000000..cec2db38 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_meta.py @@ -0,0 +1,89 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_single_get_response_data_meta_errors_item import ( + TestrunAttachmentsSingleGetResponseDataMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TestrunAttachmentsSingleGetResponseDataMeta") + + +@_attrs_define +class TestrunAttachmentsSingleGetResponseDataMeta: + """ + Attributes: + errors (Union[Unset, List['TestrunAttachmentsSingleGetResponseDataMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["TestrunAttachmentsSingleGetResponseDataMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_single_get_response_data_meta_errors_item import ( + TestrunAttachmentsSingleGetResponseDataMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = TestrunAttachmentsSingleGetResponseDataMetaErrorsItem.from_dict( + errors_item_data + ) + + errors.append(errors_item) + + testrun_attachments_single_get_response_data_meta_obj = cls( + errors=errors, + ) + + testrun_attachments_single_get_response_data_meta_obj.additional_properties = ( + d + ) + return testrun_attachments_single_get_response_data_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_meta_errors_item.py new file mode 100644 index 00000000..732b21ec --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_meta_errors_item.py @@ -0,0 +1,120 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_single_get_response_data_meta_errors_item_source import ( + TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="TestrunAttachmentsSingleGetResponseDataMetaErrorsItem") + + +@_attrs_define +class TestrunAttachmentsSingleGetResponseDataMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_single_get_response_data_meta_errors_item_source import ( + TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSource.from_dict( + _source + ) + + testrun_attachments_single_get_response_data_meta_errors_item_obj = ( + cls( + status=status, + title=title, + detail=detail, + source=source, + ) + ) + + testrun_attachments_single_get_response_data_meta_errors_item_obj.additional_properties = ( + d + ) + return ( + testrun_attachments_single_get_response_data_meta_errors_item_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_meta_errors_item_source.py new file mode 100644 index 00000000..81aa516f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_meta_errors_item_source.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_single_get_response_data_meta_errors_item_source_resource import ( + TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", bound="TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSource" +) + + +@_attrs_define +class TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing + the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_single_get_response_data_meta_errors_item_source_resource import ( + TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + + testrun_attachments_single_get_response_data_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + testrun_attachments_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( + d + ) + return testrun_attachments_single_get_response_data_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..a8708754 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource", +) + + +@_attrs_define +class TestrunAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + testrun_attachments_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + testrun_attachments_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return testrun_attachments_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships.py new file mode 100644 index 00000000..a541d847 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships.py @@ -0,0 +1,116 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_single_get_response_data_relationships_author import ( + TestrunAttachmentsSingleGetResponseDataRelationshipsAuthor, + ) + from ..models.testrun_attachments_single_get_response_data_relationships_project import ( + TestrunAttachmentsSingleGetResponseDataRelationshipsProject, + ) + + +T = TypeVar("T", bound="TestrunAttachmentsSingleGetResponseDataRelationships") + + +@_attrs_define +class TestrunAttachmentsSingleGetResponseDataRelationships: + """ + Attributes: + author (Union[Unset, TestrunAttachmentsSingleGetResponseDataRelationshipsAuthor]): + project (Union[Unset, TestrunAttachmentsSingleGetResponseDataRelationshipsProject]): + """ + + author: Union[ + Unset, "TestrunAttachmentsSingleGetResponseDataRelationshipsAuthor" + ] = UNSET + project: Union[ + Unset, "TestrunAttachmentsSingleGetResponseDataRelationshipsProject" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + author: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.author, Unset): + author = self.author.to_dict() + + project: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project, Unset): + project = self.project.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if author is not UNSET: + field_dict["author"] = author + if project is not UNSET: + field_dict["project"] = project + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_single_get_response_data_relationships_author import ( + TestrunAttachmentsSingleGetResponseDataRelationshipsAuthor, + ) + from ..models.testrun_attachments_single_get_response_data_relationships_project import ( + TestrunAttachmentsSingleGetResponseDataRelationshipsProject, + ) + + d = src_dict.copy() + _author = d.pop("author", UNSET) + author: Union[ + Unset, TestrunAttachmentsSingleGetResponseDataRelationshipsAuthor + ] + if isinstance(_author, Unset): + author = UNSET + else: + author = TestrunAttachmentsSingleGetResponseDataRelationshipsAuthor.from_dict( + _author + ) + + _project = d.pop("project", UNSET) + project: Union[ + Unset, TestrunAttachmentsSingleGetResponseDataRelationshipsProject + ] + if isinstance(_project, Unset): + project = UNSET + else: + project = TestrunAttachmentsSingleGetResponseDataRelationshipsProject.from_dict( + _project + ) + + testrun_attachments_single_get_response_data_relationships_obj = cls( + author=author, + project=project, + ) + + testrun_attachments_single_get_response_data_relationships_obj.additional_properties = ( + d + ) + return testrun_attachments_single_get_response_data_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_author.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_author.py new file mode 100644 index 00000000..52edf539 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_author.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_single_get_response_data_relationships_author_data import ( + TestrunAttachmentsSingleGetResponseDataRelationshipsAuthorData, + ) + + +T = TypeVar( + "T", bound="TestrunAttachmentsSingleGetResponseDataRelationshipsAuthor" +) + + +@_attrs_define +class TestrunAttachmentsSingleGetResponseDataRelationshipsAuthor: + """ + Attributes: + data (Union[Unset, TestrunAttachmentsSingleGetResponseDataRelationshipsAuthorData]): + """ + + data: Union[ + Unset, "TestrunAttachmentsSingleGetResponseDataRelationshipsAuthorData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_single_get_response_data_relationships_author_data import ( + TestrunAttachmentsSingleGetResponseDataRelationshipsAuthorData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestrunAttachmentsSingleGetResponseDataRelationshipsAuthorData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunAttachmentsSingleGetResponseDataRelationshipsAuthorData.from_dict( + _data + ) + + testrun_attachments_single_get_response_data_relationships_author_obj = cls( + data=data, + ) + + testrun_attachments_single_get_response_data_relationships_author_obj.additional_properties = ( + d + ) + return testrun_attachments_single_get_response_data_relationships_author_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_author_data.py new file mode 100644 index 00000000..bd47a936 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_author_data.py @@ -0,0 +1,103 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_attachments_single_get_response_data_relationships_author_data_type import ( + TestrunAttachmentsSingleGetResponseDataRelationshipsAuthorDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunAttachmentsSingleGetResponseDataRelationshipsAuthorData" +) + + +@_attrs_define +class TestrunAttachmentsSingleGetResponseDataRelationshipsAuthorData: + """ + Attributes: + type (Union[Unset, TestrunAttachmentsSingleGetResponseDataRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestrunAttachmentsSingleGetResponseDataRelationshipsAuthorDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunAttachmentsSingleGetResponseDataRelationshipsAuthorDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunAttachmentsSingleGetResponseDataRelationshipsAuthorDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrun_attachments_single_get_response_data_relationships_author_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrun_attachments_single_get_response_data_relationships_author_data_obj.additional_properties = ( + d + ) + return testrun_attachments_single_get_response_data_relationships_author_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_author_data_type.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_author_data_type.py new file mode 100644 index 00000000..3f87e112 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_author_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunAttachmentsSingleGetResponseDataRelationshipsAuthorDataType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_project.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_project.py new file mode 100644 index 00000000..934bf75d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_project.py @@ -0,0 +1,92 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_single_get_response_data_relationships_project_data import ( + TestrunAttachmentsSingleGetResponseDataRelationshipsProjectData, + ) + + +T = TypeVar( + "T", bound="TestrunAttachmentsSingleGetResponseDataRelationshipsProject" +) + + +@_attrs_define +class TestrunAttachmentsSingleGetResponseDataRelationshipsProject: + """ + Attributes: + data (Union[Unset, TestrunAttachmentsSingleGetResponseDataRelationshipsProjectData]): + """ + + data: Union[ + Unset, + "TestrunAttachmentsSingleGetResponseDataRelationshipsProjectData", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_single_get_response_data_relationships_project_data import ( + TestrunAttachmentsSingleGetResponseDataRelationshipsProjectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestrunAttachmentsSingleGetResponseDataRelationshipsProjectData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunAttachmentsSingleGetResponseDataRelationshipsProjectData.from_dict( + _data + ) + + testrun_attachments_single_get_response_data_relationships_project_obj = cls( + data=data, + ) + + testrun_attachments_single_get_response_data_relationships_project_obj.additional_properties = ( + d + ) + return testrun_attachments_single_get_response_data_relationships_project_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_project_data.py new file mode 100644 index 00000000..39c6f0f5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_project_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_attachments_single_get_response_data_relationships_project_data_type import ( + TestrunAttachmentsSingleGetResponseDataRelationshipsProjectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrunAttachmentsSingleGetResponseDataRelationshipsProjectData", +) + + +@_attrs_define +class TestrunAttachmentsSingleGetResponseDataRelationshipsProjectData: + """ + Attributes: + type (Union[Unset, TestrunAttachmentsSingleGetResponseDataRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestrunAttachmentsSingleGetResponseDataRelationshipsProjectDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunAttachmentsSingleGetResponseDataRelationshipsProjectDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunAttachmentsSingleGetResponseDataRelationshipsProjectDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrun_attachments_single_get_response_data_relationships_project_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrun_attachments_single_get_response_data_relationships_project_data_obj.additional_properties = ( + d + ) + return testrun_attachments_single_get_response_data_relationships_project_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_project_data_type.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_project_data_type.py new file mode 100644 index 00000000..40ad919a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_relationships_project_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunAttachmentsSingleGetResponseDataRelationshipsProjectDataType( + str, Enum +): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_type.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_type.py new file mode 100644 index 00000000..f9198218 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunAttachmentsSingleGetResponseDataType(str, Enum): + TESTRUN_ATTACHMENTS = "testrun_attachments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_included_item.py new file mode 100644 index 00000000..9b7f3401 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestrunAttachmentsSingleGetResponseIncludedItem") + + +@_attrs_define +class TestrunAttachmentsSingleGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + testrun_attachments_single_get_response_included_item_obj = cls() + + testrun_attachments_single_get_response_included_item_obj.additional_properties = ( + d + ) + return testrun_attachments_single_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_links.py new file mode 100644 index 00000000..b0297b7a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_get_response_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunAttachmentsSingleGetResponseLinks") + + +@_attrs_define +class TestrunAttachmentsSingleGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/attachments/MyAttachmentId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testrun_attachments_single_get_response_links_obj = cls( + self_=self_, + ) + + testrun_attachments_single_get_response_links_obj.additional_properties = ( + d + ) + return testrun_attachments_single_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_patch_request.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_patch_request.py new file mode 100644 index 00000000..1b9e1e53 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_patch_request.py @@ -0,0 +1,80 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_single_patch_request_data import ( + TestrunAttachmentsSinglePatchRequestData, + ) + + +T = TypeVar("T", bound="TestrunAttachmentsSinglePatchRequest") + + +@_attrs_define +class TestrunAttachmentsSinglePatchRequest: + """ + Attributes: + data (Union[Unset, TestrunAttachmentsSinglePatchRequestData]): + """ + + data: Union[Unset, "TestrunAttachmentsSinglePatchRequestData"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_single_patch_request_data import ( + TestrunAttachmentsSinglePatchRequestData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, TestrunAttachmentsSinglePatchRequestData] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunAttachmentsSinglePatchRequestData.from_dict(_data) + + testrun_attachments_single_patch_request_obj = cls( + data=data, + ) + + testrun_attachments_single_patch_request_obj.additional_properties = d + return testrun_attachments_single_patch_request_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_patch_request_data.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_patch_request_data.py new file mode 100644 index 00000000..f2084b87 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_patch_request_data.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_attachments_single_patch_request_data_type import ( + TestrunAttachmentsSinglePatchRequestDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_attachments_single_patch_request_data_attributes import ( + TestrunAttachmentsSinglePatchRequestDataAttributes, + ) + + +T = TypeVar("T", bound="TestrunAttachmentsSinglePatchRequestData") + + +@_attrs_define +class TestrunAttachmentsSinglePatchRequestData: + """ + Attributes: + type (Union[Unset, TestrunAttachmentsSinglePatchRequestDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyAttachmentId. + attributes (Union[Unset, TestrunAttachmentsSinglePatchRequestDataAttributes]): + """ + + type: Union[Unset, TestrunAttachmentsSinglePatchRequestDataType] = UNSET + id: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestrunAttachmentsSinglePatchRequestDataAttributes" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_attachments_single_patch_request_data_attributes import ( + TestrunAttachmentsSinglePatchRequestDataAttributes, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrunAttachmentsSinglePatchRequestDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunAttachmentsSinglePatchRequestDataType(_type) + + id = d.pop("id", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TestrunAttachmentsSinglePatchRequestDataAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + TestrunAttachmentsSinglePatchRequestDataAttributes.from_dict( + _attributes + ) + ) + + testrun_attachments_single_patch_request_data_obj = cls( + type=type, + id=id, + attributes=attributes, + ) + + testrun_attachments_single_patch_request_data_obj.additional_properties = ( + d + ) + return testrun_attachments_single_patch_request_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_patch_request_data_attributes.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_patch_request_data_attributes.py new file mode 100644 index 00000000..a3a2d5a6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_patch_request_data_attributes.py @@ -0,0 +1,65 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunAttachmentsSinglePatchRequestDataAttributes") + + +@_attrs_define +class TestrunAttachmentsSinglePatchRequestDataAttributes: + """ + Attributes: + title (Union[Unset, str]): Example: Title. + """ + + title: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + title = self.title + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + title = d.pop("title", UNSET) + + testrun_attachments_single_patch_request_data_attributes_obj = cls( + title=title, + ) + + testrun_attachments_single_patch_request_data_attributes_obj.additional_properties = ( + d + ) + return testrun_attachments_single_patch_request_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_patch_request_data_type.py b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_patch_request_data_type.py new file mode 100644 index 00000000..d509bbb6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_attachments_single_patch_request_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunAttachmentsSinglePatchRequestDataType(str, Enum): + TESTRUN_ATTACHMENTS = "testrun_attachments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response.py new file mode 100644 index 00000000..cfea3168 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response.py @@ -0,0 +1,162 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_get_response_data_item import ( + TestrunCommentsListGetResponseDataItem, + ) + from ..models.testrun_comments_list_get_response_included_item import ( + TestrunCommentsListGetResponseIncludedItem, + ) + from ..models.testrun_comments_list_get_response_links import ( + TestrunCommentsListGetResponseLinks, + ) + from ..models.testrun_comments_list_get_response_meta import ( + TestrunCommentsListGetResponseMeta, + ) + + +T = TypeVar("T", bound="TestrunCommentsListGetResponse") + + +@_attrs_define +class TestrunCommentsListGetResponse: + """ + Attributes: + meta (Union[Unset, TestrunCommentsListGetResponseMeta]): + data (Union[Unset, List['TestrunCommentsListGetResponseDataItem']]): + included (Union[Unset, List['TestrunCommentsListGetResponseIncludedItem']]): Related entities might be returned, + see Rest API + User Guide. + links (Union[Unset, TestrunCommentsListGetResponseLinks]): + """ + + meta: Union[Unset, "TestrunCommentsListGetResponseMeta"] = UNSET + data: Union[Unset, List["TestrunCommentsListGetResponseDataItem"]] = UNSET + included: Union[ + Unset, List["TestrunCommentsListGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "TestrunCommentsListGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_get_response_data_item import ( + TestrunCommentsListGetResponseDataItem, + ) + from ..models.testrun_comments_list_get_response_included_item import ( + TestrunCommentsListGetResponseIncludedItem, + ) + from ..models.testrun_comments_list_get_response_links import ( + TestrunCommentsListGetResponseLinks, + ) + from ..models.testrun_comments_list_get_response_meta import ( + TestrunCommentsListGetResponseMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestrunCommentsListGetResponseMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrunCommentsListGetResponseMeta.from_dict(_meta) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrunCommentsListGetResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + TestrunCommentsListGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrunCommentsListGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrunCommentsListGetResponseLinks.from_dict(_links) + + testrun_comments_list_get_response_obj = cls( + meta=meta, + data=data, + included=included, + links=links, + ) + + testrun_comments_list_get_response_obj.additional_properties = d + return testrun_comments_list_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item.py new file mode 100644 index 00000000..8d020293 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item.py @@ -0,0 +1,203 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_comments_list_get_response_data_item_type import ( + TestrunCommentsListGetResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_get_response_data_item_attributes import ( + TestrunCommentsListGetResponseDataItemAttributes, + ) + from ..models.testrun_comments_list_get_response_data_item_links import ( + TestrunCommentsListGetResponseDataItemLinks, + ) + from ..models.testrun_comments_list_get_response_data_item_meta import ( + TestrunCommentsListGetResponseDataItemMeta, + ) + from ..models.testrun_comments_list_get_response_data_item_relationships import ( + TestrunCommentsListGetResponseDataItemRelationships, + ) + + +T = TypeVar("T", bound="TestrunCommentsListGetResponseDataItem") + + +@_attrs_define +class TestrunCommentsListGetResponseDataItem: + """ + Attributes: + type (Union[Unset, TestrunCommentsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TestrunCommentsListGetResponseDataItemAttributes]): + relationships (Union[Unset, TestrunCommentsListGetResponseDataItemRelationships]): + meta (Union[Unset, TestrunCommentsListGetResponseDataItemMeta]): + links (Union[Unset, TestrunCommentsListGetResponseDataItemLinks]): + """ + + type: Union[Unset, TestrunCommentsListGetResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestrunCommentsListGetResponseDataItemAttributes" + ] = UNSET + relationships: Union[ + Unset, "TestrunCommentsListGetResponseDataItemRelationships" + ] = UNSET + meta: Union[Unset, "TestrunCommentsListGetResponseDataItemMeta"] = UNSET + links: Union[Unset, "TestrunCommentsListGetResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_get_response_data_item_attributes import ( + TestrunCommentsListGetResponseDataItemAttributes, + ) + from ..models.testrun_comments_list_get_response_data_item_links import ( + TestrunCommentsListGetResponseDataItemLinks, + ) + from ..models.testrun_comments_list_get_response_data_item_meta import ( + TestrunCommentsListGetResponseDataItemMeta, + ) + from ..models.testrun_comments_list_get_response_data_item_relationships import ( + TestrunCommentsListGetResponseDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrunCommentsListGetResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunCommentsListGetResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TestrunCommentsListGetResponseDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + TestrunCommentsListGetResponseDataItemAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TestrunCommentsListGetResponseDataItemRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + TestrunCommentsListGetResponseDataItemRelationships.from_dict( + _relationships + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestrunCommentsListGetResponseDataItemMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrunCommentsListGetResponseDataItemMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrunCommentsListGetResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrunCommentsListGetResponseDataItemLinks.from_dict( + _links + ) + + testrun_comments_list_get_response_data_item_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + testrun_comments_list_get_response_data_item_obj.additional_properties = ( + d + ) + return testrun_comments_list_get_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_attributes.py new file mode 100644 index 00000000..4021a59c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_attributes.py @@ -0,0 +1,135 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_get_response_data_item_attributes_text import ( + TestrunCommentsListGetResponseDataItemAttributesText, + ) + + +T = TypeVar("T", bound="TestrunCommentsListGetResponseDataItemAttributes") + + +@_attrs_define +class TestrunCommentsListGetResponseDataItemAttributes: + """ + Attributes: + created (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + id (Union[Unset, str]): Example: MyCommentId. + resolved (Union[Unset, bool]): + text (Union[Unset, TestrunCommentsListGetResponseDataItemAttributesText]): + title (Union[Unset, str]): Example: Title. + """ + + created: Union[Unset, datetime.datetime] = UNSET + id: Union[Unset, str] = UNSET + resolved: Union[Unset, bool] = UNSET + text: Union[ + Unset, "TestrunCommentsListGetResponseDataItemAttributesText" + ] = UNSET + title: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + created: Union[Unset, str] = UNSET + if not isinstance(self.created, Unset): + created = self.created.isoformat() + + id = self.id + + resolved = self.resolved + + text: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.text, Unset): + text = self.text.to_dict() + + title = self.title + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created is not UNSET: + field_dict["created"] = created + if id is not UNSET: + field_dict["id"] = id + if resolved is not UNSET: + field_dict["resolved"] = resolved + if text is not UNSET: + field_dict["text"] = text + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_get_response_data_item_attributes_text import ( + TestrunCommentsListGetResponseDataItemAttributesText, + ) + + d = src_dict.copy() + _created = d.pop("created", UNSET) + created: Union[Unset, datetime.datetime] + if isinstance(_created, Unset): + created = UNSET + else: + created = isoparse(_created) + + id = d.pop("id", UNSET) + + resolved = d.pop("resolved", UNSET) + + _text = d.pop("text", UNSET) + text: Union[ + Unset, TestrunCommentsListGetResponseDataItemAttributesText + ] + if isinstance(_text, Unset): + text = UNSET + else: + text = ( + TestrunCommentsListGetResponseDataItemAttributesText.from_dict( + _text + ) + ) + + title = d.pop("title", UNSET) + + testrun_comments_list_get_response_data_item_attributes_obj = cls( + created=created, + id=id, + resolved=resolved, + text=text, + title=title, + ) + + testrun_comments_list_get_response_data_item_attributes_obj.additional_properties = ( + d + ) + return testrun_comments_list_get_response_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_attributes_text.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_attributes_text.py new file mode 100644 index 00000000..aee3a10f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_attributes_text.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_comments_list_get_response_data_item_attributes_text_type import ( + TestrunCommentsListGetResponseDataItemAttributesTextType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunCommentsListGetResponseDataItemAttributesText") + + +@_attrs_define +class TestrunCommentsListGetResponseDataItemAttributesText: + """ + Attributes: + type (Union[Unset, TestrunCommentsListGetResponseDataItemAttributesTextType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TestrunCommentsListGetResponseDataItemAttributesTextType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrunCommentsListGetResponseDataItemAttributesTextType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunCommentsListGetResponseDataItemAttributesTextType( + _type + ) + + value = d.pop("value", UNSET) + + testrun_comments_list_get_response_data_item_attributes_text_obj = cls( + type=type, + value=value, + ) + + testrun_comments_list_get_response_data_item_attributes_text_obj.additional_properties = ( + d + ) + return testrun_comments_list_get_response_data_item_attributes_text_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_attributes_text_type.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_attributes_text_type.py new file mode 100644 index 00000000..c5e1c168 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_attributes_text_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunCommentsListGetResponseDataItemAttributesTextType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_links.py new file mode 100644 index 00000000..3abb31c1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunCommentsListGetResponseDataItemLinks") + + +@_attrs_define +class TestrunCommentsListGetResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/comments/MyCommentId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testrun_comments_list_get_response_data_item_links_obj = cls( + self_=self_, + ) + + testrun_comments_list_get_response_data_item_links_obj.additional_properties = ( + d + ) + return testrun_comments_list_get_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_meta.py new file mode 100644 index 00000000..75aee629 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_meta.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_get_response_data_item_meta_errors_item import ( + TestrunCommentsListGetResponseDataItemMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TestrunCommentsListGetResponseDataItemMeta") + + +@_attrs_define +class TestrunCommentsListGetResponseDataItemMeta: + """ + Attributes: + errors (Union[Unset, List['TestrunCommentsListGetResponseDataItemMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["TestrunCommentsListGetResponseDataItemMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_get_response_data_item_meta_errors_item import ( + TestrunCommentsListGetResponseDataItemMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ( + TestrunCommentsListGetResponseDataItemMetaErrorsItem.from_dict( + errors_item_data + ) + ) + + errors.append(errors_item) + + testrun_comments_list_get_response_data_item_meta_obj = cls( + errors=errors, + ) + + testrun_comments_list_get_response_data_item_meta_obj.additional_properties = ( + d + ) + return testrun_comments_list_get_response_data_item_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_meta_errors_item.py new file mode 100644 index 00000000..51e55c2d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_meta_errors_item.py @@ -0,0 +1,120 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_get_response_data_item_meta_errors_item_source import ( + TestrunCommentsListGetResponseDataItemMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="TestrunCommentsListGetResponseDataItemMetaErrorsItem") + + +@_attrs_define +class TestrunCommentsListGetResponseDataItemMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TestrunCommentsListGetResponseDataItemMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "TestrunCommentsListGetResponseDataItemMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_get_response_data_item_meta_errors_item_source import ( + TestrunCommentsListGetResponseDataItemMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, TestrunCommentsListGetResponseDataItemMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = TestrunCommentsListGetResponseDataItemMetaErrorsItemSource.from_dict( + _source + ) + + testrun_comments_list_get_response_data_item_meta_errors_item_obj = ( + cls( + status=status, + title=title, + detail=detail, + source=source, + ) + ) + + testrun_comments_list_get_response_data_item_meta_errors_item_obj.additional_properties = ( + d + ) + return ( + testrun_comments_list_get_response_data_item_meta_errors_item_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_meta_errors_item_source.py new file mode 100644 index 00000000..642a5d21 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_meta_errors_item_source.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_get_response_data_item_meta_errors_item_source_resource import ( + TestrunCommentsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", bound="TestrunCommentsListGetResponseDataItemMetaErrorsItemSource" +) + + +@_attrs_define +class TestrunCommentsListGetResponseDataItemMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TestrunCommentsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing + the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "TestrunCommentsListGetResponseDataItemMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_get_response_data_item_meta_errors_item_source_resource import ( + TestrunCommentsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + TestrunCommentsListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TestrunCommentsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + + testrun_comments_list_get_response_data_item_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + testrun_comments_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( + d + ) + return testrun_comments_list_get_response_data_item_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..fd7b24ef --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrunCommentsListGetResponseDataItemMetaErrorsItemSourceResource", +) + + +@_attrs_define +class TestrunCommentsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + testrun_comments_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + testrun_comments_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return testrun_comments_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships.py new file mode 100644 index 00000000..4f22136b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships.py @@ -0,0 +1,176 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_get_response_data_item_relationships_author import ( + TestrunCommentsListGetResponseDataItemRelationshipsAuthor, + ) + from ..models.testrun_comments_list_get_response_data_item_relationships_child_comments import ( + TestrunCommentsListGetResponseDataItemRelationshipsChildComments, + ) + from ..models.testrun_comments_list_get_response_data_item_relationships_parent_comment import ( + TestrunCommentsListGetResponseDataItemRelationshipsParentComment, + ) + from ..models.testrun_comments_list_get_response_data_item_relationships_project import ( + TestrunCommentsListGetResponseDataItemRelationshipsProject, + ) + + +T = TypeVar("T", bound="TestrunCommentsListGetResponseDataItemRelationships") + + +@_attrs_define +class TestrunCommentsListGetResponseDataItemRelationships: + """ + Attributes: + author (Union[Unset, TestrunCommentsListGetResponseDataItemRelationshipsAuthor]): + child_comments (Union[Unset, TestrunCommentsListGetResponseDataItemRelationshipsChildComments]): + parent_comment (Union[Unset, TestrunCommentsListGetResponseDataItemRelationshipsParentComment]): + project (Union[Unset, TestrunCommentsListGetResponseDataItemRelationshipsProject]): + """ + + author: Union[ + Unset, "TestrunCommentsListGetResponseDataItemRelationshipsAuthor" + ] = UNSET + child_comments: Union[ + Unset, + "TestrunCommentsListGetResponseDataItemRelationshipsChildComments", + ] = UNSET + parent_comment: Union[ + Unset, + "TestrunCommentsListGetResponseDataItemRelationshipsParentComment", + ] = UNSET + project: Union[ + Unset, "TestrunCommentsListGetResponseDataItemRelationshipsProject" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + author: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.author, Unset): + author = self.author.to_dict() + + child_comments: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.child_comments, Unset): + child_comments = self.child_comments.to_dict() + + parent_comment: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.parent_comment, Unset): + parent_comment = self.parent_comment.to_dict() + + project: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project, Unset): + project = self.project.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if author is not UNSET: + field_dict["author"] = author + if child_comments is not UNSET: + field_dict["childComments"] = child_comments + if parent_comment is not UNSET: + field_dict["parentComment"] = parent_comment + if project is not UNSET: + field_dict["project"] = project + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_get_response_data_item_relationships_author import ( + TestrunCommentsListGetResponseDataItemRelationshipsAuthor, + ) + from ..models.testrun_comments_list_get_response_data_item_relationships_child_comments import ( + TestrunCommentsListGetResponseDataItemRelationshipsChildComments, + ) + from ..models.testrun_comments_list_get_response_data_item_relationships_parent_comment import ( + TestrunCommentsListGetResponseDataItemRelationshipsParentComment, + ) + from ..models.testrun_comments_list_get_response_data_item_relationships_project import ( + TestrunCommentsListGetResponseDataItemRelationshipsProject, + ) + + d = src_dict.copy() + _author = d.pop("author", UNSET) + author: Union[ + Unset, TestrunCommentsListGetResponseDataItemRelationshipsAuthor + ] + if isinstance(_author, Unset): + author = UNSET + else: + author = TestrunCommentsListGetResponseDataItemRelationshipsAuthor.from_dict( + _author + ) + + _child_comments = d.pop("childComments", UNSET) + child_comments: Union[ + Unset, + TestrunCommentsListGetResponseDataItemRelationshipsChildComments, + ] + if isinstance(_child_comments, Unset): + child_comments = UNSET + else: + child_comments = TestrunCommentsListGetResponseDataItemRelationshipsChildComments.from_dict( + _child_comments + ) + + _parent_comment = d.pop("parentComment", UNSET) + parent_comment: Union[ + Unset, + TestrunCommentsListGetResponseDataItemRelationshipsParentComment, + ] + if isinstance(_parent_comment, Unset): + parent_comment = UNSET + else: + parent_comment = TestrunCommentsListGetResponseDataItemRelationshipsParentComment.from_dict( + _parent_comment + ) + + _project = d.pop("project", UNSET) + project: Union[ + Unset, TestrunCommentsListGetResponseDataItemRelationshipsProject + ] + if isinstance(_project, Unset): + project = UNSET + else: + project = TestrunCommentsListGetResponseDataItemRelationshipsProject.from_dict( + _project + ) + + testrun_comments_list_get_response_data_item_relationships_obj = cls( + author=author, + child_comments=child_comments, + parent_comment=parent_comment, + project=project, + ) + + testrun_comments_list_get_response_data_item_relationships_obj.additional_properties = ( + d + ) + return testrun_comments_list_get_response_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_author.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_author.py new file mode 100644 index 00000000..47d9c320 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_author.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_get_response_data_item_relationships_author_data import ( + TestrunCommentsListGetResponseDataItemRelationshipsAuthorData, + ) + + +T = TypeVar( + "T", bound="TestrunCommentsListGetResponseDataItemRelationshipsAuthor" +) + + +@_attrs_define +class TestrunCommentsListGetResponseDataItemRelationshipsAuthor: + """ + Attributes: + data (Union[Unset, TestrunCommentsListGetResponseDataItemRelationshipsAuthorData]): + """ + + data: Union[ + Unset, "TestrunCommentsListGetResponseDataItemRelationshipsAuthorData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_get_response_data_item_relationships_author_data import ( + TestrunCommentsListGetResponseDataItemRelationshipsAuthorData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestrunCommentsListGetResponseDataItemRelationshipsAuthorData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunCommentsListGetResponseDataItemRelationshipsAuthorData.from_dict( + _data + ) + + testrun_comments_list_get_response_data_item_relationships_author_obj = cls( + data=data, + ) + + testrun_comments_list_get_response_data_item_relationships_author_obj.additional_properties = ( + d + ) + return testrun_comments_list_get_response_data_item_relationships_author_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_author_data.py new file mode 100644 index 00000000..0f98ef9d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_author_data.py @@ -0,0 +1,103 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_comments_list_get_response_data_item_relationships_author_data_type import ( + TestrunCommentsListGetResponseDataItemRelationshipsAuthorDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunCommentsListGetResponseDataItemRelationshipsAuthorData" +) + + +@_attrs_define +class TestrunCommentsListGetResponseDataItemRelationshipsAuthorData: + """ + Attributes: + type (Union[Unset, TestrunCommentsListGetResponseDataItemRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestrunCommentsListGetResponseDataItemRelationshipsAuthorDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunCommentsListGetResponseDataItemRelationshipsAuthorDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunCommentsListGetResponseDataItemRelationshipsAuthorDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrun_comments_list_get_response_data_item_relationships_author_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrun_comments_list_get_response_data_item_relationships_author_data_obj.additional_properties = ( + d + ) + return testrun_comments_list_get_response_data_item_relationships_author_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_author_data_type.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_author_data_type.py new file mode 100644 index 00000000..66c54b19 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_author_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunCommentsListGetResponseDataItemRelationshipsAuthorDataType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_child_comments.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_child_comments.py new file mode 100644 index 00000000..d2d21d2e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_child_comments.py @@ -0,0 +1,125 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_get_response_data_item_relationships_child_comments_data_item import ( + TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsDataItem, + ) + from ..models.testrun_comments_list_get_response_data_item_relationships_child_comments_meta import ( + TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsMeta, + ) + + +T = TypeVar( + "T", + bound="TestrunCommentsListGetResponseDataItemRelationshipsChildComments", +) + + +@_attrs_define +class TestrunCommentsListGetResponseDataItemRelationshipsChildComments: + """ + Attributes: + data (Union[Unset, List['TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsDataItem']]): + meta (Union[Unset, TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsMeta]): + """ + + data: Union[ + Unset, + List[ + "TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsDataItem" + ], + ] = UNSET + meta: Union[ + Unset, + "TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsMeta", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_get_response_data_item_relationships_child_comments_data_item import ( + TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsDataItem, + ) + from ..models.testrun_comments_list_get_response_data_item_relationships_child_comments_meta import ( + TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, + TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsMeta, + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsMeta.from_dict( + _meta + ) + + testrun_comments_list_get_response_data_item_relationships_child_comments_obj = cls( + data=data, + meta=meta, + ) + + testrun_comments_list_get_response_data_item_relationships_child_comments_obj.additional_properties = ( + d + ) + return testrun_comments_list_get_response_data_item_relationships_child_comments_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_child_comments_data_item.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_child_comments_data_item.py new file mode 100644 index 00000000..64a8260d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_child_comments_data_item.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_comments_list_get_response_data_item_relationships_child_comments_data_item_type import ( + TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsDataItem", +) + + +@_attrs_define +class TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsDataItem: + """ + Attributes: + type (Union[Unset, TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrun_comments_list_get_response_data_item_relationships_child_comments_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrun_comments_list_get_response_data_item_relationships_child_comments_data_item_obj.additional_properties = ( + d + ) + return testrun_comments_list_get_response_data_item_relationships_child_comments_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_child_comments_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_child_comments_data_item_type.py new file mode 100644 index 00000000..f3c55df0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_child_comments_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsDataItemType( + str, Enum +): + TESTRUN_COMMENTS = "testrun_comments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_child_comments_meta.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_child_comments_meta.py new file mode 100644 index 00000000..6f7c1be3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_child_comments_meta.py @@ -0,0 +1,68 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsMeta", +) + + +@_attrs_define +class TestrunCommentsListGetResponseDataItemRelationshipsChildCommentsMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + testrun_comments_list_get_response_data_item_relationships_child_comments_meta_obj = cls( + total_count=total_count, + ) + + testrun_comments_list_get_response_data_item_relationships_child_comments_meta_obj.additional_properties = ( + d + ) + return testrun_comments_list_get_response_data_item_relationships_child_comments_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_parent_comment.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_parent_comment.py new file mode 100644 index 00000000..3cdd670c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_parent_comment.py @@ -0,0 +1,93 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_get_response_data_item_relationships_parent_comment_data import ( + TestrunCommentsListGetResponseDataItemRelationshipsParentCommentData, + ) + + +T = TypeVar( + "T", + bound="TestrunCommentsListGetResponseDataItemRelationshipsParentComment", +) + + +@_attrs_define +class TestrunCommentsListGetResponseDataItemRelationshipsParentComment: + """ + Attributes: + data (Union[Unset, TestrunCommentsListGetResponseDataItemRelationshipsParentCommentData]): + """ + + data: Union[ + Unset, + "TestrunCommentsListGetResponseDataItemRelationshipsParentCommentData", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_get_response_data_item_relationships_parent_comment_data import ( + TestrunCommentsListGetResponseDataItemRelationshipsParentCommentData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestrunCommentsListGetResponseDataItemRelationshipsParentCommentData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunCommentsListGetResponseDataItemRelationshipsParentCommentData.from_dict( + _data + ) + + testrun_comments_list_get_response_data_item_relationships_parent_comment_obj = cls( + data=data, + ) + + testrun_comments_list_get_response_data_item_relationships_parent_comment_obj.additional_properties = ( + d + ) + return testrun_comments_list_get_response_data_item_relationships_parent_comment_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_parent_comment_data.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_parent_comment_data.py new file mode 100644 index 00000000..03c62dc9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_parent_comment_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_comments_list_get_response_data_item_relationships_parent_comment_data_type import ( + TestrunCommentsListGetResponseDataItemRelationshipsParentCommentDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrunCommentsListGetResponseDataItemRelationshipsParentCommentData", +) + + +@_attrs_define +class TestrunCommentsListGetResponseDataItemRelationshipsParentCommentData: + """ + Attributes: + type (Union[Unset, TestrunCommentsListGetResponseDataItemRelationshipsParentCommentDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestrunCommentsListGetResponseDataItemRelationshipsParentCommentDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunCommentsListGetResponseDataItemRelationshipsParentCommentDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunCommentsListGetResponseDataItemRelationshipsParentCommentDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrun_comments_list_get_response_data_item_relationships_parent_comment_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrun_comments_list_get_response_data_item_relationships_parent_comment_data_obj.additional_properties = ( + d + ) + return testrun_comments_list_get_response_data_item_relationships_parent_comment_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_parent_comment_data_type.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_parent_comment_data_type.py new file mode 100644 index 00000000..1556a85a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_parent_comment_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunCommentsListGetResponseDataItemRelationshipsParentCommentDataType( + str, Enum +): + TESTRUN_COMMENTS = "testrun_comments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_project.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_project.py new file mode 100644 index 00000000..6400d098 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_project.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_get_response_data_item_relationships_project_data import ( + TestrunCommentsListGetResponseDataItemRelationshipsProjectData, + ) + + +T = TypeVar( + "T", bound="TestrunCommentsListGetResponseDataItemRelationshipsProject" +) + + +@_attrs_define +class TestrunCommentsListGetResponseDataItemRelationshipsProject: + """ + Attributes: + data (Union[Unset, TestrunCommentsListGetResponseDataItemRelationshipsProjectData]): + """ + + data: Union[ + Unset, "TestrunCommentsListGetResponseDataItemRelationshipsProjectData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_get_response_data_item_relationships_project_data import ( + TestrunCommentsListGetResponseDataItemRelationshipsProjectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestrunCommentsListGetResponseDataItemRelationshipsProjectData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunCommentsListGetResponseDataItemRelationshipsProjectData.from_dict( + _data + ) + + testrun_comments_list_get_response_data_item_relationships_project_obj = cls( + data=data, + ) + + testrun_comments_list_get_response_data_item_relationships_project_obj.additional_properties = ( + d + ) + return testrun_comments_list_get_response_data_item_relationships_project_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_project_data.py new file mode 100644 index 00000000..d95256fc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_project_data.py @@ -0,0 +1,103 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_comments_list_get_response_data_item_relationships_project_data_type import ( + TestrunCommentsListGetResponseDataItemRelationshipsProjectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunCommentsListGetResponseDataItemRelationshipsProjectData" +) + + +@_attrs_define +class TestrunCommentsListGetResponseDataItemRelationshipsProjectData: + """ + Attributes: + type (Union[Unset, TestrunCommentsListGetResponseDataItemRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestrunCommentsListGetResponseDataItemRelationshipsProjectDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunCommentsListGetResponseDataItemRelationshipsProjectDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunCommentsListGetResponseDataItemRelationshipsProjectDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrun_comments_list_get_response_data_item_relationships_project_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrun_comments_list_get_response_data_item_relationships_project_data_obj.additional_properties = ( + d + ) + return testrun_comments_list_get_response_data_item_relationships_project_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_project_data_type.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_project_data_type.py new file mode 100644 index 00000000..3ee48a9b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_relationships_project_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunCommentsListGetResponseDataItemRelationshipsProjectDataType( + str, Enum +): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_type.py new file mode 100644 index 00000000..44630e2a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunCommentsListGetResponseDataItemType(str, Enum): + TESTRUN_COMMENTS = "testrun_comments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_included_item.py new file mode 100644 index 00000000..a6d538fe --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestrunCommentsListGetResponseIncludedItem") + + +@_attrs_define +class TestrunCommentsListGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + testrun_comments_list_get_response_included_item_obj = cls() + + testrun_comments_list_get_response_included_item_obj.additional_properties = ( + d + ) + return testrun_comments_list_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_links.py new file mode 100644 index 00000000..fd3e0181 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_links.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunCommentsListGetResponseLinks") + + +@_attrs_define +class TestrunCommentsListGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/comments?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/comments?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/comments?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/comments?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/comments?page%5Bsize%5D=10&page%5Bnumber%5D=9. + """ + + self_: Union[Unset, str] = UNSET + first: Union[Unset, str] = UNSET + prev: Union[Unset, str] = UNSET + next_: Union[Unset, str] = UNSET + last: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + first = self.first + + prev = self.prev + + next_ = self.next_ + + last = self.last + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if first is not UNSET: + field_dict["first"] = first + if prev is not UNSET: + field_dict["prev"] = prev + if next_ is not UNSET: + field_dict["next"] = next_ + if last is not UNSET: + field_dict["last"] = last + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + first = d.pop("first", UNSET) + + prev = d.pop("prev", UNSET) + + next_ = d.pop("next", UNSET) + + last = d.pop("last", UNSET) + + testrun_comments_list_get_response_links_obj = cls( + self_=self_, + first=first, + prev=prev, + next_=next_, + last=last, + ) + + testrun_comments_list_get_response_links_obj.additional_properties = d + return testrun_comments_list_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_meta.py new file mode 100644 index 00000000..0c1b94d8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_get_response_meta.py @@ -0,0 +1,63 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunCommentsListGetResponseMeta") + + +@_attrs_define +class TestrunCommentsListGetResponseMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + testrun_comments_list_get_response_meta_obj = cls( + total_count=total_count, + ) + + testrun_comments_list_get_response_meta_obj.additional_properties = d + return testrun_comments_list_get_response_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request.py new file mode 100644 index 00000000..2e513f33 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_post_request_data_item import ( + TestrunCommentsListPostRequestDataItem, + ) + + +T = TypeVar("T", bound="TestrunCommentsListPostRequest") + + +@_attrs_define +class TestrunCommentsListPostRequest: + """ + Attributes: + data (Union[Unset, List['TestrunCommentsListPostRequestDataItem']]): + """ + + data: Union[Unset, List["TestrunCommentsListPostRequestDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_post_request_data_item import ( + TestrunCommentsListPostRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrunCommentsListPostRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + testrun_comments_list_post_request_obj = cls( + data=data, + ) + + testrun_comments_list_post_request_obj.additional_properties = d + return testrun_comments_list_post_request_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item.py new file mode 100644 index 00000000..0f958b85 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item.py @@ -0,0 +1,139 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_comments_list_post_request_data_item_type import ( + TestrunCommentsListPostRequestDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_post_request_data_item_attributes import ( + TestrunCommentsListPostRequestDataItemAttributes, + ) + from ..models.testrun_comments_list_post_request_data_item_relationships import ( + TestrunCommentsListPostRequestDataItemRelationships, + ) + + +T = TypeVar("T", bound="TestrunCommentsListPostRequestDataItem") + + +@_attrs_define +class TestrunCommentsListPostRequestDataItem: + """ + Attributes: + type (Union[Unset, TestrunCommentsListPostRequestDataItemType]): + attributes (Union[Unset, TestrunCommentsListPostRequestDataItemAttributes]): + relationships (Union[Unset, TestrunCommentsListPostRequestDataItemRelationships]): + """ + + type: Union[Unset, TestrunCommentsListPostRequestDataItemType] = UNSET + attributes: Union[ + Unset, "TestrunCommentsListPostRequestDataItemAttributes" + ] = UNSET + relationships: Union[ + Unset, "TestrunCommentsListPostRequestDataItemRelationships" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_post_request_data_item_attributes import ( + TestrunCommentsListPostRequestDataItemAttributes, + ) + from ..models.testrun_comments_list_post_request_data_item_relationships import ( + TestrunCommentsListPostRequestDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrunCommentsListPostRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunCommentsListPostRequestDataItemType(_type) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TestrunCommentsListPostRequestDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + TestrunCommentsListPostRequestDataItemAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TestrunCommentsListPostRequestDataItemRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + TestrunCommentsListPostRequestDataItemRelationships.from_dict( + _relationships + ) + ) + + testrun_comments_list_post_request_data_item_obj = cls( + type=type, + attributes=attributes, + relationships=relationships, + ) + + testrun_comments_list_post_request_data_item_obj.additional_properties = ( + d + ) + return testrun_comments_list_post_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_attributes.py new file mode 100644 index 00000000..d2074731 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_attributes.py @@ -0,0 +1,108 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_post_request_data_item_attributes_text import ( + TestrunCommentsListPostRequestDataItemAttributesText, + ) + + +T = TypeVar("T", bound="TestrunCommentsListPostRequestDataItemAttributes") + + +@_attrs_define +class TestrunCommentsListPostRequestDataItemAttributes: + """ + Attributes: + resolved (Union[Unset, bool]): + text (Union[Unset, TestrunCommentsListPostRequestDataItemAttributesText]): + title (Union[Unset, str]): Example: Title. + """ + + resolved: Union[Unset, bool] = UNSET + text: Union[ + Unset, "TestrunCommentsListPostRequestDataItemAttributesText" + ] = UNSET + title: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + resolved = self.resolved + + text: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.text, Unset): + text = self.text.to_dict() + + title = self.title + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if resolved is not UNSET: + field_dict["resolved"] = resolved + if text is not UNSET: + field_dict["text"] = text + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_post_request_data_item_attributes_text import ( + TestrunCommentsListPostRequestDataItemAttributesText, + ) + + d = src_dict.copy() + resolved = d.pop("resolved", UNSET) + + _text = d.pop("text", UNSET) + text: Union[ + Unset, TestrunCommentsListPostRequestDataItemAttributesText + ] + if isinstance(_text, Unset): + text = UNSET + else: + text = ( + TestrunCommentsListPostRequestDataItemAttributesText.from_dict( + _text + ) + ) + + title = d.pop("title", UNSET) + + testrun_comments_list_post_request_data_item_attributes_obj = cls( + resolved=resolved, + text=text, + title=title, + ) + + testrun_comments_list_post_request_data_item_attributes_obj.additional_properties = ( + d + ) + return testrun_comments_list_post_request_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_attributes_text.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_attributes_text.py new file mode 100644 index 00000000..bd872610 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_attributes_text.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_comments_list_post_request_data_item_attributes_text_type import ( + TestrunCommentsListPostRequestDataItemAttributesTextType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunCommentsListPostRequestDataItemAttributesText") + + +@_attrs_define +class TestrunCommentsListPostRequestDataItemAttributesText: + """ + Attributes: + type (Union[Unset, TestrunCommentsListPostRequestDataItemAttributesTextType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TestrunCommentsListPostRequestDataItemAttributesTextType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrunCommentsListPostRequestDataItemAttributesTextType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunCommentsListPostRequestDataItemAttributesTextType( + _type + ) + + value = d.pop("value", UNSET) + + testrun_comments_list_post_request_data_item_attributes_text_obj = cls( + type=type, + value=value, + ) + + testrun_comments_list_post_request_data_item_attributes_text_obj.additional_properties = ( + d + ) + return testrun_comments_list_post_request_data_item_attributes_text_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_attributes_text_type.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_attributes_text_type.py new file mode 100644 index 00000000..27037966 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_attributes_text_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunCommentsListPostRequestDataItemAttributesTextType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships.py new file mode 100644 index 00000000..cc8563e7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_post_request_data_item_relationships_author import ( + TestrunCommentsListPostRequestDataItemRelationshipsAuthor, + ) + from ..models.testrun_comments_list_post_request_data_item_relationships_parent_comment import ( + TestrunCommentsListPostRequestDataItemRelationshipsParentComment, + ) + + +T = TypeVar("T", bound="TestrunCommentsListPostRequestDataItemRelationships") + + +@_attrs_define +class TestrunCommentsListPostRequestDataItemRelationships: + """ + Attributes: + author (Union[Unset, TestrunCommentsListPostRequestDataItemRelationshipsAuthor]): + parent_comment (Union[Unset, TestrunCommentsListPostRequestDataItemRelationshipsParentComment]): + """ + + author: Union[ + Unset, "TestrunCommentsListPostRequestDataItemRelationshipsAuthor" + ] = UNSET + parent_comment: Union[ + Unset, + "TestrunCommentsListPostRequestDataItemRelationshipsParentComment", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + author: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.author, Unset): + author = self.author.to_dict() + + parent_comment: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.parent_comment, Unset): + parent_comment = self.parent_comment.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if author is not UNSET: + field_dict["author"] = author + if parent_comment is not UNSET: + field_dict["parentComment"] = parent_comment + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_post_request_data_item_relationships_author import ( + TestrunCommentsListPostRequestDataItemRelationshipsAuthor, + ) + from ..models.testrun_comments_list_post_request_data_item_relationships_parent_comment import ( + TestrunCommentsListPostRequestDataItemRelationshipsParentComment, + ) + + d = src_dict.copy() + _author = d.pop("author", UNSET) + author: Union[ + Unset, TestrunCommentsListPostRequestDataItemRelationshipsAuthor + ] + if isinstance(_author, Unset): + author = UNSET + else: + author = TestrunCommentsListPostRequestDataItemRelationshipsAuthor.from_dict( + _author + ) + + _parent_comment = d.pop("parentComment", UNSET) + parent_comment: Union[ + Unset, + TestrunCommentsListPostRequestDataItemRelationshipsParentComment, + ] + if isinstance(_parent_comment, Unset): + parent_comment = UNSET + else: + parent_comment = TestrunCommentsListPostRequestDataItemRelationshipsParentComment.from_dict( + _parent_comment + ) + + testrun_comments_list_post_request_data_item_relationships_obj = cls( + author=author, + parent_comment=parent_comment, + ) + + testrun_comments_list_post_request_data_item_relationships_obj.additional_properties = ( + d + ) + return testrun_comments_list_post_request_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_author.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_author.py new file mode 100644 index 00000000..6720606b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_author.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_post_request_data_item_relationships_author_data import ( + TestrunCommentsListPostRequestDataItemRelationshipsAuthorData, + ) + + +T = TypeVar( + "T", bound="TestrunCommentsListPostRequestDataItemRelationshipsAuthor" +) + + +@_attrs_define +class TestrunCommentsListPostRequestDataItemRelationshipsAuthor: + """ + Attributes: + data (Union[Unset, TestrunCommentsListPostRequestDataItemRelationshipsAuthorData]): + """ + + data: Union[ + Unset, "TestrunCommentsListPostRequestDataItemRelationshipsAuthorData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_post_request_data_item_relationships_author_data import ( + TestrunCommentsListPostRequestDataItemRelationshipsAuthorData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestrunCommentsListPostRequestDataItemRelationshipsAuthorData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunCommentsListPostRequestDataItemRelationshipsAuthorData.from_dict( + _data + ) + + testrun_comments_list_post_request_data_item_relationships_author_obj = cls( + data=data, + ) + + testrun_comments_list_post_request_data_item_relationships_author_obj.additional_properties = ( + d + ) + return testrun_comments_list_post_request_data_item_relationships_author_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_author_data.py new file mode 100644 index 00000000..914550e3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_author_data.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_comments_list_post_request_data_item_relationships_author_data_type import ( + TestrunCommentsListPostRequestDataItemRelationshipsAuthorDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunCommentsListPostRequestDataItemRelationshipsAuthorData" +) + + +@_attrs_define +class TestrunCommentsListPostRequestDataItemRelationshipsAuthorData: + """ + Attributes: + type (Union[Unset, TestrunCommentsListPostRequestDataItemRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + """ + + type: Union[ + Unset, + TestrunCommentsListPostRequestDataItemRelationshipsAuthorDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunCommentsListPostRequestDataItemRelationshipsAuthorDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunCommentsListPostRequestDataItemRelationshipsAuthorDataType( + _type + ) + + id = d.pop("id", UNSET) + + testrun_comments_list_post_request_data_item_relationships_author_data_obj = cls( + type=type, + id=id, + ) + + testrun_comments_list_post_request_data_item_relationships_author_data_obj.additional_properties = ( + d + ) + return testrun_comments_list_post_request_data_item_relationships_author_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_author_data_type.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_author_data_type.py new file mode 100644 index 00000000..8b654c4c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_author_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunCommentsListPostRequestDataItemRelationshipsAuthorDataType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_parent_comment.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_parent_comment.py new file mode 100644 index 00000000..4579cd4a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_parent_comment.py @@ -0,0 +1,93 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_post_request_data_item_relationships_parent_comment_data import ( + TestrunCommentsListPostRequestDataItemRelationshipsParentCommentData, + ) + + +T = TypeVar( + "T", + bound="TestrunCommentsListPostRequestDataItemRelationshipsParentComment", +) + + +@_attrs_define +class TestrunCommentsListPostRequestDataItemRelationshipsParentComment: + """ + Attributes: + data (Union[Unset, TestrunCommentsListPostRequestDataItemRelationshipsParentCommentData]): + """ + + data: Union[ + Unset, + "TestrunCommentsListPostRequestDataItemRelationshipsParentCommentData", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_post_request_data_item_relationships_parent_comment_data import ( + TestrunCommentsListPostRequestDataItemRelationshipsParentCommentData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestrunCommentsListPostRequestDataItemRelationshipsParentCommentData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunCommentsListPostRequestDataItemRelationshipsParentCommentData.from_dict( + _data + ) + + testrun_comments_list_post_request_data_item_relationships_parent_comment_obj = cls( + data=data, + ) + + testrun_comments_list_post_request_data_item_relationships_parent_comment_obj.additional_properties = ( + d + ) + return testrun_comments_list_post_request_data_item_relationships_parent_comment_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_parent_comment_data.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_parent_comment_data.py new file mode 100644 index 00000000..205d7f08 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_parent_comment_data.py @@ -0,0 +1,95 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_comments_list_post_request_data_item_relationships_parent_comment_data_type import ( + TestrunCommentsListPostRequestDataItemRelationshipsParentCommentDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrunCommentsListPostRequestDataItemRelationshipsParentCommentData", +) + + +@_attrs_define +class TestrunCommentsListPostRequestDataItemRelationshipsParentCommentData: + """ + Attributes: + type (Union[Unset, TestrunCommentsListPostRequestDataItemRelationshipsParentCommentDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyCommentId. + """ + + type: Union[ + Unset, + TestrunCommentsListPostRequestDataItemRelationshipsParentCommentDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunCommentsListPostRequestDataItemRelationshipsParentCommentDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunCommentsListPostRequestDataItemRelationshipsParentCommentDataType( + _type + ) + + id = d.pop("id", UNSET) + + testrun_comments_list_post_request_data_item_relationships_parent_comment_data_obj = cls( + type=type, + id=id, + ) + + testrun_comments_list_post_request_data_item_relationships_parent_comment_data_obj.additional_properties = ( + d + ) + return testrun_comments_list_post_request_data_item_relationships_parent_comment_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_parent_comment_data_type.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_parent_comment_data_type.py new file mode 100644 index 00000000..3a463279 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_relationships_parent_comment_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunCommentsListPostRequestDataItemRelationshipsParentCommentDataType( + str, Enum +): + TESTRUN_COMMENTS = "testrun_comments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_type.py new file mode 100644 index 00000000..9ade36a5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunCommentsListPostRequestDataItemType(str, Enum): + TESTRUN_COMMENTS = "testrun_comments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_response.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_response.py new file mode 100644 index 00000000..85878307 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_response.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_post_response_data_item import ( + TestrunCommentsListPostResponseDataItem, + ) + + +T = TypeVar("T", bound="TestrunCommentsListPostResponse") + + +@_attrs_define +class TestrunCommentsListPostResponse: + """ + Attributes: + data (Union[Unset, List['TestrunCommentsListPostResponseDataItem']]): + """ + + data: Union[Unset, List["TestrunCommentsListPostResponseDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_post_response_data_item import ( + TestrunCommentsListPostResponseDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrunCommentsListPostResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + testrun_comments_list_post_response_obj = cls( + data=data, + ) + + testrun_comments_list_post_response_obj.additional_properties = d + return testrun_comments_list_post_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_response_data_item.py new file mode 100644 index 00000000..b1618d4e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_response_data_item.py @@ -0,0 +1,112 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_comments_list_post_response_data_item_type import ( + TestrunCommentsListPostResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_list_post_response_data_item_links import ( + TestrunCommentsListPostResponseDataItemLinks, + ) + + +T = TypeVar("T", bound="TestrunCommentsListPostResponseDataItem") + + +@_attrs_define +class TestrunCommentsListPostResponseDataItem: + """ + Attributes: + type (Union[Unset, TestrunCommentsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyCommentId. + links (Union[Unset, TestrunCommentsListPostResponseDataItemLinks]): + """ + + type: Union[Unset, TestrunCommentsListPostResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + links: Union[Unset, "TestrunCommentsListPostResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_list_post_response_data_item_links import ( + TestrunCommentsListPostResponseDataItemLinks, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrunCommentsListPostResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunCommentsListPostResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrunCommentsListPostResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrunCommentsListPostResponseDataItemLinks.from_dict( + _links + ) + + testrun_comments_list_post_response_data_item_obj = cls( + type=type, + id=id, + links=links, + ) + + testrun_comments_list_post_response_data_item_obj.additional_properties = ( + d + ) + return testrun_comments_list_post_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_response_data_item_links.py new file mode 100644 index 00000000..2f5e0dcc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunCommentsListPostResponseDataItemLinks") + + +@_attrs_define +class TestrunCommentsListPostResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/comments/MyCommentId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testrun_comments_list_post_response_data_item_links_obj = cls( + self_=self_, + ) + + testrun_comments_list_post_response_data_item_links_obj.additional_properties = ( + d + ) + return testrun_comments_list_post_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_response_data_item_type.py new file mode 100644 index 00000000..71d523ef --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_list_post_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunCommentsListPostResponseDataItemType(str, Enum): + TESTRUN_COMMENTS = "testrun_comments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response.py new file mode 100644 index 00000000..f1dc3f23 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response.py @@ -0,0 +1,135 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_single_get_response_data import ( + TestrunCommentsSingleGetResponseData, + ) + from ..models.testrun_comments_single_get_response_included_item import ( + TestrunCommentsSingleGetResponseIncludedItem, + ) + from ..models.testrun_comments_single_get_response_links import ( + TestrunCommentsSingleGetResponseLinks, + ) + + +T = TypeVar("T", bound="TestrunCommentsSingleGetResponse") + + +@_attrs_define +class TestrunCommentsSingleGetResponse: + """ + Attributes: + data (Union[Unset, TestrunCommentsSingleGetResponseData]): + included (Union[Unset, List['TestrunCommentsSingleGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, TestrunCommentsSingleGetResponseLinks]): + """ + + data: Union[Unset, "TestrunCommentsSingleGetResponseData"] = UNSET + included: Union[ + Unset, List["TestrunCommentsSingleGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "TestrunCommentsSingleGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_single_get_response_data import ( + TestrunCommentsSingleGetResponseData, + ) + from ..models.testrun_comments_single_get_response_included_item import ( + TestrunCommentsSingleGetResponseIncludedItem, + ) + from ..models.testrun_comments_single_get_response_links import ( + TestrunCommentsSingleGetResponseLinks, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, TestrunCommentsSingleGetResponseData] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunCommentsSingleGetResponseData.from_dict(_data) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + TestrunCommentsSingleGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrunCommentsSingleGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrunCommentsSingleGetResponseLinks.from_dict(_links) + + testrun_comments_single_get_response_obj = cls( + data=data, + included=included, + links=links, + ) + + testrun_comments_single_get_response_obj.additional_properties = d + return testrun_comments_single_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data.py new file mode 100644 index 00000000..587610e5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data.py @@ -0,0 +1,199 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_comments_single_get_response_data_type import ( + TestrunCommentsSingleGetResponseDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_single_get_response_data_attributes import ( + TestrunCommentsSingleGetResponseDataAttributes, + ) + from ..models.testrun_comments_single_get_response_data_links import ( + TestrunCommentsSingleGetResponseDataLinks, + ) + from ..models.testrun_comments_single_get_response_data_meta import ( + TestrunCommentsSingleGetResponseDataMeta, + ) + from ..models.testrun_comments_single_get_response_data_relationships import ( + TestrunCommentsSingleGetResponseDataRelationships, + ) + + +T = TypeVar("T", bound="TestrunCommentsSingleGetResponseData") + + +@_attrs_define +class TestrunCommentsSingleGetResponseData: + """ + Attributes: + type (Union[Unset, TestrunCommentsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TestrunCommentsSingleGetResponseDataAttributes]): + relationships (Union[Unset, TestrunCommentsSingleGetResponseDataRelationships]): + meta (Union[Unset, TestrunCommentsSingleGetResponseDataMeta]): + links (Union[Unset, TestrunCommentsSingleGetResponseDataLinks]): + """ + + type: Union[Unset, TestrunCommentsSingleGetResponseDataType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestrunCommentsSingleGetResponseDataAttributes" + ] = UNSET + relationships: Union[ + Unset, "TestrunCommentsSingleGetResponseDataRelationships" + ] = UNSET + meta: Union[Unset, "TestrunCommentsSingleGetResponseDataMeta"] = UNSET + links: Union[Unset, "TestrunCommentsSingleGetResponseDataLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_single_get_response_data_attributes import ( + TestrunCommentsSingleGetResponseDataAttributes, + ) + from ..models.testrun_comments_single_get_response_data_links import ( + TestrunCommentsSingleGetResponseDataLinks, + ) + from ..models.testrun_comments_single_get_response_data_meta import ( + TestrunCommentsSingleGetResponseDataMeta, + ) + from ..models.testrun_comments_single_get_response_data_relationships import ( + TestrunCommentsSingleGetResponseDataRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrunCommentsSingleGetResponseDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunCommentsSingleGetResponseDataType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TestrunCommentsSingleGetResponseDataAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + TestrunCommentsSingleGetResponseDataAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TestrunCommentsSingleGetResponseDataRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + TestrunCommentsSingleGetResponseDataRelationships.from_dict( + _relationships + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestrunCommentsSingleGetResponseDataMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrunCommentsSingleGetResponseDataMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrunCommentsSingleGetResponseDataLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrunCommentsSingleGetResponseDataLinks.from_dict(_links) + + testrun_comments_single_get_response_data_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + testrun_comments_single_get_response_data_obj.additional_properties = d + return testrun_comments_single_get_response_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_attributes.py new file mode 100644 index 00000000..1dbb4208 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_attributes.py @@ -0,0 +1,133 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_single_get_response_data_attributes_text import ( + TestrunCommentsSingleGetResponseDataAttributesText, + ) + + +T = TypeVar("T", bound="TestrunCommentsSingleGetResponseDataAttributes") + + +@_attrs_define +class TestrunCommentsSingleGetResponseDataAttributes: + """ + Attributes: + created (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + id (Union[Unset, str]): Example: MyCommentId. + resolved (Union[Unset, bool]): + text (Union[Unset, TestrunCommentsSingleGetResponseDataAttributesText]): + title (Union[Unset, str]): Example: Title. + """ + + created: Union[Unset, datetime.datetime] = UNSET + id: Union[Unset, str] = UNSET + resolved: Union[Unset, bool] = UNSET + text: Union[ + Unset, "TestrunCommentsSingleGetResponseDataAttributesText" + ] = UNSET + title: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + created: Union[Unset, str] = UNSET + if not isinstance(self.created, Unset): + created = self.created.isoformat() + + id = self.id + + resolved = self.resolved + + text: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.text, Unset): + text = self.text.to_dict() + + title = self.title + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created is not UNSET: + field_dict["created"] = created + if id is not UNSET: + field_dict["id"] = id + if resolved is not UNSET: + field_dict["resolved"] = resolved + if text is not UNSET: + field_dict["text"] = text + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_single_get_response_data_attributes_text import ( + TestrunCommentsSingleGetResponseDataAttributesText, + ) + + d = src_dict.copy() + _created = d.pop("created", UNSET) + created: Union[Unset, datetime.datetime] + if isinstance(_created, Unset): + created = UNSET + else: + created = isoparse(_created) + + id = d.pop("id", UNSET) + + resolved = d.pop("resolved", UNSET) + + _text = d.pop("text", UNSET) + text: Union[Unset, TestrunCommentsSingleGetResponseDataAttributesText] + if isinstance(_text, Unset): + text = UNSET + else: + text = ( + TestrunCommentsSingleGetResponseDataAttributesText.from_dict( + _text + ) + ) + + title = d.pop("title", UNSET) + + testrun_comments_single_get_response_data_attributes_obj = cls( + created=created, + id=id, + resolved=resolved, + text=text, + title=title, + ) + + testrun_comments_single_get_response_data_attributes_obj.additional_properties = ( + d + ) + return testrun_comments_single_get_response_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_attributes_text.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_attributes_text.py new file mode 100644 index 00000000..92690117 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_attributes_text.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_comments_single_get_response_data_attributes_text_type import ( + TestrunCommentsSingleGetResponseDataAttributesTextType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunCommentsSingleGetResponseDataAttributesText") + + +@_attrs_define +class TestrunCommentsSingleGetResponseDataAttributesText: + """ + Attributes: + type (Union[Unset, TestrunCommentsSingleGetResponseDataAttributesTextType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TestrunCommentsSingleGetResponseDataAttributesTextType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrunCommentsSingleGetResponseDataAttributesTextType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunCommentsSingleGetResponseDataAttributesTextType( + _type + ) + + value = d.pop("value", UNSET) + + testrun_comments_single_get_response_data_attributes_text_obj = cls( + type=type, + value=value, + ) + + testrun_comments_single_get_response_data_attributes_text_obj.additional_properties = ( + d + ) + return testrun_comments_single_get_response_data_attributes_text_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_attributes_text_type.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_attributes_text_type.py new file mode 100644 index 00000000..1c8d14dc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_attributes_text_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunCommentsSingleGetResponseDataAttributesTextType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_links.py new file mode 100644 index 00000000..5ef5fd7e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunCommentsSingleGetResponseDataLinks") + + +@_attrs_define +class TestrunCommentsSingleGetResponseDataLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/comments/MyCommentId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testrun_comments_single_get_response_data_links_obj = cls( + self_=self_, + ) + + testrun_comments_single_get_response_data_links_obj.additional_properties = ( + d + ) + return testrun_comments_single_get_response_data_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_meta.py new file mode 100644 index 00000000..20341e23 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_meta.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_single_get_response_data_meta_errors_item import ( + TestrunCommentsSingleGetResponseDataMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TestrunCommentsSingleGetResponseDataMeta") + + +@_attrs_define +class TestrunCommentsSingleGetResponseDataMeta: + """ + Attributes: + errors (Union[Unset, List['TestrunCommentsSingleGetResponseDataMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["TestrunCommentsSingleGetResponseDataMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_single_get_response_data_meta_errors_item import ( + TestrunCommentsSingleGetResponseDataMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ( + TestrunCommentsSingleGetResponseDataMetaErrorsItem.from_dict( + errors_item_data + ) + ) + + errors.append(errors_item) + + testrun_comments_single_get_response_data_meta_obj = cls( + errors=errors, + ) + + testrun_comments_single_get_response_data_meta_obj.additional_properties = ( + d + ) + return testrun_comments_single_get_response_data_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_meta_errors_item.py new file mode 100644 index 00000000..fba1d8c1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_meta_errors_item.py @@ -0,0 +1,116 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_single_get_response_data_meta_errors_item_source import ( + TestrunCommentsSingleGetResponseDataMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="TestrunCommentsSingleGetResponseDataMetaErrorsItem") + + +@_attrs_define +class TestrunCommentsSingleGetResponseDataMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TestrunCommentsSingleGetResponseDataMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "TestrunCommentsSingleGetResponseDataMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_single_get_response_data_meta_errors_item_source import ( + TestrunCommentsSingleGetResponseDataMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, TestrunCommentsSingleGetResponseDataMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = TestrunCommentsSingleGetResponseDataMetaErrorsItemSource.from_dict( + _source + ) + + testrun_comments_single_get_response_data_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + testrun_comments_single_get_response_data_meta_errors_item_obj.additional_properties = ( + d + ) + return testrun_comments_single_get_response_data_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_meta_errors_item_source.py new file mode 100644 index 00000000..cbfcfb5e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_meta_errors_item_source.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_single_get_response_data_meta_errors_item_source_resource import ( + TestrunCommentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", bound="TestrunCommentsSingleGetResponseDataMetaErrorsItemSource" +) + + +@_attrs_define +class TestrunCommentsSingleGetResponseDataMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TestrunCommentsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the + error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "TestrunCommentsSingleGetResponseDataMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_single_get_response_data_meta_errors_item_source_resource import ( + TestrunCommentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + TestrunCommentsSingleGetResponseDataMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TestrunCommentsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + + testrun_comments_single_get_response_data_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + testrun_comments_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( + d + ) + return testrun_comments_single_get_response_data_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..f471d994 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrunCommentsSingleGetResponseDataMetaErrorsItemSourceResource", +) + + +@_attrs_define +class TestrunCommentsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + testrun_comments_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + testrun_comments_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return testrun_comments_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships.py new file mode 100644 index 00000000..4b0d6f80 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships.py @@ -0,0 +1,174 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_single_get_response_data_relationships_author import ( + TestrunCommentsSingleGetResponseDataRelationshipsAuthor, + ) + from ..models.testrun_comments_single_get_response_data_relationships_child_comments import ( + TestrunCommentsSingleGetResponseDataRelationshipsChildComments, + ) + from ..models.testrun_comments_single_get_response_data_relationships_parent_comment import ( + TestrunCommentsSingleGetResponseDataRelationshipsParentComment, + ) + from ..models.testrun_comments_single_get_response_data_relationships_project import ( + TestrunCommentsSingleGetResponseDataRelationshipsProject, + ) + + +T = TypeVar("T", bound="TestrunCommentsSingleGetResponseDataRelationships") + + +@_attrs_define +class TestrunCommentsSingleGetResponseDataRelationships: + """ + Attributes: + author (Union[Unset, TestrunCommentsSingleGetResponseDataRelationshipsAuthor]): + child_comments (Union[Unset, TestrunCommentsSingleGetResponseDataRelationshipsChildComments]): + parent_comment (Union[Unset, TestrunCommentsSingleGetResponseDataRelationshipsParentComment]): + project (Union[Unset, TestrunCommentsSingleGetResponseDataRelationshipsProject]): + """ + + author: Union[ + Unset, "TestrunCommentsSingleGetResponseDataRelationshipsAuthor" + ] = UNSET + child_comments: Union[ + Unset, "TestrunCommentsSingleGetResponseDataRelationshipsChildComments" + ] = UNSET + parent_comment: Union[ + Unset, "TestrunCommentsSingleGetResponseDataRelationshipsParentComment" + ] = UNSET + project: Union[ + Unset, "TestrunCommentsSingleGetResponseDataRelationshipsProject" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + author: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.author, Unset): + author = self.author.to_dict() + + child_comments: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.child_comments, Unset): + child_comments = self.child_comments.to_dict() + + parent_comment: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.parent_comment, Unset): + parent_comment = self.parent_comment.to_dict() + + project: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project, Unset): + project = self.project.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if author is not UNSET: + field_dict["author"] = author + if child_comments is not UNSET: + field_dict["childComments"] = child_comments + if parent_comment is not UNSET: + field_dict["parentComment"] = parent_comment + if project is not UNSET: + field_dict["project"] = project + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_single_get_response_data_relationships_author import ( + TestrunCommentsSingleGetResponseDataRelationshipsAuthor, + ) + from ..models.testrun_comments_single_get_response_data_relationships_child_comments import ( + TestrunCommentsSingleGetResponseDataRelationshipsChildComments, + ) + from ..models.testrun_comments_single_get_response_data_relationships_parent_comment import ( + TestrunCommentsSingleGetResponseDataRelationshipsParentComment, + ) + from ..models.testrun_comments_single_get_response_data_relationships_project import ( + TestrunCommentsSingleGetResponseDataRelationshipsProject, + ) + + d = src_dict.copy() + _author = d.pop("author", UNSET) + author: Union[ + Unset, TestrunCommentsSingleGetResponseDataRelationshipsAuthor + ] + if isinstance(_author, Unset): + author = UNSET + else: + author = TestrunCommentsSingleGetResponseDataRelationshipsAuthor.from_dict( + _author + ) + + _child_comments = d.pop("childComments", UNSET) + child_comments: Union[ + Unset, + TestrunCommentsSingleGetResponseDataRelationshipsChildComments, + ] + if isinstance(_child_comments, Unset): + child_comments = UNSET + else: + child_comments = TestrunCommentsSingleGetResponseDataRelationshipsChildComments.from_dict( + _child_comments + ) + + _parent_comment = d.pop("parentComment", UNSET) + parent_comment: Union[ + Unset, + TestrunCommentsSingleGetResponseDataRelationshipsParentComment, + ] + if isinstance(_parent_comment, Unset): + parent_comment = UNSET + else: + parent_comment = TestrunCommentsSingleGetResponseDataRelationshipsParentComment.from_dict( + _parent_comment + ) + + _project = d.pop("project", UNSET) + project: Union[ + Unset, TestrunCommentsSingleGetResponseDataRelationshipsProject + ] + if isinstance(_project, Unset): + project = UNSET + else: + project = TestrunCommentsSingleGetResponseDataRelationshipsProject.from_dict( + _project + ) + + testrun_comments_single_get_response_data_relationships_obj = cls( + author=author, + child_comments=child_comments, + parent_comment=parent_comment, + project=project, + ) + + testrun_comments_single_get_response_data_relationships_obj.additional_properties = ( + d + ) + return testrun_comments_single_get_response_data_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_author.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_author.py new file mode 100644 index 00000000..b867ccf6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_author.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_single_get_response_data_relationships_author_data import ( + TestrunCommentsSingleGetResponseDataRelationshipsAuthorData, + ) + + +T = TypeVar( + "T", bound="TestrunCommentsSingleGetResponseDataRelationshipsAuthor" +) + + +@_attrs_define +class TestrunCommentsSingleGetResponseDataRelationshipsAuthor: + """ + Attributes: + data (Union[Unset, TestrunCommentsSingleGetResponseDataRelationshipsAuthorData]): + """ + + data: Union[ + Unset, "TestrunCommentsSingleGetResponseDataRelationshipsAuthorData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_single_get_response_data_relationships_author_data import ( + TestrunCommentsSingleGetResponseDataRelationshipsAuthorData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrunCommentsSingleGetResponseDataRelationshipsAuthorData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunCommentsSingleGetResponseDataRelationshipsAuthorData.from_dict( + _data + ) + + testrun_comments_single_get_response_data_relationships_author_obj = ( + cls( + data=data, + ) + ) + + testrun_comments_single_get_response_data_relationships_author_obj.additional_properties = ( + d + ) + return ( + testrun_comments_single_get_response_data_relationships_author_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_author_data.py new file mode 100644 index 00000000..fe370430 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_author_data.py @@ -0,0 +1,102 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_comments_single_get_response_data_relationships_author_data_type import ( + TestrunCommentsSingleGetResponseDataRelationshipsAuthorDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunCommentsSingleGetResponseDataRelationshipsAuthorData" +) + + +@_attrs_define +class TestrunCommentsSingleGetResponseDataRelationshipsAuthorData: + """ + Attributes: + type (Union[Unset, TestrunCommentsSingleGetResponseDataRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, TestrunCommentsSingleGetResponseDataRelationshipsAuthorDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunCommentsSingleGetResponseDataRelationshipsAuthorDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunCommentsSingleGetResponseDataRelationshipsAuthorDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrun_comments_single_get_response_data_relationships_author_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrun_comments_single_get_response_data_relationships_author_data_obj.additional_properties = ( + d + ) + return testrun_comments_single_get_response_data_relationships_author_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_author_data_type.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_author_data_type.py new file mode 100644 index 00000000..b56ab637 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_author_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunCommentsSingleGetResponseDataRelationshipsAuthorDataType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_child_comments.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_child_comments.py new file mode 100644 index 00000000..538e6ea5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_child_comments.py @@ -0,0 +1,124 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_single_get_response_data_relationships_child_comments_data_item import ( + TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsDataItem, + ) + from ..models.testrun_comments_single_get_response_data_relationships_child_comments_meta import ( + TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsMeta, + ) + + +T = TypeVar( + "T", bound="TestrunCommentsSingleGetResponseDataRelationshipsChildComments" +) + + +@_attrs_define +class TestrunCommentsSingleGetResponseDataRelationshipsChildComments: + """ + Attributes: + data (Union[Unset, List['TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsDataItem']]): + meta (Union[Unset, TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsMeta]): + """ + + data: Union[ + Unset, + List[ + "TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsDataItem" + ], + ] = UNSET + meta: Union[ + Unset, + "TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsMeta", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_single_get_response_data_relationships_child_comments_data_item import ( + TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsDataItem, + ) + from ..models.testrun_comments_single_get_response_data_relationships_child_comments_meta import ( + TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, + TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsMeta, + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsMeta.from_dict( + _meta + ) + + testrun_comments_single_get_response_data_relationships_child_comments_obj = cls( + data=data, + meta=meta, + ) + + testrun_comments_single_get_response_data_relationships_child_comments_obj.additional_properties = ( + d + ) + return testrun_comments_single_get_response_data_relationships_child_comments_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_child_comments_data_item.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_child_comments_data_item.py new file mode 100644 index 00000000..640e0bdc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_child_comments_data_item.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_comments_single_get_response_data_relationships_child_comments_data_item_type import ( + TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsDataItem", +) + + +@_attrs_define +class TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsDataItem: + """ + Attributes: + type (Union[Unset, TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrun_comments_single_get_response_data_relationships_child_comments_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrun_comments_single_get_response_data_relationships_child_comments_data_item_obj.additional_properties = ( + d + ) + return testrun_comments_single_get_response_data_relationships_child_comments_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_child_comments_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_child_comments_data_item_type.py new file mode 100644 index 00000000..6a2ae584 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_child_comments_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsDataItemType( + str, Enum +): + TESTRUN_COMMENTS = "testrun_comments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_child_comments_meta.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_child_comments_meta.py new file mode 100644 index 00000000..edc2a931 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_child_comments_meta.py @@ -0,0 +1,68 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsMeta", +) + + +@_attrs_define +class TestrunCommentsSingleGetResponseDataRelationshipsChildCommentsMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + testrun_comments_single_get_response_data_relationships_child_comments_meta_obj = cls( + total_count=total_count, + ) + + testrun_comments_single_get_response_data_relationships_child_comments_meta_obj.additional_properties = ( + d + ) + return testrun_comments_single_get_response_data_relationships_child_comments_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_parent_comment.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_parent_comment.py new file mode 100644 index 00000000..ccb92c0a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_parent_comment.py @@ -0,0 +1,92 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_single_get_response_data_relationships_parent_comment_data import ( + TestrunCommentsSingleGetResponseDataRelationshipsParentCommentData, + ) + + +T = TypeVar( + "T", bound="TestrunCommentsSingleGetResponseDataRelationshipsParentComment" +) + + +@_attrs_define +class TestrunCommentsSingleGetResponseDataRelationshipsParentComment: + """ + Attributes: + data (Union[Unset, TestrunCommentsSingleGetResponseDataRelationshipsParentCommentData]): + """ + + data: Union[ + Unset, + "TestrunCommentsSingleGetResponseDataRelationshipsParentCommentData", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_single_get_response_data_relationships_parent_comment_data import ( + TestrunCommentsSingleGetResponseDataRelationshipsParentCommentData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestrunCommentsSingleGetResponseDataRelationshipsParentCommentData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunCommentsSingleGetResponseDataRelationshipsParentCommentData.from_dict( + _data + ) + + testrun_comments_single_get_response_data_relationships_parent_comment_obj = cls( + data=data, + ) + + testrun_comments_single_get_response_data_relationships_parent_comment_obj.additional_properties = ( + d + ) + return testrun_comments_single_get_response_data_relationships_parent_comment_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_parent_comment_data.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_parent_comment_data.py new file mode 100644 index 00000000..64824159 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_parent_comment_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_comments_single_get_response_data_relationships_parent_comment_data_type import ( + TestrunCommentsSingleGetResponseDataRelationshipsParentCommentDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrunCommentsSingleGetResponseDataRelationshipsParentCommentData", +) + + +@_attrs_define +class TestrunCommentsSingleGetResponseDataRelationshipsParentCommentData: + """ + Attributes: + type (Union[Unset, TestrunCommentsSingleGetResponseDataRelationshipsParentCommentDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestrunCommentsSingleGetResponseDataRelationshipsParentCommentDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunCommentsSingleGetResponseDataRelationshipsParentCommentDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunCommentsSingleGetResponseDataRelationshipsParentCommentDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrun_comments_single_get_response_data_relationships_parent_comment_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrun_comments_single_get_response_data_relationships_parent_comment_data_obj.additional_properties = ( + d + ) + return testrun_comments_single_get_response_data_relationships_parent_comment_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_parent_comment_data_type.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_parent_comment_data_type.py new file mode 100644 index 00000000..2dce75f1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_parent_comment_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunCommentsSingleGetResponseDataRelationshipsParentCommentDataType( + str, Enum +): + TESTRUN_COMMENTS = "testrun_comments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_project.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_project.py new file mode 100644 index 00000000..2ed9296e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_project.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_single_get_response_data_relationships_project_data import ( + TestrunCommentsSingleGetResponseDataRelationshipsProjectData, + ) + + +T = TypeVar( + "T", bound="TestrunCommentsSingleGetResponseDataRelationshipsProject" +) + + +@_attrs_define +class TestrunCommentsSingleGetResponseDataRelationshipsProject: + """ + Attributes: + data (Union[Unset, TestrunCommentsSingleGetResponseDataRelationshipsProjectData]): + """ + + data: Union[ + Unset, "TestrunCommentsSingleGetResponseDataRelationshipsProjectData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_single_get_response_data_relationships_project_data import ( + TestrunCommentsSingleGetResponseDataRelationshipsProjectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrunCommentsSingleGetResponseDataRelationshipsProjectData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunCommentsSingleGetResponseDataRelationshipsProjectData.from_dict( + _data + ) + + testrun_comments_single_get_response_data_relationships_project_obj = ( + cls( + data=data, + ) + ) + + testrun_comments_single_get_response_data_relationships_project_obj.additional_properties = ( + d + ) + return ( + testrun_comments_single_get_response_data_relationships_project_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_project_data.py new file mode 100644 index 00000000..2469c9ec --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_project_data.py @@ -0,0 +1,102 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_comments_single_get_response_data_relationships_project_data_type import ( + TestrunCommentsSingleGetResponseDataRelationshipsProjectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunCommentsSingleGetResponseDataRelationshipsProjectData" +) + + +@_attrs_define +class TestrunCommentsSingleGetResponseDataRelationshipsProjectData: + """ + Attributes: + type (Union[Unset, TestrunCommentsSingleGetResponseDataRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, TestrunCommentsSingleGetResponseDataRelationshipsProjectDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunCommentsSingleGetResponseDataRelationshipsProjectDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunCommentsSingleGetResponseDataRelationshipsProjectDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testrun_comments_single_get_response_data_relationships_project_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testrun_comments_single_get_response_data_relationships_project_data_obj.additional_properties = ( + d + ) + return testrun_comments_single_get_response_data_relationships_project_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_project_data_type.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_project_data_type.py new file mode 100644 index 00000000..f4ebc23a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_relationships_project_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunCommentsSingleGetResponseDataRelationshipsProjectDataType( + str, Enum +): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_type.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_type.py new file mode 100644 index 00000000..1e8e9576 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunCommentsSingleGetResponseDataType(str, Enum): + TESTRUN_COMMENTS = "testrun_comments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_included_item.py new file mode 100644 index 00000000..2e1eee54 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestrunCommentsSingleGetResponseIncludedItem") + + +@_attrs_define +class TestrunCommentsSingleGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + testrun_comments_single_get_response_included_item_obj = cls() + + testrun_comments_single_get_response_included_item_obj.additional_properties = ( + d + ) + return testrun_comments_single_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_links.py new file mode 100644 index 00000000..80104740 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_get_response_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunCommentsSingleGetResponseLinks") + + +@_attrs_define +class TestrunCommentsSingleGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/comments/MyCommentId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testrun_comments_single_get_response_links_obj = cls( + self_=self_, + ) + + testrun_comments_single_get_response_links_obj.additional_properties = ( + d + ) + return testrun_comments_single_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_patch_request.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_patch_request.py new file mode 100644 index 00000000..8145fd25 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_patch_request.py @@ -0,0 +1,80 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_single_patch_request_data import ( + TestrunCommentsSinglePatchRequestData, + ) + + +T = TypeVar("T", bound="TestrunCommentsSinglePatchRequest") + + +@_attrs_define +class TestrunCommentsSinglePatchRequest: + """ + Attributes: + data (Union[Unset, TestrunCommentsSinglePatchRequestData]): + """ + + data: Union[Unset, "TestrunCommentsSinglePatchRequestData"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_single_patch_request_data import ( + TestrunCommentsSinglePatchRequestData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, TestrunCommentsSinglePatchRequestData] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunCommentsSinglePatchRequestData.from_dict(_data) + + testrun_comments_single_patch_request_obj = cls( + data=data, + ) + + testrun_comments_single_patch_request_obj.additional_properties = d + return testrun_comments_single_patch_request_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_patch_request_data.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_patch_request_data.py new file mode 100644 index 00000000..a88d056d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_patch_request_data.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testrun_comments_single_patch_request_data_type import ( + TestrunCommentsSinglePatchRequestDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testrun_comments_single_patch_request_data_attributes import ( + TestrunCommentsSinglePatchRequestDataAttributes, + ) + + +T = TypeVar("T", bound="TestrunCommentsSinglePatchRequestData") + + +@_attrs_define +class TestrunCommentsSinglePatchRequestData: + """ + Attributes: + type (Union[Unset, TestrunCommentsSinglePatchRequestDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyCommentId. + attributes (Union[Unset, TestrunCommentsSinglePatchRequestDataAttributes]): + """ + + type: Union[Unset, TestrunCommentsSinglePatchRequestDataType] = UNSET + id: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestrunCommentsSinglePatchRequestDataAttributes" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testrun_comments_single_patch_request_data_attributes import ( + TestrunCommentsSinglePatchRequestDataAttributes, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrunCommentsSinglePatchRequestDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunCommentsSinglePatchRequestDataType(_type) + + id = d.pop("id", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TestrunCommentsSinglePatchRequestDataAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + TestrunCommentsSinglePatchRequestDataAttributes.from_dict( + _attributes + ) + ) + + testrun_comments_single_patch_request_data_obj = cls( + type=type, + id=id, + attributes=attributes, + ) + + testrun_comments_single_patch_request_data_obj.additional_properties = ( + d + ) + return testrun_comments_single_patch_request_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_patch_request_data_attributes.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_patch_request_data_attributes.py new file mode 100644 index 00000000..0eab43bc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_patch_request_data_attributes.py @@ -0,0 +1,65 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunCommentsSinglePatchRequestDataAttributes") + + +@_attrs_define +class TestrunCommentsSinglePatchRequestDataAttributes: + """ + Attributes: + resolved (Union[Unset, bool]): + """ + + resolved: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + resolved = self.resolved + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if resolved is not UNSET: + field_dict["resolved"] = resolved + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + resolved = d.pop("resolved", UNSET) + + testrun_comments_single_patch_request_data_attributes_obj = cls( + resolved=resolved, + ) + + testrun_comments_single_patch_request_data_attributes_obj.additional_properties = ( + d + ) + return testrun_comments_single_patch_request_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testrun_comments_single_patch_request_data_type.py b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_patch_request_data_type.py new file mode 100644 index 00000000..f4be9141 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testrun_comments_single_patch_request_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunCommentsSinglePatchRequestDataType(str, Enum): + TESTRUN_COMMENTS = "testrun_comments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_list_get_response.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response.py new file mode 100644 index 00000000..d982de2f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response.py @@ -0,0 +1,158 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_get_response_data_item import ( + TestrunsListGetResponseDataItem, + ) + from ..models.testruns_list_get_response_included_item import ( + TestrunsListGetResponseIncludedItem, + ) + from ..models.testruns_list_get_response_links import ( + TestrunsListGetResponseLinks, + ) + from ..models.testruns_list_get_response_meta import ( + TestrunsListGetResponseMeta, + ) + + +T = TypeVar("T", bound="TestrunsListGetResponse") + + +@_attrs_define +class TestrunsListGetResponse: + """ + Attributes: + meta (Union[Unset, TestrunsListGetResponseMeta]): + data (Union[Unset, List['TestrunsListGetResponseDataItem']]): + included (Union[Unset, List['TestrunsListGetResponseIncludedItem']]): Related entities might be returned, see Rest API User + Guide. + links (Union[Unset, TestrunsListGetResponseLinks]): + """ + + meta: Union[Unset, "TestrunsListGetResponseMeta"] = UNSET + data: Union[Unset, List["TestrunsListGetResponseDataItem"]] = UNSET + included: Union[Unset, List["TestrunsListGetResponseIncludedItem"]] = UNSET + links: Union[Unset, "TestrunsListGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_get_response_data_item import ( + TestrunsListGetResponseDataItem, + ) + from ..models.testruns_list_get_response_included_item import ( + TestrunsListGetResponseIncludedItem, + ) + from ..models.testruns_list_get_response_links import ( + TestrunsListGetResponseLinks, + ) + from ..models.testruns_list_get_response_meta import ( + TestrunsListGetResponseMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestrunsListGetResponseMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrunsListGetResponseMeta.from_dict(_meta) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrunsListGetResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = TestrunsListGetResponseIncludedItem.from_dict( + included_item_data + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrunsListGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrunsListGetResponseLinks.from_dict(_links) + + testruns_list_get_response_obj = cls( + meta=meta, + data=data, + included=included, + links=links, + ) + + testruns_list_get_response_obj.additional_properties = d + return testruns_list_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item.py new file mode 100644 index 00000000..e57a7076 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item.py @@ -0,0 +1,195 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_list_get_response_data_item_type import ( + TestrunsListGetResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_get_response_data_item_attributes import ( + TestrunsListGetResponseDataItemAttributes, + ) + from ..models.testruns_list_get_response_data_item_links import ( + TestrunsListGetResponseDataItemLinks, + ) + from ..models.testruns_list_get_response_data_item_meta import ( + TestrunsListGetResponseDataItemMeta, + ) + from ..models.testruns_list_get_response_data_item_relationships import ( + TestrunsListGetResponseDataItemRelationships, + ) + + +T = TypeVar("T", bound="TestrunsListGetResponseDataItem") + + +@_attrs_define +class TestrunsListGetResponseDataItem: + """ + Attributes: + type (Union[Unset, TestrunsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TestrunsListGetResponseDataItemAttributes]): + relationships (Union[Unset, TestrunsListGetResponseDataItemRelationships]): + meta (Union[Unset, TestrunsListGetResponseDataItemMeta]): + links (Union[Unset, TestrunsListGetResponseDataItemLinks]): + """ + + type: Union[Unset, TestrunsListGetResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestrunsListGetResponseDataItemAttributes" + ] = UNSET + relationships: Union[ + Unset, "TestrunsListGetResponseDataItemRelationships" + ] = UNSET + meta: Union[Unset, "TestrunsListGetResponseDataItemMeta"] = UNSET + links: Union[Unset, "TestrunsListGetResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_get_response_data_item_attributes import ( + TestrunsListGetResponseDataItemAttributes, + ) + from ..models.testruns_list_get_response_data_item_links import ( + TestrunsListGetResponseDataItemLinks, + ) + from ..models.testruns_list_get_response_data_item_meta import ( + TestrunsListGetResponseDataItemMeta, + ) + from ..models.testruns_list_get_response_data_item_relationships import ( + TestrunsListGetResponseDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrunsListGetResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsListGetResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, TestrunsListGetResponseDataItemAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TestrunsListGetResponseDataItemAttributes.from_dict( + _attributes + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TestrunsListGetResponseDataItemRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + TestrunsListGetResponseDataItemRelationships.from_dict( + _relationships + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestrunsListGetResponseDataItemMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrunsListGetResponseDataItemMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrunsListGetResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrunsListGetResponseDataItemLinks.from_dict(_links) + + testruns_list_get_response_data_item_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + testruns_list_get_response_data_item_obj.additional_properties = d + return testruns_list_get_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_attributes.py new file mode 100644 index 00000000..8a3f5b67 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_attributes.py @@ -0,0 +1,256 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.testruns_list_get_response_data_item_attributes_select_test_cases_by import ( + TestrunsListGetResponseDataItemAttributesSelectTestCasesBy, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_get_response_data_item_attributes_home_page_content import ( + TestrunsListGetResponseDataItemAttributesHomePageContent, + ) + + +T = TypeVar("T", bound="TestrunsListGetResponseDataItemAttributes") + + +@_attrs_define +class TestrunsListGetResponseDataItemAttributes: + """ + Attributes: + created (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + finished_on (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + group_id (Union[Unset, str]): Example: Group ID. + home_page_content (Union[Unset, TestrunsListGetResponseDataItemAttributesHomePageContent]): + id (Union[Unset, str]): Example: ID. + id_prefix (Union[Unset, str]): Example: ID Prefix. + is_template (Union[Unset, bool]): + keep_in_history (Union[Unset, bool]): + query (Union[Unset, str]): Example: Query. + select_test_cases_by (Union[Unset, TestrunsListGetResponseDataItemAttributesSelectTestCasesBy]): Example: + manualSelection. + status (Union[Unset, str]): Example: open. + title (Union[Unset, str]): Example: Title. + type (Union[Unset, str]): Example: manual. + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + use_report_from_template (Union[Unset, bool]): + """ + + created: Union[Unset, datetime.datetime] = UNSET + finished_on: Union[Unset, datetime.datetime] = UNSET + group_id: Union[Unset, str] = UNSET + home_page_content: Union[ + Unset, "TestrunsListGetResponseDataItemAttributesHomePageContent" + ] = UNSET + id: Union[Unset, str] = UNSET + id_prefix: Union[Unset, str] = UNSET + is_template: Union[Unset, bool] = UNSET + keep_in_history: Union[Unset, bool] = UNSET + query: Union[Unset, str] = UNSET + select_test_cases_by: Union[ + Unset, TestrunsListGetResponseDataItemAttributesSelectTestCasesBy + ] = UNSET + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + updated: Union[Unset, datetime.datetime] = UNSET + use_report_from_template: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + created: Union[Unset, str] = UNSET + if not isinstance(self.created, Unset): + created = self.created.isoformat() + + finished_on: Union[Unset, str] = UNSET + if not isinstance(self.finished_on, Unset): + finished_on = self.finished_on.isoformat() + + group_id = self.group_id + + home_page_content: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.home_page_content, Unset): + home_page_content = self.home_page_content.to_dict() + + id = self.id + + id_prefix = self.id_prefix + + is_template = self.is_template + + keep_in_history = self.keep_in_history + + query = self.query + + select_test_cases_by: Union[Unset, str] = UNSET + if not isinstance(self.select_test_cases_by, Unset): + select_test_cases_by = self.select_test_cases_by.value + + status = self.status + + title = self.title + + type = self.type + + updated: Union[Unset, str] = UNSET + if not isinstance(self.updated, Unset): + updated = self.updated.isoformat() + + use_report_from_template = self.use_report_from_template + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created is not UNSET: + field_dict["created"] = created + if finished_on is not UNSET: + field_dict["finishedOn"] = finished_on + if group_id is not UNSET: + field_dict["groupId"] = group_id + if home_page_content is not UNSET: + field_dict["homePageContent"] = home_page_content + if id is not UNSET: + field_dict["id"] = id + if id_prefix is not UNSET: + field_dict["idPrefix"] = id_prefix + if is_template is not UNSET: + field_dict["isTemplate"] = is_template + if keep_in_history is not UNSET: + field_dict["keepInHistory"] = keep_in_history + if query is not UNSET: + field_dict["query"] = query + if select_test_cases_by is not UNSET: + field_dict["selectTestCasesBy"] = select_test_cases_by + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if type is not UNSET: + field_dict["type"] = type + if updated is not UNSET: + field_dict["updated"] = updated + if use_report_from_template is not UNSET: + field_dict["useReportFromTemplate"] = use_report_from_template + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_get_response_data_item_attributes_home_page_content import ( + TestrunsListGetResponseDataItemAttributesHomePageContent, + ) + + d = src_dict.copy() + _created = d.pop("created", UNSET) + created: Union[Unset, datetime.datetime] + if isinstance(_created, Unset): + created = UNSET + else: + created = isoparse(_created) + + _finished_on = d.pop("finishedOn", UNSET) + finished_on: Union[Unset, datetime.datetime] + if isinstance(_finished_on, Unset): + finished_on = UNSET + else: + finished_on = isoparse(_finished_on) + + group_id = d.pop("groupId", UNSET) + + _home_page_content = d.pop("homePageContent", UNSET) + home_page_content: Union[ + Unset, TestrunsListGetResponseDataItemAttributesHomePageContent + ] + if isinstance(_home_page_content, Unset): + home_page_content = UNSET + else: + home_page_content = TestrunsListGetResponseDataItemAttributesHomePageContent.from_dict( + _home_page_content + ) + + id = d.pop("id", UNSET) + + id_prefix = d.pop("idPrefix", UNSET) + + is_template = d.pop("isTemplate", UNSET) + + keep_in_history = d.pop("keepInHistory", UNSET) + + query = d.pop("query", UNSET) + + _select_test_cases_by = d.pop("selectTestCasesBy", UNSET) + select_test_cases_by: Union[ + Unset, TestrunsListGetResponseDataItemAttributesSelectTestCasesBy + ] + if isinstance(_select_test_cases_by, Unset): + select_test_cases_by = UNSET + else: + select_test_cases_by = ( + TestrunsListGetResponseDataItemAttributesSelectTestCasesBy( + _select_test_cases_by + ) + ) + + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + type = d.pop("type", UNSET) + + _updated = d.pop("updated", UNSET) + updated: Union[Unset, datetime.datetime] + if isinstance(_updated, Unset): + updated = UNSET + else: + updated = isoparse(_updated) + + use_report_from_template = d.pop("useReportFromTemplate", UNSET) + + testruns_list_get_response_data_item_attributes_obj = cls( + created=created, + finished_on=finished_on, + group_id=group_id, + home_page_content=home_page_content, + id=id, + id_prefix=id_prefix, + is_template=is_template, + keep_in_history=keep_in_history, + query=query, + select_test_cases_by=select_test_cases_by, + status=status, + title=title, + type=type, + updated=updated, + use_report_from_template=use_report_from_template, + ) + + testruns_list_get_response_data_item_attributes_obj.additional_properties = ( + d + ) + return testruns_list_get_response_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_attributes_home_page_content.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_attributes_home_page_content.py new file mode 100644 index 00000000..ce9cfd09 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_attributes_home_page_content.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_list_get_response_data_item_attributes_home_page_content_type import ( + TestrunsListGetResponseDataItemAttributesHomePageContentType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsListGetResponseDataItemAttributesHomePageContent" +) + + +@_attrs_define +class TestrunsListGetResponseDataItemAttributesHomePageContent: + """ + Attributes: + type (Union[Unset, TestrunsListGetResponseDataItemAttributesHomePageContentType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TestrunsListGetResponseDataItemAttributesHomePageContentType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrunsListGetResponseDataItemAttributesHomePageContentType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + TestrunsListGetResponseDataItemAttributesHomePageContentType( + _type + ) + ) + + value = d.pop("value", UNSET) + + testruns_list_get_response_data_item_attributes_home_page_content_obj = cls( + type=type, + value=value, + ) + + testruns_list_get_response_data_item_attributes_home_page_content_obj.additional_properties = ( + d + ) + return testruns_list_get_response_data_item_attributes_home_page_content_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_attributes_home_page_content_type.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_attributes_home_page_content_type.py new file mode 100644 index 00000000..69bd2d11 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_attributes_home_page_content_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsListGetResponseDataItemAttributesHomePageContentType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_attributes_select_test_cases_by.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_attributes_select_test_cases_by.py new file mode 100644 index 00000000..7dbcea31 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_attributes_select_test_cases_by.py @@ -0,0 +1,16 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsListGetResponseDataItemAttributesSelectTestCasesBy(str, Enum): + AUTOMATEDPROCESS = "automatedProcess" + DYNAMICLIVEDOC = "dynamicLiveDoc" + DYNAMICQUERYRESULT = "dynamicQueryResult" + MANUALSELECTION = "manualSelection" + STATICLIVEDOC = "staticLiveDoc" + STATICQUERYRESULT = "staticQueryResult" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_links.py new file mode 100644 index 00000000..ce689b6c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_links.py @@ -0,0 +1,76 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunsListGetResponseDataItemLinks") + + +@_attrs_define +class TestrunsListGetResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId?revision=1234. + portal (Union[Unset, str]): Example: server-host-name/application- + path/polarion/redirect/project/MyProjectId/testrun?id=MyTestRunId&revision=1234. + """ + + self_: Union[Unset, str] = UNSET + portal: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + portal = self.portal + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if portal is not UNSET: + field_dict["portal"] = portal + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + portal = d.pop("portal", UNSET) + + testruns_list_get_response_data_item_links_obj = cls( + self_=self_, + portal=portal, + ) + + testruns_list_get_response_data_item_links_obj.additional_properties = ( + d + ) + return testruns_list_get_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_meta.py new file mode 100644 index 00000000..4863f041 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_meta.py @@ -0,0 +1,89 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_get_response_data_item_meta_errors_item import ( + TestrunsListGetResponseDataItemMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TestrunsListGetResponseDataItemMeta") + + +@_attrs_define +class TestrunsListGetResponseDataItemMeta: + """ + Attributes: + errors (Union[Unset, List['TestrunsListGetResponseDataItemMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["TestrunsListGetResponseDataItemMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_get_response_data_item_meta_errors_item import ( + TestrunsListGetResponseDataItemMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ( + TestrunsListGetResponseDataItemMetaErrorsItem.from_dict( + errors_item_data + ) + ) + + errors.append(errors_item) + + testruns_list_get_response_data_item_meta_obj = cls( + errors=errors, + ) + + testruns_list_get_response_data_item_meta_obj.additional_properties = d + return testruns_list_get_response_data_item_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_meta_errors_item.py new file mode 100644 index 00000000..bbb2d00d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_meta_errors_item.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_get_response_data_item_meta_errors_item_source import ( + TestrunsListGetResponseDataItemMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="TestrunsListGetResponseDataItemMetaErrorsItem") + + +@_attrs_define +class TestrunsListGetResponseDataItemMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TestrunsListGetResponseDataItemMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "TestrunsListGetResponseDataItemMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_get_response_data_item_meta_errors_item_source import ( + TestrunsListGetResponseDataItemMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, TestrunsListGetResponseDataItemMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = ( + TestrunsListGetResponseDataItemMetaErrorsItemSource.from_dict( + _source + ) + ) + + testruns_list_get_response_data_item_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + testruns_list_get_response_data_item_meta_errors_item_obj.additional_properties = ( + d + ) + return testruns_list_get_response_data_item_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_meta_errors_item_source.py new file mode 100644 index 00000000..46c9e32e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_meta_errors_item_source.py @@ -0,0 +1,107 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_get_response_data_item_meta_errors_item_source_resource import ( + TestrunsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + +T = TypeVar("T", bound="TestrunsListGetResponseDataItemMetaErrorsItemSource") + + +@_attrs_define +class TestrunsListGetResponseDataItemMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TestrunsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing the + error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "TestrunsListGetResponseDataItemMetaErrorsItemSourceResource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_get_response_data_item_meta_errors_item_source_resource import ( + TestrunsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, TestrunsListGetResponseDataItemMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TestrunsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + + testruns_list_get_response_data_item_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + testruns_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( + d + ) + return testruns_list_get_response_data_item_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..94472eb3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsListGetResponseDataItemMetaErrorsItemSourceResource" +) + + +@_attrs_define +class TestrunsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + testruns_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + testruns_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return testruns_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships.py new file mode 100644 index 00000000..1839ecc6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships.py @@ -0,0 +1,236 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_get_response_data_item_relationships_author import ( + TestrunsListGetResponseDataItemRelationshipsAuthor, + ) + from ..models.testruns_list_get_response_data_item_relationships_document import ( + TestrunsListGetResponseDataItemRelationshipsDocument, + ) + from ..models.testruns_list_get_response_data_item_relationships_project import ( + TestrunsListGetResponseDataItemRelationshipsProject, + ) + from ..models.testruns_list_get_response_data_item_relationships_project_span import ( + TestrunsListGetResponseDataItemRelationshipsProjectSpan, + ) + from ..models.testruns_list_get_response_data_item_relationships_summary_defect import ( + TestrunsListGetResponseDataItemRelationshipsSummaryDefect, + ) + from ..models.testruns_list_get_response_data_item_relationships_template import ( + TestrunsListGetResponseDataItemRelationshipsTemplate, + ) + + +T = TypeVar("T", bound="TestrunsListGetResponseDataItemRelationships") + + +@_attrs_define +class TestrunsListGetResponseDataItemRelationships: + """ + Attributes: + author (Union[Unset, TestrunsListGetResponseDataItemRelationshipsAuthor]): + document (Union[Unset, TestrunsListGetResponseDataItemRelationshipsDocument]): + project (Union[Unset, TestrunsListGetResponseDataItemRelationshipsProject]): + project_span (Union[Unset, TestrunsListGetResponseDataItemRelationshipsProjectSpan]): + summary_defect (Union[Unset, TestrunsListGetResponseDataItemRelationshipsSummaryDefect]): + template (Union[Unset, TestrunsListGetResponseDataItemRelationshipsTemplate]): + """ + + author: Union[ + Unset, "TestrunsListGetResponseDataItemRelationshipsAuthor" + ] = UNSET + document: Union[ + Unset, "TestrunsListGetResponseDataItemRelationshipsDocument" + ] = UNSET + project: Union[ + Unset, "TestrunsListGetResponseDataItemRelationshipsProject" + ] = UNSET + project_span: Union[ + Unset, "TestrunsListGetResponseDataItemRelationshipsProjectSpan" + ] = UNSET + summary_defect: Union[ + Unset, "TestrunsListGetResponseDataItemRelationshipsSummaryDefect" + ] = UNSET + template: Union[ + Unset, "TestrunsListGetResponseDataItemRelationshipsTemplate" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + author: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.author, Unset): + author = self.author.to_dict() + + document: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.document, Unset): + document = self.document.to_dict() + + project: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project, Unset): + project = self.project.to_dict() + + project_span: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project_span, Unset): + project_span = self.project_span.to_dict() + + summary_defect: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.summary_defect, Unset): + summary_defect = self.summary_defect.to_dict() + + template: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.template, Unset): + template = self.template.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if author is not UNSET: + field_dict["author"] = author + if document is not UNSET: + field_dict["document"] = document + if project is not UNSET: + field_dict["project"] = project + if project_span is not UNSET: + field_dict["projectSpan"] = project_span + if summary_defect is not UNSET: + field_dict["summaryDefect"] = summary_defect + if template is not UNSET: + field_dict["template"] = template + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_get_response_data_item_relationships_author import ( + TestrunsListGetResponseDataItemRelationshipsAuthor, + ) + from ..models.testruns_list_get_response_data_item_relationships_document import ( + TestrunsListGetResponseDataItemRelationshipsDocument, + ) + from ..models.testruns_list_get_response_data_item_relationships_project import ( + TestrunsListGetResponseDataItemRelationshipsProject, + ) + from ..models.testruns_list_get_response_data_item_relationships_project_span import ( + TestrunsListGetResponseDataItemRelationshipsProjectSpan, + ) + from ..models.testruns_list_get_response_data_item_relationships_summary_defect import ( + TestrunsListGetResponseDataItemRelationshipsSummaryDefect, + ) + from ..models.testruns_list_get_response_data_item_relationships_template import ( + TestrunsListGetResponseDataItemRelationshipsTemplate, + ) + + d = src_dict.copy() + _author = d.pop("author", UNSET) + author: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsAuthor + ] + if isinstance(_author, Unset): + author = UNSET + else: + author = ( + TestrunsListGetResponseDataItemRelationshipsAuthor.from_dict( + _author + ) + ) + + _document = d.pop("document", UNSET) + document: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsDocument + ] + if isinstance(_document, Unset): + document = UNSET + else: + document = ( + TestrunsListGetResponseDataItemRelationshipsDocument.from_dict( + _document + ) + ) + + _project = d.pop("project", UNSET) + project: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsProject + ] + if isinstance(_project, Unset): + project = UNSET + else: + project = ( + TestrunsListGetResponseDataItemRelationshipsProject.from_dict( + _project + ) + ) + + _project_span = d.pop("projectSpan", UNSET) + project_span: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsProjectSpan + ] + if isinstance(_project_span, Unset): + project_span = UNSET + else: + project_span = TestrunsListGetResponseDataItemRelationshipsProjectSpan.from_dict( + _project_span + ) + + _summary_defect = d.pop("summaryDefect", UNSET) + summary_defect: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsSummaryDefect + ] + if isinstance(_summary_defect, Unset): + summary_defect = UNSET + else: + summary_defect = TestrunsListGetResponseDataItemRelationshipsSummaryDefect.from_dict( + _summary_defect + ) + + _template = d.pop("template", UNSET) + template: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsTemplate + ] + if isinstance(_template, Unset): + template = UNSET + else: + template = ( + TestrunsListGetResponseDataItemRelationshipsTemplate.from_dict( + _template + ) + ) + + testruns_list_get_response_data_item_relationships_obj = cls( + author=author, + document=document, + project=project, + project_span=project_span, + summary_defect=summary_defect, + template=template, + ) + + testruns_list_get_response_data_item_relationships_obj.additional_properties = ( + d + ) + return testruns_list_get_response_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_author.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_author.py new file mode 100644 index 00000000..643806ba --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_author.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_get_response_data_item_relationships_author_data import ( + TestrunsListGetResponseDataItemRelationshipsAuthorData, + ) + + +T = TypeVar("T", bound="TestrunsListGetResponseDataItemRelationshipsAuthor") + + +@_attrs_define +class TestrunsListGetResponseDataItemRelationshipsAuthor: + """ + Attributes: + data (Union[Unset, TestrunsListGetResponseDataItemRelationshipsAuthorData]): + """ + + data: Union[ + Unset, "TestrunsListGetResponseDataItemRelationshipsAuthorData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_get_response_data_item_relationships_author_data import ( + TestrunsListGetResponseDataItemRelationshipsAuthorData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsAuthorData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunsListGetResponseDataItemRelationshipsAuthorData.from_dict( + _data + ) + + testruns_list_get_response_data_item_relationships_author_obj = cls( + data=data, + ) + + testruns_list_get_response_data_item_relationships_author_obj.additional_properties = ( + d + ) + return testruns_list_get_response_data_item_relationships_author_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_author_data.py new file mode 100644 index 00000000..3d759071 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_author_data.py @@ -0,0 +1,105 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_list_get_response_data_item_relationships_author_data_type import ( + TestrunsListGetResponseDataItemRelationshipsAuthorDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsListGetResponseDataItemRelationshipsAuthorData" +) + + +@_attrs_define +class TestrunsListGetResponseDataItemRelationshipsAuthorData: + """ + Attributes: + type (Union[Unset, TestrunsListGetResponseDataItemRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsAuthorDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsAuthorDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsListGetResponseDataItemRelationshipsAuthorDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testruns_list_get_response_data_item_relationships_author_data_obj = ( + cls( + type=type, + id=id, + revision=revision, + ) + ) + + testruns_list_get_response_data_item_relationships_author_data_obj.additional_properties = ( + d + ) + return ( + testruns_list_get_response_data_item_relationships_author_data_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_author_data_type.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_author_data_type.py new file mode 100644 index 00000000..d8046c7a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_author_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsListGetResponseDataItemRelationshipsAuthorDataType(str, Enum): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_document.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_document.py new file mode 100644 index 00000000..896b3426 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_document.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_get_response_data_item_relationships_document_data import ( + TestrunsListGetResponseDataItemRelationshipsDocumentData, + ) + + +T = TypeVar("T", bound="TestrunsListGetResponseDataItemRelationshipsDocument") + + +@_attrs_define +class TestrunsListGetResponseDataItemRelationshipsDocument: + """ + Attributes: + data (Union[Unset, TestrunsListGetResponseDataItemRelationshipsDocumentData]): + """ + + data: Union[ + Unset, "TestrunsListGetResponseDataItemRelationshipsDocumentData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_get_response_data_item_relationships_document_data import ( + TestrunsListGetResponseDataItemRelationshipsDocumentData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsDocumentData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunsListGetResponseDataItemRelationshipsDocumentData.from_dict( + _data + ) + + testruns_list_get_response_data_item_relationships_document_obj = cls( + data=data, + ) + + testruns_list_get_response_data_item_relationships_document_obj.additional_properties = ( + d + ) + return testruns_list_get_response_data_item_relationships_document_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_document_data.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_document_data.py new file mode 100644 index 00000000..cefc9576 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_document_data.py @@ -0,0 +1,103 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_list_get_response_data_item_relationships_document_data_type import ( + TestrunsListGetResponseDataItemRelationshipsDocumentDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsListGetResponseDataItemRelationshipsDocumentData" +) + + +@_attrs_define +class TestrunsListGetResponseDataItemRelationshipsDocumentData: + """ + Attributes: + type (Union[Unset, TestrunsListGetResponseDataItemRelationshipsDocumentDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsDocumentDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsDocumentDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + TestrunsListGetResponseDataItemRelationshipsDocumentDataType( + _type + ) + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testruns_list_get_response_data_item_relationships_document_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testruns_list_get_response_data_item_relationships_document_data_obj.additional_properties = ( + d + ) + return testruns_list_get_response_data_item_relationships_document_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_document_data_type.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_document_data_type.py new file mode 100644 index 00000000..b2473e59 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_document_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsListGetResponseDataItemRelationshipsDocumentDataType(str, Enum): + DOCUMENTS = "documents" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project.py new file mode 100644 index 00000000..0ee42903 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_get_response_data_item_relationships_project_data import ( + TestrunsListGetResponseDataItemRelationshipsProjectData, + ) + + +T = TypeVar("T", bound="TestrunsListGetResponseDataItemRelationshipsProject") + + +@_attrs_define +class TestrunsListGetResponseDataItemRelationshipsProject: + """ + Attributes: + data (Union[Unset, TestrunsListGetResponseDataItemRelationshipsProjectData]): + """ + + data: Union[ + Unset, "TestrunsListGetResponseDataItemRelationshipsProjectData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_get_response_data_item_relationships_project_data import ( + TestrunsListGetResponseDataItemRelationshipsProjectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsProjectData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunsListGetResponseDataItemRelationshipsProjectData.from_dict( + _data + ) + + testruns_list_get_response_data_item_relationships_project_obj = cls( + data=data, + ) + + testruns_list_get_response_data_item_relationships_project_obj.additional_properties = ( + d + ) + return testruns_list_get_response_data_item_relationships_project_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_data.py new file mode 100644 index 00000000..ce1a1b30 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_data.py @@ -0,0 +1,105 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_list_get_response_data_item_relationships_project_data_type import ( + TestrunsListGetResponseDataItemRelationshipsProjectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsListGetResponseDataItemRelationshipsProjectData" +) + + +@_attrs_define +class TestrunsListGetResponseDataItemRelationshipsProjectData: + """ + Attributes: + type (Union[Unset, TestrunsListGetResponseDataItemRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsProjectDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsProjectDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsListGetResponseDataItemRelationshipsProjectDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testruns_list_get_response_data_item_relationships_project_data_obj = ( + cls( + type=type, + id=id, + revision=revision, + ) + ) + + testruns_list_get_response_data_item_relationships_project_data_obj.additional_properties = ( + d + ) + return ( + testruns_list_get_response_data_item_relationships_project_data_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_data_type.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_data_type.py new file mode 100644 index 00000000..b10ff344 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsListGetResponseDataItemRelationshipsProjectDataType(str, Enum): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_span.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_span.py new file mode 100644 index 00000000..071eeb49 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_span.py @@ -0,0 +1,126 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_get_response_data_item_relationships_project_span_data_item import ( + TestrunsListGetResponseDataItemRelationshipsProjectSpanDataItem, + ) + from ..models.testruns_list_get_response_data_item_relationships_project_span_meta import ( + TestrunsListGetResponseDataItemRelationshipsProjectSpanMeta, + ) + + +T = TypeVar( + "T", bound="TestrunsListGetResponseDataItemRelationshipsProjectSpan" +) + + +@_attrs_define +class TestrunsListGetResponseDataItemRelationshipsProjectSpan: + """ + Attributes: + data (Union[Unset, List['TestrunsListGetResponseDataItemRelationshipsProjectSpanDataItem']]): + meta (Union[Unset, TestrunsListGetResponseDataItemRelationshipsProjectSpanMeta]): + """ + + data: Union[ + Unset, + List[ + "TestrunsListGetResponseDataItemRelationshipsProjectSpanDataItem" + ], + ] = UNSET + meta: Union[ + Unset, "TestrunsListGetResponseDataItemRelationshipsProjectSpanMeta" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_get_response_data_item_relationships_project_span_data_item import ( + TestrunsListGetResponseDataItemRelationshipsProjectSpanDataItem, + ) + from ..models.testruns_list_get_response_data_item_relationships_project_span_meta import ( + TestrunsListGetResponseDataItemRelationshipsProjectSpanMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrunsListGetResponseDataItemRelationshipsProjectSpanDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsProjectSpanMeta + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrunsListGetResponseDataItemRelationshipsProjectSpanMeta.from_dict( + _meta + ) + + testruns_list_get_response_data_item_relationships_project_span_obj = ( + cls( + data=data, + meta=meta, + ) + ) + + testruns_list_get_response_data_item_relationships_project_span_obj.additional_properties = ( + d + ) + return ( + testruns_list_get_response_data_item_relationships_project_span_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_span_data_item.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_span_data_item.py new file mode 100644 index 00000000..e3976175 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_span_data_item.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_list_get_response_data_item_relationships_project_span_data_item_type import ( + TestrunsListGetResponseDataItemRelationshipsProjectSpanDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrunsListGetResponseDataItemRelationshipsProjectSpanDataItem", +) + + +@_attrs_define +class TestrunsListGetResponseDataItemRelationshipsProjectSpanDataItem: + """ + Attributes: + type (Union[Unset, TestrunsListGetResponseDataItemRelationshipsProjectSpanDataItemType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestrunsListGetResponseDataItemRelationshipsProjectSpanDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunsListGetResponseDataItemRelationshipsProjectSpanDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsListGetResponseDataItemRelationshipsProjectSpanDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testruns_list_get_response_data_item_relationships_project_span_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testruns_list_get_response_data_item_relationships_project_span_data_item_obj.additional_properties = ( + d + ) + return testruns_list_get_response_data_item_relationships_project_span_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_span_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_span_data_item_type.py new file mode 100644 index 00000000..2500b0a4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_span_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsListGetResponseDataItemRelationshipsProjectSpanDataItemType( + str, Enum +): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_span_meta.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_span_meta.py new file mode 100644 index 00000000..203ad7f7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_project_span_meta.py @@ -0,0 +1,67 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsListGetResponseDataItemRelationshipsProjectSpanMeta" +) + + +@_attrs_define +class TestrunsListGetResponseDataItemRelationshipsProjectSpanMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + testruns_list_get_response_data_item_relationships_project_span_meta_obj = cls( + total_count=total_count, + ) + + testruns_list_get_response_data_item_relationships_project_span_meta_obj.additional_properties = ( + d + ) + return testruns_list_get_response_data_item_relationships_project_span_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_summary_defect.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_summary_defect.py new file mode 100644 index 00000000..b6baa557 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_summary_defect.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_get_response_data_item_relationships_summary_defect_data import ( + TestrunsListGetResponseDataItemRelationshipsSummaryDefectData, + ) + + +T = TypeVar( + "T", bound="TestrunsListGetResponseDataItemRelationshipsSummaryDefect" +) + + +@_attrs_define +class TestrunsListGetResponseDataItemRelationshipsSummaryDefect: + """ + Attributes: + data (Union[Unset, TestrunsListGetResponseDataItemRelationshipsSummaryDefectData]): + """ + + data: Union[ + Unset, "TestrunsListGetResponseDataItemRelationshipsSummaryDefectData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_get_response_data_item_relationships_summary_defect_data import ( + TestrunsListGetResponseDataItemRelationshipsSummaryDefectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestrunsListGetResponseDataItemRelationshipsSummaryDefectData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunsListGetResponseDataItemRelationshipsSummaryDefectData.from_dict( + _data + ) + + testruns_list_get_response_data_item_relationships_summary_defect_obj = cls( + data=data, + ) + + testruns_list_get_response_data_item_relationships_summary_defect_obj.additional_properties = ( + d + ) + return testruns_list_get_response_data_item_relationships_summary_defect_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_summary_defect_data.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_summary_defect_data.py new file mode 100644 index 00000000..047279e5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_summary_defect_data.py @@ -0,0 +1,103 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_list_get_response_data_item_relationships_summary_defect_data_type import ( + TestrunsListGetResponseDataItemRelationshipsSummaryDefectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsListGetResponseDataItemRelationshipsSummaryDefectData" +) + + +@_attrs_define +class TestrunsListGetResponseDataItemRelationshipsSummaryDefectData: + """ + Attributes: + type (Union[Unset, TestrunsListGetResponseDataItemRelationshipsSummaryDefectDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestrunsListGetResponseDataItemRelationshipsSummaryDefectDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunsListGetResponseDataItemRelationshipsSummaryDefectDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsListGetResponseDataItemRelationshipsSummaryDefectDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testruns_list_get_response_data_item_relationships_summary_defect_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testruns_list_get_response_data_item_relationships_summary_defect_data_obj.additional_properties = ( + d + ) + return testruns_list_get_response_data_item_relationships_summary_defect_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_summary_defect_data_type.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_summary_defect_data_type.py new file mode 100644 index 00000000..42bac43b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_summary_defect_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsListGetResponseDataItemRelationshipsSummaryDefectDataType( + str, Enum +): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_template.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_template.py new file mode 100644 index 00000000..30fdb77e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_template.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_get_response_data_item_relationships_template_data import ( + TestrunsListGetResponseDataItemRelationshipsTemplateData, + ) + + +T = TypeVar("T", bound="TestrunsListGetResponseDataItemRelationshipsTemplate") + + +@_attrs_define +class TestrunsListGetResponseDataItemRelationshipsTemplate: + """ + Attributes: + data (Union[Unset, TestrunsListGetResponseDataItemRelationshipsTemplateData]): + """ + + data: Union[ + Unset, "TestrunsListGetResponseDataItemRelationshipsTemplateData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_get_response_data_item_relationships_template_data import ( + TestrunsListGetResponseDataItemRelationshipsTemplateData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsTemplateData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunsListGetResponseDataItemRelationshipsTemplateData.from_dict( + _data + ) + + testruns_list_get_response_data_item_relationships_template_obj = cls( + data=data, + ) + + testruns_list_get_response_data_item_relationships_template_obj.additional_properties = ( + d + ) + return testruns_list_get_response_data_item_relationships_template_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_template_data.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_template_data.py new file mode 100644 index 00000000..7cc062f4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_template_data.py @@ -0,0 +1,103 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_list_get_response_data_item_relationships_template_data_type import ( + TestrunsListGetResponseDataItemRelationshipsTemplateDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsListGetResponseDataItemRelationshipsTemplateData" +) + + +@_attrs_define +class TestrunsListGetResponseDataItemRelationshipsTemplateData: + """ + Attributes: + type (Union[Unset, TestrunsListGetResponseDataItemRelationshipsTemplateDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsTemplateDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrunsListGetResponseDataItemRelationshipsTemplateDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + TestrunsListGetResponseDataItemRelationshipsTemplateDataType( + _type + ) + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testruns_list_get_response_data_item_relationships_template_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testruns_list_get_response_data_item_relationships_template_data_obj.additional_properties = ( + d + ) + return testruns_list_get_response_data_item_relationships_template_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_template_data_type.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_template_data_type.py new file mode 100644 index 00000000..5deea4c6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_relationships_template_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsListGetResponseDataItemRelationshipsTemplateDataType(str, Enum): + TESTRUNS = "testruns" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_type.py new file mode 100644 index 00000000..64a2140d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsListGetResponseDataItemType(str, Enum): + TESTRUNS = "testruns" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_included_item.py new file mode 100644 index 00000000..f23219c9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_included_item.py @@ -0,0 +1,49 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestrunsListGetResponseIncludedItem") + + +@_attrs_define +class TestrunsListGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + testruns_list_get_response_included_item_obj = cls() + + testruns_list_get_response_included_item_obj.additional_properties = d + return testruns_list_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_links.py new file mode 100644 index 00000000..9b0d23a4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_links.py @@ -0,0 +1,114 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunsListGetResponseLinks") + + +@_attrs_define +class TestrunsListGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns?page%5Bsize%5D=10&page%5Bnumber%5D=9. + portal (Union[Unset, str]): Example: server-host-name/application- + path/polarion/redirect/project/MyProjectId/testruns. + """ + + self_: Union[Unset, str] = UNSET + first: Union[Unset, str] = UNSET + prev: Union[Unset, str] = UNSET + next_: Union[Unset, str] = UNSET + last: Union[Unset, str] = UNSET + portal: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + first = self.first + + prev = self.prev + + next_ = self.next_ + + last = self.last + + portal = self.portal + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if first is not UNSET: + field_dict["first"] = first + if prev is not UNSET: + field_dict["prev"] = prev + if next_ is not UNSET: + field_dict["next"] = next_ + if last is not UNSET: + field_dict["last"] = last + if portal is not UNSET: + field_dict["portal"] = portal + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + first = d.pop("first", UNSET) + + prev = d.pop("prev", UNSET) + + next_ = d.pop("next", UNSET) + + last = d.pop("last", UNSET) + + portal = d.pop("portal", UNSET) + + testruns_list_get_response_links_obj = cls( + self_=self_, + first=first, + prev=prev, + next_=next_, + last=last, + portal=portal, + ) + + testruns_list_get_response_links_obj.additional_properties = d + return testruns_list_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_meta.py new file mode 100644 index 00000000..a2b56f91 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_get_response_meta.py @@ -0,0 +1,63 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunsListGetResponseMeta") + + +@_attrs_define +class TestrunsListGetResponseMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + testruns_list_get_response_meta_obj = cls( + total_count=total_count, + ) + + testruns_list_get_response_meta_obj.additional_properties = d + return testruns_list_get_response_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_post_request.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request.py new file mode 100644 index 00000000..d275e28f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_post_request_data_item import ( + TestrunsListPostRequestDataItem, + ) + + +T = TypeVar("T", bound="TestrunsListPostRequest") + + +@_attrs_define +class TestrunsListPostRequest: + """ + Attributes: + data (Union[Unset, List['TestrunsListPostRequestDataItem']]): + """ + + data: Union[Unset, List["TestrunsListPostRequestDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_post_request_data_item import ( + TestrunsListPostRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrunsListPostRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + testruns_list_post_request_obj = cls( + data=data, + ) + + testruns_list_post_request_obj.additional_properties = d + return testruns_list_post_request_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item.py new file mode 100644 index 00000000..afee8a86 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item.py @@ -0,0 +1,133 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_list_post_request_data_item_type import ( + TestrunsListPostRequestDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_post_request_data_item_attributes import ( + TestrunsListPostRequestDataItemAttributes, + ) + from ..models.testruns_list_post_request_data_item_relationships import ( + TestrunsListPostRequestDataItemRelationships, + ) + + +T = TypeVar("T", bound="TestrunsListPostRequestDataItem") + + +@_attrs_define +class TestrunsListPostRequestDataItem: + """ + Attributes: + type (Union[Unset, TestrunsListPostRequestDataItemType]): + attributes (Union[Unset, TestrunsListPostRequestDataItemAttributes]): + relationships (Union[Unset, TestrunsListPostRequestDataItemRelationships]): + """ + + type: Union[Unset, TestrunsListPostRequestDataItemType] = UNSET + attributes: Union[ + Unset, "TestrunsListPostRequestDataItemAttributes" + ] = UNSET + relationships: Union[ + Unset, "TestrunsListPostRequestDataItemRelationships" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_post_request_data_item_attributes import ( + TestrunsListPostRequestDataItemAttributes, + ) + from ..models.testruns_list_post_request_data_item_relationships import ( + TestrunsListPostRequestDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrunsListPostRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsListPostRequestDataItemType(_type) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, TestrunsListPostRequestDataItemAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TestrunsListPostRequestDataItemAttributes.from_dict( + _attributes + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TestrunsListPostRequestDataItemRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + TestrunsListPostRequestDataItemRelationships.from_dict( + _relationships + ) + ) + + testruns_list_post_request_data_item_obj = cls( + type=type, + attributes=attributes, + relationships=relationships, + ) + + testruns_list_post_request_data_item_obj.additional_properties = d + return testruns_list_post_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_attributes.py new file mode 100644 index 00000000..989cfc70 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_attributes.py @@ -0,0 +1,224 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.testruns_list_post_request_data_item_attributes_select_test_cases_by import ( + TestrunsListPostRequestDataItemAttributesSelectTestCasesBy, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_post_request_data_item_attributes_home_page_content import ( + TestrunsListPostRequestDataItemAttributesHomePageContent, + ) + + +T = TypeVar("T", bound="TestrunsListPostRequestDataItemAttributes") + + +@_attrs_define +class TestrunsListPostRequestDataItemAttributes: + """ + Attributes: + finished_on (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + group_id (Union[Unset, str]): Example: Group ID. + home_page_content (Union[Unset, TestrunsListPostRequestDataItemAttributesHomePageContent]): + id (Union[Unset, str]): Example: ID. + id_prefix (Union[Unset, str]): Example: ID Prefix. + is_template (Union[Unset, bool]): + keep_in_history (Union[Unset, bool]): + query (Union[Unset, str]): Example: Query. + select_test_cases_by (Union[Unset, TestrunsListPostRequestDataItemAttributesSelectTestCasesBy]): Example: + manualSelection. + status (Union[Unset, str]): Example: open. + title (Union[Unset, str]): Example: Title. + type (Union[Unset, str]): Example: manual. + use_report_from_template (Union[Unset, bool]): + """ + + finished_on: Union[Unset, datetime.datetime] = UNSET + group_id: Union[Unset, str] = UNSET + home_page_content: Union[ + Unset, "TestrunsListPostRequestDataItemAttributesHomePageContent" + ] = UNSET + id: Union[Unset, str] = UNSET + id_prefix: Union[Unset, str] = UNSET + is_template: Union[Unset, bool] = UNSET + keep_in_history: Union[Unset, bool] = UNSET + query: Union[Unset, str] = UNSET + select_test_cases_by: Union[ + Unset, TestrunsListPostRequestDataItemAttributesSelectTestCasesBy + ] = UNSET + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + use_report_from_template: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + finished_on: Union[Unset, str] = UNSET + if not isinstance(self.finished_on, Unset): + finished_on = self.finished_on.isoformat() + + group_id = self.group_id + + home_page_content: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.home_page_content, Unset): + home_page_content = self.home_page_content.to_dict() + + id = self.id + + id_prefix = self.id_prefix + + is_template = self.is_template + + keep_in_history = self.keep_in_history + + query = self.query + + select_test_cases_by: Union[Unset, str] = UNSET + if not isinstance(self.select_test_cases_by, Unset): + select_test_cases_by = self.select_test_cases_by.value + + status = self.status + + title = self.title + + type = self.type + + use_report_from_template = self.use_report_from_template + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if finished_on is not UNSET: + field_dict["finishedOn"] = finished_on + if group_id is not UNSET: + field_dict["groupId"] = group_id + if home_page_content is not UNSET: + field_dict["homePageContent"] = home_page_content + if id is not UNSET: + field_dict["id"] = id + if id_prefix is not UNSET: + field_dict["idPrefix"] = id_prefix + if is_template is not UNSET: + field_dict["isTemplate"] = is_template + if keep_in_history is not UNSET: + field_dict["keepInHistory"] = keep_in_history + if query is not UNSET: + field_dict["query"] = query + if select_test_cases_by is not UNSET: + field_dict["selectTestCasesBy"] = select_test_cases_by + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if type is not UNSET: + field_dict["type"] = type + if use_report_from_template is not UNSET: + field_dict["useReportFromTemplate"] = use_report_from_template + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_post_request_data_item_attributes_home_page_content import ( + TestrunsListPostRequestDataItemAttributesHomePageContent, + ) + + d = src_dict.copy() + _finished_on = d.pop("finishedOn", UNSET) + finished_on: Union[Unset, datetime.datetime] + if isinstance(_finished_on, Unset): + finished_on = UNSET + else: + finished_on = isoparse(_finished_on) + + group_id = d.pop("groupId", UNSET) + + _home_page_content = d.pop("homePageContent", UNSET) + home_page_content: Union[ + Unset, TestrunsListPostRequestDataItemAttributesHomePageContent + ] + if isinstance(_home_page_content, Unset): + home_page_content = UNSET + else: + home_page_content = TestrunsListPostRequestDataItemAttributesHomePageContent.from_dict( + _home_page_content + ) + + id = d.pop("id", UNSET) + + id_prefix = d.pop("idPrefix", UNSET) + + is_template = d.pop("isTemplate", UNSET) + + keep_in_history = d.pop("keepInHistory", UNSET) + + query = d.pop("query", UNSET) + + _select_test_cases_by = d.pop("selectTestCasesBy", UNSET) + select_test_cases_by: Union[ + Unset, TestrunsListPostRequestDataItemAttributesSelectTestCasesBy + ] + if isinstance(_select_test_cases_by, Unset): + select_test_cases_by = UNSET + else: + select_test_cases_by = ( + TestrunsListPostRequestDataItemAttributesSelectTestCasesBy( + _select_test_cases_by + ) + ) + + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + type = d.pop("type", UNSET) + + use_report_from_template = d.pop("useReportFromTemplate", UNSET) + + testruns_list_post_request_data_item_attributes_obj = cls( + finished_on=finished_on, + group_id=group_id, + home_page_content=home_page_content, + id=id, + id_prefix=id_prefix, + is_template=is_template, + keep_in_history=keep_in_history, + query=query, + select_test_cases_by=select_test_cases_by, + status=status, + title=title, + type=type, + use_report_from_template=use_report_from_template, + ) + + testruns_list_post_request_data_item_attributes_obj.additional_properties = ( + d + ) + return testruns_list_post_request_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_attributes_home_page_content.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_attributes_home_page_content.py new file mode 100644 index 00000000..d00de9ca --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_attributes_home_page_content.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_list_post_request_data_item_attributes_home_page_content_type import ( + TestrunsListPostRequestDataItemAttributesHomePageContentType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsListPostRequestDataItemAttributesHomePageContent" +) + + +@_attrs_define +class TestrunsListPostRequestDataItemAttributesHomePageContent: + """ + Attributes: + type (Union[Unset, TestrunsListPostRequestDataItemAttributesHomePageContentType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TestrunsListPostRequestDataItemAttributesHomePageContentType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrunsListPostRequestDataItemAttributesHomePageContentType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + TestrunsListPostRequestDataItemAttributesHomePageContentType( + _type + ) + ) + + value = d.pop("value", UNSET) + + testruns_list_post_request_data_item_attributes_home_page_content_obj = cls( + type=type, + value=value, + ) + + testruns_list_post_request_data_item_attributes_home_page_content_obj.additional_properties = ( + d + ) + return testruns_list_post_request_data_item_attributes_home_page_content_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_attributes_home_page_content_type.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_attributes_home_page_content_type.py new file mode 100644 index 00000000..15961312 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_attributes_home_page_content_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsListPostRequestDataItemAttributesHomePageContentType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_attributes_select_test_cases_by.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_attributes_select_test_cases_by.py new file mode 100644 index 00000000..1304fe9e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_attributes_select_test_cases_by.py @@ -0,0 +1,16 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsListPostRequestDataItemAttributesSelectTestCasesBy(str, Enum): + AUTOMATEDPROCESS = "automatedProcess" + DYNAMICLIVEDOC = "dynamicLiveDoc" + DYNAMICQUERYRESULT = "dynamicQueryResult" + MANUALSELECTION = "manualSelection" + STATICLIVEDOC = "staticLiveDoc" + STATICQUERYRESULT = "staticQueryResult" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships.py new file mode 100644 index 00000000..35782aef --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships.py @@ -0,0 +1,176 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_post_request_data_item_relationships_document import ( + TestrunsListPostRequestDataItemRelationshipsDocument, + ) + from ..models.testruns_list_post_request_data_item_relationships_project_span import ( + TestrunsListPostRequestDataItemRelationshipsProjectSpan, + ) + from ..models.testruns_list_post_request_data_item_relationships_summary_defect import ( + TestrunsListPostRequestDataItemRelationshipsSummaryDefect, + ) + from ..models.testruns_list_post_request_data_item_relationships_template import ( + TestrunsListPostRequestDataItemRelationshipsTemplate, + ) + + +T = TypeVar("T", bound="TestrunsListPostRequestDataItemRelationships") + + +@_attrs_define +class TestrunsListPostRequestDataItemRelationships: + """ + Attributes: + document (Union[Unset, TestrunsListPostRequestDataItemRelationshipsDocument]): + project_span (Union[Unset, TestrunsListPostRequestDataItemRelationshipsProjectSpan]): + summary_defect (Union[Unset, TestrunsListPostRequestDataItemRelationshipsSummaryDefect]): + template (Union[Unset, TestrunsListPostRequestDataItemRelationshipsTemplate]): + """ + + document: Union[ + Unset, "TestrunsListPostRequestDataItemRelationshipsDocument" + ] = UNSET + project_span: Union[ + Unset, "TestrunsListPostRequestDataItemRelationshipsProjectSpan" + ] = UNSET + summary_defect: Union[ + Unset, "TestrunsListPostRequestDataItemRelationshipsSummaryDefect" + ] = UNSET + template: Union[ + Unset, "TestrunsListPostRequestDataItemRelationshipsTemplate" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + document: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.document, Unset): + document = self.document.to_dict() + + project_span: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project_span, Unset): + project_span = self.project_span.to_dict() + + summary_defect: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.summary_defect, Unset): + summary_defect = self.summary_defect.to_dict() + + template: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.template, Unset): + template = self.template.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if document is not UNSET: + field_dict["document"] = document + if project_span is not UNSET: + field_dict["projectSpan"] = project_span + if summary_defect is not UNSET: + field_dict["summaryDefect"] = summary_defect + if template is not UNSET: + field_dict["template"] = template + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_post_request_data_item_relationships_document import ( + TestrunsListPostRequestDataItemRelationshipsDocument, + ) + from ..models.testruns_list_post_request_data_item_relationships_project_span import ( + TestrunsListPostRequestDataItemRelationshipsProjectSpan, + ) + from ..models.testruns_list_post_request_data_item_relationships_summary_defect import ( + TestrunsListPostRequestDataItemRelationshipsSummaryDefect, + ) + from ..models.testruns_list_post_request_data_item_relationships_template import ( + TestrunsListPostRequestDataItemRelationshipsTemplate, + ) + + d = src_dict.copy() + _document = d.pop("document", UNSET) + document: Union[ + Unset, TestrunsListPostRequestDataItemRelationshipsDocument + ] + if isinstance(_document, Unset): + document = UNSET + else: + document = ( + TestrunsListPostRequestDataItemRelationshipsDocument.from_dict( + _document + ) + ) + + _project_span = d.pop("projectSpan", UNSET) + project_span: Union[ + Unset, TestrunsListPostRequestDataItemRelationshipsProjectSpan + ] + if isinstance(_project_span, Unset): + project_span = UNSET + else: + project_span = TestrunsListPostRequestDataItemRelationshipsProjectSpan.from_dict( + _project_span + ) + + _summary_defect = d.pop("summaryDefect", UNSET) + summary_defect: Union[ + Unset, TestrunsListPostRequestDataItemRelationshipsSummaryDefect + ] + if isinstance(_summary_defect, Unset): + summary_defect = UNSET + else: + summary_defect = TestrunsListPostRequestDataItemRelationshipsSummaryDefect.from_dict( + _summary_defect + ) + + _template = d.pop("template", UNSET) + template: Union[ + Unset, TestrunsListPostRequestDataItemRelationshipsTemplate + ] + if isinstance(_template, Unset): + template = UNSET + else: + template = ( + TestrunsListPostRequestDataItemRelationshipsTemplate.from_dict( + _template + ) + ) + + testruns_list_post_request_data_item_relationships_obj = cls( + document=document, + project_span=project_span, + summary_defect=summary_defect, + template=template, + ) + + testruns_list_post_request_data_item_relationships_obj.additional_properties = ( + d + ) + return testruns_list_post_request_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_document.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_document.py new file mode 100644 index 00000000..7194b74c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_document.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_post_request_data_item_relationships_document_data import ( + TestrunsListPostRequestDataItemRelationshipsDocumentData, + ) + + +T = TypeVar("T", bound="TestrunsListPostRequestDataItemRelationshipsDocument") + + +@_attrs_define +class TestrunsListPostRequestDataItemRelationshipsDocument: + """ + Attributes: + data (Union[Unset, TestrunsListPostRequestDataItemRelationshipsDocumentData]): + """ + + data: Union[ + Unset, "TestrunsListPostRequestDataItemRelationshipsDocumentData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_post_request_data_item_relationships_document_data import ( + TestrunsListPostRequestDataItemRelationshipsDocumentData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrunsListPostRequestDataItemRelationshipsDocumentData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunsListPostRequestDataItemRelationshipsDocumentData.from_dict( + _data + ) + + testruns_list_post_request_data_item_relationships_document_obj = cls( + data=data, + ) + + testruns_list_post_request_data_item_relationships_document_obj.additional_properties = ( + d + ) + return testruns_list_post_request_data_item_relationships_document_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_document_data.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_document_data.py new file mode 100644 index 00000000..ef22460e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_document_data.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_list_post_request_data_item_relationships_document_data_type import ( + TestrunsListPostRequestDataItemRelationshipsDocumentDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsListPostRequestDataItemRelationshipsDocumentData" +) + + +@_attrs_define +class TestrunsListPostRequestDataItemRelationshipsDocumentData: + """ + Attributes: + type (Union[Unset, TestrunsListPostRequestDataItemRelationshipsDocumentDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId. + """ + + type: Union[ + Unset, TestrunsListPostRequestDataItemRelationshipsDocumentDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrunsListPostRequestDataItemRelationshipsDocumentDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + TestrunsListPostRequestDataItemRelationshipsDocumentDataType( + _type + ) + ) + + id = d.pop("id", UNSET) + + testruns_list_post_request_data_item_relationships_document_data_obj = cls( + type=type, + id=id, + ) + + testruns_list_post_request_data_item_relationships_document_data_obj.additional_properties = ( + d + ) + return testruns_list_post_request_data_item_relationships_document_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_document_data_type.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_document_data_type.py new file mode 100644 index 00000000..7635d079 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_document_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsListPostRequestDataItemRelationshipsDocumentDataType(str, Enum): + DOCUMENTS = "documents" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_project_span.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_project_span.py new file mode 100644 index 00000000..72337a49 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_project_span.py @@ -0,0 +1,98 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_post_request_data_item_relationships_project_span_data_item import ( + TestrunsListPostRequestDataItemRelationshipsProjectSpanDataItem, + ) + + +T = TypeVar( + "T", bound="TestrunsListPostRequestDataItemRelationshipsProjectSpan" +) + + +@_attrs_define +class TestrunsListPostRequestDataItemRelationshipsProjectSpan: + """ + Attributes: + data (Union[Unset, List['TestrunsListPostRequestDataItemRelationshipsProjectSpanDataItem']]): + """ + + data: Union[ + Unset, + List[ + "TestrunsListPostRequestDataItemRelationshipsProjectSpanDataItem" + ], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_post_request_data_item_relationships_project_span_data_item import ( + TestrunsListPostRequestDataItemRelationshipsProjectSpanDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrunsListPostRequestDataItemRelationshipsProjectSpanDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + testruns_list_post_request_data_item_relationships_project_span_obj = ( + cls( + data=data, + ) + ) + + testruns_list_post_request_data_item_relationships_project_span_obj.additional_properties = ( + d + ) + return ( + testruns_list_post_request_data_item_relationships_project_span_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_project_span_data_item.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_project_span_data_item.py new file mode 100644 index 00000000..03fd3513 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_project_span_data_item.py @@ -0,0 +1,95 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_list_post_request_data_item_relationships_project_span_data_item_type import ( + TestrunsListPostRequestDataItemRelationshipsProjectSpanDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TestrunsListPostRequestDataItemRelationshipsProjectSpanDataItem", +) + + +@_attrs_define +class TestrunsListPostRequestDataItemRelationshipsProjectSpanDataItem: + """ + Attributes: + type (Union[Unset, TestrunsListPostRequestDataItemRelationshipsProjectSpanDataItemType]): + id (Union[Unset, str]): Example: MyProjectId. + """ + + type: Union[ + Unset, + TestrunsListPostRequestDataItemRelationshipsProjectSpanDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunsListPostRequestDataItemRelationshipsProjectSpanDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsListPostRequestDataItemRelationshipsProjectSpanDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + testruns_list_post_request_data_item_relationships_project_span_data_item_obj = cls( + type=type, + id=id, + ) + + testruns_list_post_request_data_item_relationships_project_span_data_item_obj.additional_properties = ( + d + ) + return testruns_list_post_request_data_item_relationships_project_span_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_project_span_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_project_span_data_item_type.py new file mode 100644 index 00000000..a977ed5d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_project_span_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsListPostRequestDataItemRelationshipsProjectSpanDataItemType( + str, Enum +): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_summary_defect.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_summary_defect.py new file mode 100644 index 00000000..0fefaa27 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_summary_defect.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_post_request_data_item_relationships_summary_defect_data import ( + TestrunsListPostRequestDataItemRelationshipsSummaryDefectData, + ) + + +T = TypeVar( + "T", bound="TestrunsListPostRequestDataItemRelationshipsSummaryDefect" +) + + +@_attrs_define +class TestrunsListPostRequestDataItemRelationshipsSummaryDefect: + """ + Attributes: + data (Union[Unset, TestrunsListPostRequestDataItemRelationshipsSummaryDefectData]): + """ + + data: Union[ + Unset, "TestrunsListPostRequestDataItemRelationshipsSummaryDefectData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_post_request_data_item_relationships_summary_defect_data import ( + TestrunsListPostRequestDataItemRelationshipsSummaryDefectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TestrunsListPostRequestDataItemRelationshipsSummaryDefectData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunsListPostRequestDataItemRelationshipsSummaryDefectData.from_dict( + _data + ) + + testruns_list_post_request_data_item_relationships_summary_defect_obj = cls( + data=data, + ) + + testruns_list_post_request_data_item_relationships_summary_defect_obj.additional_properties = ( + d + ) + return testruns_list_post_request_data_item_relationships_summary_defect_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_summary_defect_data.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_summary_defect_data.py new file mode 100644 index 00000000..badeb7f6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_summary_defect_data.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_list_post_request_data_item_relationships_summary_defect_data_type import ( + TestrunsListPostRequestDataItemRelationshipsSummaryDefectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsListPostRequestDataItemRelationshipsSummaryDefectData" +) + + +@_attrs_define +class TestrunsListPostRequestDataItemRelationshipsSummaryDefectData: + """ + Attributes: + type (Union[Unset, TestrunsListPostRequestDataItemRelationshipsSummaryDefectDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + """ + + type: Union[ + Unset, + TestrunsListPostRequestDataItemRelationshipsSummaryDefectDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunsListPostRequestDataItemRelationshipsSummaryDefectDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsListPostRequestDataItemRelationshipsSummaryDefectDataType( + _type + ) + + id = d.pop("id", UNSET) + + testruns_list_post_request_data_item_relationships_summary_defect_data_obj = cls( + type=type, + id=id, + ) + + testruns_list_post_request_data_item_relationships_summary_defect_data_obj.additional_properties = ( + d + ) + return testruns_list_post_request_data_item_relationships_summary_defect_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_summary_defect_data_type.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_summary_defect_data_type.py new file mode 100644 index 00000000..fc1d430a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_summary_defect_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsListPostRequestDataItemRelationshipsSummaryDefectDataType( + str, Enum +): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_template.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_template.py new file mode 100644 index 00000000..b6850306 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_template.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_post_request_data_item_relationships_template_data import ( + TestrunsListPostRequestDataItemRelationshipsTemplateData, + ) + + +T = TypeVar("T", bound="TestrunsListPostRequestDataItemRelationshipsTemplate") + + +@_attrs_define +class TestrunsListPostRequestDataItemRelationshipsTemplate: + """ + Attributes: + data (Union[Unset, TestrunsListPostRequestDataItemRelationshipsTemplateData]): + """ + + data: Union[ + Unset, "TestrunsListPostRequestDataItemRelationshipsTemplateData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_post_request_data_item_relationships_template_data import ( + TestrunsListPostRequestDataItemRelationshipsTemplateData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrunsListPostRequestDataItemRelationshipsTemplateData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunsListPostRequestDataItemRelationshipsTemplateData.from_dict( + _data + ) + + testruns_list_post_request_data_item_relationships_template_obj = cls( + data=data, + ) + + testruns_list_post_request_data_item_relationships_template_obj.additional_properties = ( + d + ) + return testruns_list_post_request_data_item_relationships_template_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_template_data.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_template_data.py new file mode 100644 index 00000000..6fe15cc4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_template_data.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_list_post_request_data_item_relationships_template_data_type import ( + TestrunsListPostRequestDataItemRelationshipsTemplateDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsListPostRequestDataItemRelationshipsTemplateData" +) + + +@_attrs_define +class TestrunsListPostRequestDataItemRelationshipsTemplateData: + """ + Attributes: + type (Union[Unset, TestrunsListPostRequestDataItemRelationshipsTemplateDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId. + """ + + type: Union[ + Unset, TestrunsListPostRequestDataItemRelationshipsTemplateDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrunsListPostRequestDataItemRelationshipsTemplateDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + TestrunsListPostRequestDataItemRelationshipsTemplateDataType( + _type + ) + ) + + id = d.pop("id", UNSET) + + testruns_list_post_request_data_item_relationships_template_data_obj = cls( + type=type, + id=id, + ) + + testruns_list_post_request_data_item_relationships_template_data_obj.additional_properties = ( + d + ) + return testruns_list_post_request_data_item_relationships_template_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_template_data_type.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_template_data_type.py new file mode 100644 index 00000000..31cf3f4f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_relationships_template_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsListPostRequestDataItemRelationshipsTemplateDataType(str, Enum): + TESTRUNS = "testruns" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_type.py new file mode 100644 index 00000000..a152a71f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsListPostRequestDataItemType(str, Enum): + TESTRUNS = "testruns" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_list_post_response.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_response.py new file mode 100644 index 00000000..6665a5cd --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_response.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_post_response_data_item import ( + TestrunsListPostResponseDataItem, + ) + + +T = TypeVar("T", bound="TestrunsListPostResponse") + + +@_attrs_define +class TestrunsListPostResponse: + """ + Attributes: + data (Union[Unset, List['TestrunsListPostResponseDataItem']]): + """ + + data: Union[Unset, List["TestrunsListPostResponseDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_post_response_data_item import ( + TestrunsListPostResponseDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrunsListPostResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + testruns_list_post_response_obj = cls( + data=data, + ) + + testruns_list_post_response_obj.additional_properties = d + return testruns_list_post_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_response_data_item.py new file mode 100644 index 00000000..49c3d7c0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_response_data_item.py @@ -0,0 +1,108 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_list_post_response_data_item_type import ( + TestrunsListPostResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_list_post_response_data_item_links import ( + TestrunsListPostResponseDataItemLinks, + ) + + +T = TypeVar("T", bound="TestrunsListPostResponseDataItem") + + +@_attrs_define +class TestrunsListPostResponseDataItem: + """ + Attributes: + type (Union[Unset, TestrunsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId. + links (Union[Unset, TestrunsListPostResponseDataItemLinks]): + """ + + type: Union[Unset, TestrunsListPostResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + links: Union[Unset, "TestrunsListPostResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_list_post_response_data_item_links import ( + TestrunsListPostResponseDataItemLinks, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrunsListPostResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsListPostResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrunsListPostResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrunsListPostResponseDataItemLinks.from_dict(_links) + + testruns_list_post_response_data_item_obj = cls( + type=type, + id=id, + links=links, + ) + + testruns_list_post_response_data_item_obj.additional_properties = d + return testruns_list_post_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_response_data_item_links.py new file mode 100644 index 00000000..373d1a90 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_response_data_item_links.py @@ -0,0 +1,76 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunsListPostResponseDataItemLinks") + + +@_attrs_define +class TestrunsListPostResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId?revision=1234. + portal (Union[Unset, str]): Example: server-host-name/application- + path/polarion/redirect/project/MyProjectId/testrun?id=MyTestRunId&revision=1234. + """ + + self_: Union[Unset, str] = UNSET + portal: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + portal = self.portal + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if portal is not UNSET: + field_dict["portal"] = portal + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + portal = d.pop("portal", UNSET) + + testruns_list_post_response_data_item_links_obj = cls( + self_=self_, + portal=portal, + ) + + testruns_list_post_response_data_item_links_obj.additional_properties = ( + d + ) + return testruns_list_post_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_list_post_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testruns_list_post_response_data_item_type.py new file mode 100644 index 00000000..39eaaeda --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_list_post_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsListPostResponseDataItemType(str, Enum): + TESTRUNS = "testruns" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_single_get_response.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response.py new file mode 100644 index 00000000..2280818b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response.py @@ -0,0 +1,133 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_get_response_data import ( + TestrunsSingleGetResponseData, + ) + from ..models.testruns_single_get_response_included_item import ( + TestrunsSingleGetResponseIncludedItem, + ) + from ..models.testruns_single_get_response_links import ( + TestrunsSingleGetResponseLinks, + ) + + +T = TypeVar("T", bound="TestrunsSingleGetResponse") + + +@_attrs_define +class TestrunsSingleGetResponse: + """ + Attributes: + data (Union[Unset, TestrunsSingleGetResponseData]): + included (Union[Unset, List['TestrunsSingleGetResponseIncludedItem']]): Related entities might be returned, see + Rest API + User Guide. + links (Union[Unset, TestrunsSingleGetResponseLinks]): + """ + + data: Union[Unset, "TestrunsSingleGetResponseData"] = UNSET + included: Union[ + Unset, List["TestrunsSingleGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "TestrunsSingleGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_get_response_data import ( + TestrunsSingleGetResponseData, + ) + from ..models.testruns_single_get_response_included_item import ( + TestrunsSingleGetResponseIncludedItem, + ) + from ..models.testruns_single_get_response_links import ( + TestrunsSingleGetResponseLinks, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, TestrunsSingleGetResponseData] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunsSingleGetResponseData.from_dict(_data) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = TestrunsSingleGetResponseIncludedItem.from_dict( + included_item_data + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrunsSingleGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrunsSingleGetResponseLinks.from_dict(_links) + + testruns_single_get_response_obj = cls( + data=data, + included=included, + links=links, + ) + + testruns_single_get_response_obj.additional_properties = d + return testruns_single_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data.py new file mode 100644 index 00000000..ac1923be --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data.py @@ -0,0 +1,191 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_single_get_response_data_type import ( + TestrunsSingleGetResponseDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_get_response_data_attributes import ( + TestrunsSingleGetResponseDataAttributes, + ) + from ..models.testruns_single_get_response_data_links import ( + TestrunsSingleGetResponseDataLinks, + ) + from ..models.testruns_single_get_response_data_meta import ( + TestrunsSingleGetResponseDataMeta, + ) + from ..models.testruns_single_get_response_data_relationships import ( + TestrunsSingleGetResponseDataRelationships, + ) + + +T = TypeVar("T", bound="TestrunsSingleGetResponseData") + + +@_attrs_define +class TestrunsSingleGetResponseData: + """ + Attributes: + type (Union[Unset, TestrunsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TestrunsSingleGetResponseDataAttributes]): + relationships (Union[Unset, TestrunsSingleGetResponseDataRelationships]): + meta (Union[Unset, TestrunsSingleGetResponseDataMeta]): + links (Union[Unset, TestrunsSingleGetResponseDataLinks]): + """ + + type: Union[Unset, TestrunsSingleGetResponseDataType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[Unset, "TestrunsSingleGetResponseDataAttributes"] = UNSET + relationships: Union[ + Unset, "TestrunsSingleGetResponseDataRelationships" + ] = UNSET + meta: Union[Unset, "TestrunsSingleGetResponseDataMeta"] = UNSET + links: Union[Unset, "TestrunsSingleGetResponseDataLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_get_response_data_attributes import ( + TestrunsSingleGetResponseDataAttributes, + ) + from ..models.testruns_single_get_response_data_links import ( + TestrunsSingleGetResponseDataLinks, + ) + from ..models.testruns_single_get_response_data_meta import ( + TestrunsSingleGetResponseDataMeta, + ) + from ..models.testruns_single_get_response_data_relationships import ( + TestrunsSingleGetResponseDataRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrunsSingleGetResponseDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsSingleGetResponseDataType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, TestrunsSingleGetResponseDataAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TestrunsSingleGetResponseDataAttributes.from_dict( + _attributes + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[Unset, TestrunsSingleGetResponseDataRelationships] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + TestrunsSingleGetResponseDataRelationships.from_dict( + _relationships + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TestrunsSingleGetResponseDataMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrunsSingleGetResponseDataMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, TestrunsSingleGetResponseDataLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TestrunsSingleGetResponseDataLinks.from_dict(_links) + + testruns_single_get_response_data_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + testruns_single_get_response_data_obj.additional_properties = d + return testruns_single_get_response_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_attributes.py new file mode 100644 index 00000000..5cc6098b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_attributes.py @@ -0,0 +1,256 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.testruns_single_get_response_data_attributes_select_test_cases_by import ( + TestrunsSingleGetResponseDataAttributesSelectTestCasesBy, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_get_response_data_attributes_home_page_content import ( + TestrunsSingleGetResponseDataAttributesHomePageContent, + ) + + +T = TypeVar("T", bound="TestrunsSingleGetResponseDataAttributes") + + +@_attrs_define +class TestrunsSingleGetResponseDataAttributes: + """ + Attributes: + created (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + finished_on (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + group_id (Union[Unset, str]): Example: Group ID. + home_page_content (Union[Unset, TestrunsSingleGetResponseDataAttributesHomePageContent]): + id (Union[Unset, str]): Example: ID. + id_prefix (Union[Unset, str]): Example: ID Prefix. + is_template (Union[Unset, bool]): + keep_in_history (Union[Unset, bool]): + query (Union[Unset, str]): Example: Query. + select_test_cases_by (Union[Unset, TestrunsSingleGetResponseDataAttributesSelectTestCasesBy]): Example: + manualSelection. + status (Union[Unset, str]): Example: open. + title (Union[Unset, str]): Example: Title. + type (Union[Unset, str]): Example: manual. + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + use_report_from_template (Union[Unset, bool]): + """ + + created: Union[Unset, datetime.datetime] = UNSET + finished_on: Union[Unset, datetime.datetime] = UNSET + group_id: Union[Unset, str] = UNSET + home_page_content: Union[ + Unset, "TestrunsSingleGetResponseDataAttributesHomePageContent" + ] = UNSET + id: Union[Unset, str] = UNSET + id_prefix: Union[Unset, str] = UNSET + is_template: Union[Unset, bool] = UNSET + keep_in_history: Union[Unset, bool] = UNSET + query: Union[Unset, str] = UNSET + select_test_cases_by: Union[ + Unset, TestrunsSingleGetResponseDataAttributesSelectTestCasesBy + ] = UNSET + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + updated: Union[Unset, datetime.datetime] = UNSET + use_report_from_template: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + created: Union[Unset, str] = UNSET + if not isinstance(self.created, Unset): + created = self.created.isoformat() + + finished_on: Union[Unset, str] = UNSET + if not isinstance(self.finished_on, Unset): + finished_on = self.finished_on.isoformat() + + group_id = self.group_id + + home_page_content: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.home_page_content, Unset): + home_page_content = self.home_page_content.to_dict() + + id = self.id + + id_prefix = self.id_prefix + + is_template = self.is_template + + keep_in_history = self.keep_in_history + + query = self.query + + select_test_cases_by: Union[Unset, str] = UNSET + if not isinstance(self.select_test_cases_by, Unset): + select_test_cases_by = self.select_test_cases_by.value + + status = self.status + + title = self.title + + type = self.type + + updated: Union[Unset, str] = UNSET + if not isinstance(self.updated, Unset): + updated = self.updated.isoformat() + + use_report_from_template = self.use_report_from_template + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created is not UNSET: + field_dict["created"] = created + if finished_on is not UNSET: + field_dict["finishedOn"] = finished_on + if group_id is not UNSET: + field_dict["groupId"] = group_id + if home_page_content is not UNSET: + field_dict["homePageContent"] = home_page_content + if id is not UNSET: + field_dict["id"] = id + if id_prefix is not UNSET: + field_dict["idPrefix"] = id_prefix + if is_template is not UNSET: + field_dict["isTemplate"] = is_template + if keep_in_history is not UNSET: + field_dict["keepInHistory"] = keep_in_history + if query is not UNSET: + field_dict["query"] = query + if select_test_cases_by is not UNSET: + field_dict["selectTestCasesBy"] = select_test_cases_by + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if type is not UNSET: + field_dict["type"] = type + if updated is not UNSET: + field_dict["updated"] = updated + if use_report_from_template is not UNSET: + field_dict["useReportFromTemplate"] = use_report_from_template + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_get_response_data_attributes_home_page_content import ( + TestrunsSingleGetResponseDataAttributesHomePageContent, + ) + + d = src_dict.copy() + _created = d.pop("created", UNSET) + created: Union[Unset, datetime.datetime] + if isinstance(_created, Unset): + created = UNSET + else: + created = isoparse(_created) + + _finished_on = d.pop("finishedOn", UNSET) + finished_on: Union[Unset, datetime.datetime] + if isinstance(_finished_on, Unset): + finished_on = UNSET + else: + finished_on = isoparse(_finished_on) + + group_id = d.pop("groupId", UNSET) + + _home_page_content = d.pop("homePageContent", UNSET) + home_page_content: Union[ + Unset, TestrunsSingleGetResponseDataAttributesHomePageContent + ] + if isinstance(_home_page_content, Unset): + home_page_content = UNSET + else: + home_page_content = TestrunsSingleGetResponseDataAttributesHomePageContent.from_dict( + _home_page_content + ) + + id = d.pop("id", UNSET) + + id_prefix = d.pop("idPrefix", UNSET) + + is_template = d.pop("isTemplate", UNSET) + + keep_in_history = d.pop("keepInHistory", UNSET) + + query = d.pop("query", UNSET) + + _select_test_cases_by = d.pop("selectTestCasesBy", UNSET) + select_test_cases_by: Union[ + Unset, TestrunsSingleGetResponseDataAttributesSelectTestCasesBy + ] + if isinstance(_select_test_cases_by, Unset): + select_test_cases_by = UNSET + else: + select_test_cases_by = ( + TestrunsSingleGetResponseDataAttributesSelectTestCasesBy( + _select_test_cases_by + ) + ) + + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + type = d.pop("type", UNSET) + + _updated = d.pop("updated", UNSET) + updated: Union[Unset, datetime.datetime] + if isinstance(_updated, Unset): + updated = UNSET + else: + updated = isoparse(_updated) + + use_report_from_template = d.pop("useReportFromTemplate", UNSET) + + testruns_single_get_response_data_attributes_obj = cls( + created=created, + finished_on=finished_on, + group_id=group_id, + home_page_content=home_page_content, + id=id, + id_prefix=id_prefix, + is_template=is_template, + keep_in_history=keep_in_history, + query=query, + select_test_cases_by=select_test_cases_by, + status=status, + title=title, + type=type, + updated=updated, + use_report_from_template=use_report_from_template, + ) + + testruns_single_get_response_data_attributes_obj.additional_properties = ( + d + ) + return testruns_single_get_response_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_attributes_home_page_content.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_attributes_home_page_content.py new file mode 100644 index 00000000..35f66549 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_attributes_home_page_content.py @@ -0,0 +1,96 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_single_get_response_data_attributes_home_page_content_type import ( + TestrunsSingleGetResponseDataAttributesHomePageContentType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsSingleGetResponseDataAttributesHomePageContent" +) + + +@_attrs_define +class TestrunsSingleGetResponseDataAttributesHomePageContent: + """ + Attributes: + type (Union[Unset, TestrunsSingleGetResponseDataAttributesHomePageContentType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TestrunsSingleGetResponseDataAttributesHomePageContentType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrunsSingleGetResponseDataAttributesHomePageContentType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsSingleGetResponseDataAttributesHomePageContentType( + _type + ) + + value = d.pop("value", UNSET) + + testruns_single_get_response_data_attributes_home_page_content_obj = ( + cls( + type=type, + value=value, + ) + ) + + testruns_single_get_response_data_attributes_home_page_content_obj.additional_properties = ( + d + ) + return ( + testruns_single_get_response_data_attributes_home_page_content_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_attributes_home_page_content_type.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_attributes_home_page_content_type.py new file mode 100644 index 00000000..2d294d36 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_attributes_home_page_content_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsSingleGetResponseDataAttributesHomePageContentType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_attributes_select_test_cases_by.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_attributes_select_test_cases_by.py new file mode 100644 index 00000000..6df4a27e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_attributes_select_test_cases_by.py @@ -0,0 +1,16 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsSingleGetResponseDataAttributesSelectTestCasesBy(str, Enum): + AUTOMATEDPROCESS = "automatedProcess" + DYNAMICLIVEDOC = "dynamicLiveDoc" + DYNAMICQUERYRESULT = "dynamicQueryResult" + MANUALSELECTION = "manualSelection" + STATICLIVEDOC = "staticLiveDoc" + STATICQUERYRESULT = "staticQueryResult" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_links.py new file mode 100644 index 00000000..0a47b77f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_links.py @@ -0,0 +1,74 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunsSingleGetResponseDataLinks") + + +@_attrs_define +class TestrunsSingleGetResponseDataLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId?revision=1234. + portal (Union[Unset, str]): Example: server-host-name/application- + path/polarion/redirect/project/MyProjectId/testrun?id=MyTestRunId&revision=1234. + """ + + self_: Union[Unset, str] = UNSET + portal: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + portal = self.portal + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if portal is not UNSET: + field_dict["portal"] = portal + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + portal = d.pop("portal", UNSET) + + testruns_single_get_response_data_links_obj = cls( + self_=self_, + portal=portal, + ) + + testruns_single_get_response_data_links_obj.additional_properties = d + return testruns_single_get_response_data_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_meta.py new file mode 100644 index 00000000..f1da13b2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_meta.py @@ -0,0 +1,89 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_get_response_data_meta_errors_item import ( + TestrunsSingleGetResponseDataMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TestrunsSingleGetResponseDataMeta") + + +@_attrs_define +class TestrunsSingleGetResponseDataMeta: + """ + Attributes: + errors (Union[Unset, List['TestrunsSingleGetResponseDataMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["TestrunsSingleGetResponseDataMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_get_response_data_meta_errors_item import ( + TestrunsSingleGetResponseDataMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ( + TestrunsSingleGetResponseDataMetaErrorsItem.from_dict( + errors_item_data + ) + ) + + errors.append(errors_item) + + testruns_single_get_response_data_meta_obj = cls( + errors=errors, + ) + + testruns_single_get_response_data_meta_obj.additional_properties = d + return testruns_single_get_response_data_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_meta_errors_item.py new file mode 100644 index 00000000..db4981f5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_meta_errors_item.py @@ -0,0 +1,116 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_get_response_data_meta_errors_item_source import ( + TestrunsSingleGetResponseDataMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="TestrunsSingleGetResponseDataMetaErrorsItem") + + +@_attrs_define +class TestrunsSingleGetResponseDataMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TestrunsSingleGetResponseDataMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "TestrunsSingleGetResponseDataMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_get_response_data_meta_errors_item_source import ( + TestrunsSingleGetResponseDataMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[Unset, TestrunsSingleGetResponseDataMetaErrorsItemSource] + if isinstance(_source, Unset): + source = UNSET + else: + source = ( + TestrunsSingleGetResponseDataMetaErrorsItemSource.from_dict( + _source + ) + ) + + testruns_single_get_response_data_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + testruns_single_get_response_data_meta_errors_item_obj.additional_properties = ( + d + ) + return testruns_single_get_response_data_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_meta_errors_item_source.py new file mode 100644 index 00000000..93fd4331 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_meta_errors_item_source.py @@ -0,0 +1,106 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_get_response_data_meta_errors_item_source_resource import ( + TestrunsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + +T = TypeVar("T", bound="TestrunsSingleGetResponseDataMetaErrorsItemSource") + + +@_attrs_define +class TestrunsSingleGetResponseDataMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TestrunsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "TestrunsSingleGetResponseDataMetaErrorsItemSourceResource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_get_response_data_meta_errors_item_source_resource import ( + TestrunsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, TestrunsSingleGetResponseDataMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TestrunsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + + testruns_single_get_response_data_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + testruns_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( + d + ) + return testruns_single_get_response_data_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..98de03b9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsSingleGetResponseDataMetaErrorsItemSourceResource" +) + + +@_attrs_define +class TestrunsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + testruns_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + testruns_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return testruns_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships.py new file mode 100644 index 00000000..2399c88d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships.py @@ -0,0 +1,234 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_get_response_data_relationships_author import ( + TestrunsSingleGetResponseDataRelationshipsAuthor, + ) + from ..models.testruns_single_get_response_data_relationships_document import ( + TestrunsSingleGetResponseDataRelationshipsDocument, + ) + from ..models.testruns_single_get_response_data_relationships_project import ( + TestrunsSingleGetResponseDataRelationshipsProject, + ) + from ..models.testruns_single_get_response_data_relationships_project_span import ( + TestrunsSingleGetResponseDataRelationshipsProjectSpan, + ) + from ..models.testruns_single_get_response_data_relationships_summary_defect import ( + TestrunsSingleGetResponseDataRelationshipsSummaryDefect, + ) + from ..models.testruns_single_get_response_data_relationships_template import ( + TestrunsSingleGetResponseDataRelationshipsTemplate, + ) + + +T = TypeVar("T", bound="TestrunsSingleGetResponseDataRelationships") + + +@_attrs_define +class TestrunsSingleGetResponseDataRelationships: + """ + Attributes: + author (Union[Unset, TestrunsSingleGetResponseDataRelationshipsAuthor]): + document (Union[Unset, TestrunsSingleGetResponseDataRelationshipsDocument]): + project (Union[Unset, TestrunsSingleGetResponseDataRelationshipsProject]): + project_span (Union[Unset, TestrunsSingleGetResponseDataRelationshipsProjectSpan]): + summary_defect (Union[Unset, TestrunsSingleGetResponseDataRelationshipsSummaryDefect]): + template (Union[Unset, TestrunsSingleGetResponseDataRelationshipsTemplate]): + """ + + author: Union[ + Unset, "TestrunsSingleGetResponseDataRelationshipsAuthor" + ] = UNSET + document: Union[ + Unset, "TestrunsSingleGetResponseDataRelationshipsDocument" + ] = UNSET + project: Union[ + Unset, "TestrunsSingleGetResponseDataRelationshipsProject" + ] = UNSET + project_span: Union[ + Unset, "TestrunsSingleGetResponseDataRelationshipsProjectSpan" + ] = UNSET + summary_defect: Union[ + Unset, "TestrunsSingleGetResponseDataRelationshipsSummaryDefect" + ] = UNSET + template: Union[ + Unset, "TestrunsSingleGetResponseDataRelationshipsTemplate" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + author: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.author, Unset): + author = self.author.to_dict() + + document: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.document, Unset): + document = self.document.to_dict() + + project: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project, Unset): + project = self.project.to_dict() + + project_span: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project_span, Unset): + project_span = self.project_span.to_dict() + + summary_defect: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.summary_defect, Unset): + summary_defect = self.summary_defect.to_dict() + + template: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.template, Unset): + template = self.template.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if author is not UNSET: + field_dict["author"] = author + if document is not UNSET: + field_dict["document"] = document + if project is not UNSET: + field_dict["project"] = project + if project_span is not UNSET: + field_dict["projectSpan"] = project_span + if summary_defect is not UNSET: + field_dict["summaryDefect"] = summary_defect + if template is not UNSET: + field_dict["template"] = template + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_get_response_data_relationships_author import ( + TestrunsSingleGetResponseDataRelationshipsAuthor, + ) + from ..models.testruns_single_get_response_data_relationships_document import ( + TestrunsSingleGetResponseDataRelationshipsDocument, + ) + from ..models.testruns_single_get_response_data_relationships_project import ( + TestrunsSingleGetResponseDataRelationshipsProject, + ) + from ..models.testruns_single_get_response_data_relationships_project_span import ( + TestrunsSingleGetResponseDataRelationshipsProjectSpan, + ) + from ..models.testruns_single_get_response_data_relationships_summary_defect import ( + TestrunsSingleGetResponseDataRelationshipsSummaryDefect, + ) + from ..models.testruns_single_get_response_data_relationships_template import ( + TestrunsSingleGetResponseDataRelationshipsTemplate, + ) + + d = src_dict.copy() + _author = d.pop("author", UNSET) + author: Union[Unset, TestrunsSingleGetResponseDataRelationshipsAuthor] + if isinstance(_author, Unset): + author = UNSET + else: + author = ( + TestrunsSingleGetResponseDataRelationshipsAuthor.from_dict( + _author + ) + ) + + _document = d.pop("document", UNSET) + document: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsDocument + ] + if isinstance(_document, Unset): + document = UNSET + else: + document = ( + TestrunsSingleGetResponseDataRelationshipsDocument.from_dict( + _document + ) + ) + + _project = d.pop("project", UNSET) + project: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsProject + ] + if isinstance(_project, Unset): + project = UNSET + else: + project = ( + TestrunsSingleGetResponseDataRelationshipsProject.from_dict( + _project + ) + ) + + _project_span = d.pop("projectSpan", UNSET) + project_span: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsProjectSpan + ] + if isinstance(_project_span, Unset): + project_span = UNSET + else: + project_span = TestrunsSingleGetResponseDataRelationshipsProjectSpan.from_dict( + _project_span + ) + + _summary_defect = d.pop("summaryDefect", UNSET) + summary_defect: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsSummaryDefect + ] + if isinstance(_summary_defect, Unset): + summary_defect = UNSET + else: + summary_defect = TestrunsSingleGetResponseDataRelationshipsSummaryDefect.from_dict( + _summary_defect + ) + + _template = d.pop("template", UNSET) + template: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsTemplate + ] + if isinstance(_template, Unset): + template = UNSET + else: + template = ( + TestrunsSingleGetResponseDataRelationshipsTemplate.from_dict( + _template + ) + ) + + testruns_single_get_response_data_relationships_obj = cls( + author=author, + document=document, + project=project, + project_span=project_span, + summary_defect=summary_defect, + template=template, + ) + + testruns_single_get_response_data_relationships_obj.additional_properties = ( + d + ) + return testruns_single_get_response_data_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_author.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_author.py new file mode 100644 index 00000000..ad7e5142 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_author.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_get_response_data_relationships_author_data import ( + TestrunsSingleGetResponseDataRelationshipsAuthorData, + ) + + +T = TypeVar("T", bound="TestrunsSingleGetResponseDataRelationshipsAuthor") + + +@_attrs_define +class TestrunsSingleGetResponseDataRelationshipsAuthor: + """ + Attributes: + data (Union[Unset, TestrunsSingleGetResponseDataRelationshipsAuthorData]): + """ + + data: Union[ + Unset, "TestrunsSingleGetResponseDataRelationshipsAuthorData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_get_response_data_relationships_author_data import ( + TestrunsSingleGetResponseDataRelationshipsAuthorData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsAuthorData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = ( + TestrunsSingleGetResponseDataRelationshipsAuthorData.from_dict( + _data + ) + ) + + testruns_single_get_response_data_relationships_author_obj = cls( + data=data, + ) + + testruns_single_get_response_data_relationships_author_obj.additional_properties = ( + d + ) + return testruns_single_get_response_data_relationships_author_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_author_data.py new file mode 100644 index 00000000..6478bace --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_author_data.py @@ -0,0 +1,99 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_single_get_response_data_relationships_author_data_type import ( + TestrunsSingleGetResponseDataRelationshipsAuthorDataType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunsSingleGetResponseDataRelationshipsAuthorData") + + +@_attrs_define +class TestrunsSingleGetResponseDataRelationshipsAuthorData: + """ + Attributes: + type (Union[Unset, TestrunsSingleGetResponseDataRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsAuthorDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsAuthorDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsSingleGetResponseDataRelationshipsAuthorDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testruns_single_get_response_data_relationships_author_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testruns_single_get_response_data_relationships_author_data_obj.additional_properties = ( + d + ) + return testruns_single_get_response_data_relationships_author_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_author_data_type.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_author_data_type.py new file mode 100644 index 00000000..429fc7de --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_author_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsSingleGetResponseDataRelationshipsAuthorDataType(str, Enum): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_document.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_document.py new file mode 100644 index 00000000..f4e3e9a6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_document.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_get_response_data_relationships_document_data import ( + TestrunsSingleGetResponseDataRelationshipsDocumentData, + ) + + +T = TypeVar("T", bound="TestrunsSingleGetResponseDataRelationshipsDocument") + + +@_attrs_define +class TestrunsSingleGetResponseDataRelationshipsDocument: + """ + Attributes: + data (Union[Unset, TestrunsSingleGetResponseDataRelationshipsDocumentData]): + """ + + data: Union[ + Unset, "TestrunsSingleGetResponseDataRelationshipsDocumentData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_get_response_data_relationships_document_data import ( + TestrunsSingleGetResponseDataRelationshipsDocumentData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsDocumentData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunsSingleGetResponseDataRelationshipsDocumentData.from_dict( + _data + ) + + testruns_single_get_response_data_relationships_document_obj = cls( + data=data, + ) + + testruns_single_get_response_data_relationships_document_obj.additional_properties = ( + d + ) + return testruns_single_get_response_data_relationships_document_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_document_data.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_document_data.py new file mode 100644 index 00000000..da1c018f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_document_data.py @@ -0,0 +1,105 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_single_get_response_data_relationships_document_data_type import ( + TestrunsSingleGetResponseDataRelationshipsDocumentDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsSingleGetResponseDataRelationshipsDocumentData" +) + + +@_attrs_define +class TestrunsSingleGetResponseDataRelationshipsDocumentData: + """ + Attributes: + type (Union[Unset, TestrunsSingleGetResponseDataRelationshipsDocumentDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsDocumentDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsDocumentDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsSingleGetResponseDataRelationshipsDocumentDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testruns_single_get_response_data_relationships_document_data_obj = ( + cls( + type=type, + id=id, + revision=revision, + ) + ) + + testruns_single_get_response_data_relationships_document_data_obj.additional_properties = ( + d + ) + return ( + testruns_single_get_response_data_relationships_document_data_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_document_data_type.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_document_data_type.py new file mode 100644 index 00000000..424fd084 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_document_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsSingleGetResponseDataRelationshipsDocumentDataType(str, Enum): + DOCUMENTS = "documents" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project.py new file mode 100644 index 00000000..c5bf3e3a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_get_response_data_relationships_project_data import ( + TestrunsSingleGetResponseDataRelationshipsProjectData, + ) + + +T = TypeVar("T", bound="TestrunsSingleGetResponseDataRelationshipsProject") + + +@_attrs_define +class TestrunsSingleGetResponseDataRelationshipsProject: + """ + Attributes: + data (Union[Unset, TestrunsSingleGetResponseDataRelationshipsProjectData]): + """ + + data: Union[ + Unset, "TestrunsSingleGetResponseDataRelationshipsProjectData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_get_response_data_relationships_project_data import ( + TestrunsSingleGetResponseDataRelationshipsProjectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsProjectData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunsSingleGetResponseDataRelationshipsProjectData.from_dict( + _data + ) + + testruns_single_get_response_data_relationships_project_obj = cls( + data=data, + ) + + testruns_single_get_response_data_relationships_project_obj.additional_properties = ( + d + ) + return testruns_single_get_response_data_relationships_project_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_data.py new file mode 100644 index 00000000..4745280f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_data.py @@ -0,0 +1,99 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_single_get_response_data_relationships_project_data_type import ( + TestrunsSingleGetResponseDataRelationshipsProjectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunsSingleGetResponseDataRelationshipsProjectData") + + +@_attrs_define +class TestrunsSingleGetResponseDataRelationshipsProjectData: + """ + Attributes: + type (Union[Unset, TestrunsSingleGetResponseDataRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsProjectDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsProjectDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsSingleGetResponseDataRelationshipsProjectDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testruns_single_get_response_data_relationships_project_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testruns_single_get_response_data_relationships_project_data_obj.additional_properties = ( + d + ) + return testruns_single_get_response_data_relationships_project_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_data_type.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_data_type.py new file mode 100644 index 00000000..ed522ce5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsSingleGetResponseDataRelationshipsProjectDataType(str, Enum): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_span.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_span.py new file mode 100644 index 00000000..7ab80b5a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_span.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_get_response_data_relationships_project_span_data_item import ( + TestrunsSingleGetResponseDataRelationshipsProjectSpanDataItem, + ) + from ..models.testruns_single_get_response_data_relationships_project_span_meta import ( + TestrunsSingleGetResponseDataRelationshipsProjectSpanMeta, + ) + + +T = TypeVar("T", bound="TestrunsSingleGetResponseDataRelationshipsProjectSpan") + + +@_attrs_define +class TestrunsSingleGetResponseDataRelationshipsProjectSpan: + """ + Attributes: + data (Union[Unset, List['TestrunsSingleGetResponseDataRelationshipsProjectSpanDataItem']]): + meta (Union[Unset, TestrunsSingleGetResponseDataRelationshipsProjectSpanMeta]): + """ + + data: Union[ + Unset, + List["TestrunsSingleGetResponseDataRelationshipsProjectSpanDataItem"], + ] = UNSET + meta: Union[ + Unset, "TestrunsSingleGetResponseDataRelationshipsProjectSpanMeta" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_get_response_data_relationships_project_span_data_item import ( + TestrunsSingleGetResponseDataRelationshipsProjectSpanDataItem, + ) + from ..models.testruns_single_get_response_data_relationships_project_span_meta import ( + TestrunsSingleGetResponseDataRelationshipsProjectSpanMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrunsSingleGetResponseDataRelationshipsProjectSpanDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsProjectSpanMeta + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TestrunsSingleGetResponseDataRelationshipsProjectSpanMeta.from_dict( + _meta + ) + + testruns_single_get_response_data_relationships_project_span_obj = cls( + data=data, + meta=meta, + ) + + testruns_single_get_response_data_relationships_project_span_obj.additional_properties = ( + d + ) + return testruns_single_get_response_data_relationships_project_span_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_span_data_item.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_span_data_item.py new file mode 100644 index 00000000..1b2343f5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_span_data_item.py @@ -0,0 +1,103 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_single_get_response_data_relationships_project_span_data_item_type import ( + TestrunsSingleGetResponseDataRelationshipsProjectSpanDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsSingleGetResponseDataRelationshipsProjectSpanDataItem" +) + + +@_attrs_define +class TestrunsSingleGetResponseDataRelationshipsProjectSpanDataItem: + """ + Attributes: + type (Union[Unset, TestrunsSingleGetResponseDataRelationshipsProjectSpanDataItemType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TestrunsSingleGetResponseDataRelationshipsProjectSpanDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunsSingleGetResponseDataRelationshipsProjectSpanDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsSingleGetResponseDataRelationshipsProjectSpanDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testruns_single_get_response_data_relationships_project_span_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testruns_single_get_response_data_relationships_project_span_data_item_obj.additional_properties = ( + d + ) + return testruns_single_get_response_data_relationships_project_span_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_span_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_span_data_item_type.py new file mode 100644 index 00000000..4e89492a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_span_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsSingleGetResponseDataRelationshipsProjectSpanDataItemType( + str, Enum +): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_span_meta.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_span_meta.py new file mode 100644 index 00000000..1c23453f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_project_span_meta.py @@ -0,0 +1,67 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsSingleGetResponseDataRelationshipsProjectSpanMeta" +) + + +@_attrs_define +class TestrunsSingleGetResponseDataRelationshipsProjectSpanMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + testruns_single_get_response_data_relationships_project_span_meta_obj = cls( + total_count=total_count, + ) + + testruns_single_get_response_data_relationships_project_span_meta_obj.additional_properties = ( + d + ) + return testruns_single_get_response_data_relationships_project_span_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_summary_defect.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_summary_defect.py new file mode 100644 index 00000000..73c862d5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_summary_defect.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_get_response_data_relationships_summary_defect_data import ( + TestrunsSingleGetResponseDataRelationshipsSummaryDefectData, + ) + + +T = TypeVar( + "T", bound="TestrunsSingleGetResponseDataRelationshipsSummaryDefect" +) + + +@_attrs_define +class TestrunsSingleGetResponseDataRelationshipsSummaryDefect: + """ + Attributes: + data (Union[Unset, TestrunsSingleGetResponseDataRelationshipsSummaryDefectData]): + """ + + data: Union[ + Unset, "TestrunsSingleGetResponseDataRelationshipsSummaryDefectData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_get_response_data_relationships_summary_defect_data import ( + TestrunsSingleGetResponseDataRelationshipsSummaryDefectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsSummaryDefectData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunsSingleGetResponseDataRelationshipsSummaryDefectData.from_dict( + _data + ) + + testruns_single_get_response_data_relationships_summary_defect_obj = ( + cls( + data=data, + ) + ) + + testruns_single_get_response_data_relationships_summary_defect_obj.additional_properties = ( + d + ) + return ( + testruns_single_get_response_data_relationships_summary_defect_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_summary_defect_data.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_summary_defect_data.py new file mode 100644 index 00000000..f2c2aed1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_summary_defect_data.py @@ -0,0 +1,102 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_single_get_response_data_relationships_summary_defect_data_type import ( + TestrunsSingleGetResponseDataRelationshipsSummaryDefectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsSingleGetResponseDataRelationshipsSummaryDefectData" +) + + +@_attrs_define +class TestrunsSingleGetResponseDataRelationshipsSummaryDefectData: + """ + Attributes: + type (Union[Unset, TestrunsSingleGetResponseDataRelationshipsSummaryDefectDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsSummaryDefectDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunsSingleGetResponseDataRelationshipsSummaryDefectDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsSingleGetResponseDataRelationshipsSummaryDefectDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testruns_single_get_response_data_relationships_summary_defect_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + testruns_single_get_response_data_relationships_summary_defect_data_obj.additional_properties = ( + d + ) + return testruns_single_get_response_data_relationships_summary_defect_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_summary_defect_data_type.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_summary_defect_data_type.py new file mode 100644 index 00000000..c6294a5a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_summary_defect_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsSingleGetResponseDataRelationshipsSummaryDefectDataType( + str, Enum +): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_template.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_template.py new file mode 100644 index 00000000..4f0f7bc8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_template.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_get_response_data_relationships_template_data import ( + TestrunsSingleGetResponseDataRelationshipsTemplateData, + ) + + +T = TypeVar("T", bound="TestrunsSingleGetResponseDataRelationshipsTemplate") + + +@_attrs_define +class TestrunsSingleGetResponseDataRelationshipsTemplate: + """ + Attributes: + data (Union[Unset, TestrunsSingleGetResponseDataRelationshipsTemplateData]): + """ + + data: Union[ + Unset, "TestrunsSingleGetResponseDataRelationshipsTemplateData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_get_response_data_relationships_template_data import ( + TestrunsSingleGetResponseDataRelationshipsTemplateData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsTemplateData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunsSingleGetResponseDataRelationshipsTemplateData.from_dict( + _data + ) + + testruns_single_get_response_data_relationships_template_obj = cls( + data=data, + ) + + testruns_single_get_response_data_relationships_template_obj.additional_properties = ( + d + ) + return testruns_single_get_response_data_relationships_template_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_template_data.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_template_data.py new file mode 100644 index 00000000..e04acc84 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_template_data.py @@ -0,0 +1,105 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_single_get_response_data_relationships_template_data_type import ( + TestrunsSingleGetResponseDataRelationshipsTemplateDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsSingleGetResponseDataRelationshipsTemplateData" +) + + +@_attrs_define +class TestrunsSingleGetResponseDataRelationshipsTemplateData: + """ + Attributes: + type (Union[Unset, TestrunsSingleGetResponseDataRelationshipsTemplateDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsTemplateDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrunsSingleGetResponseDataRelationshipsTemplateDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsSingleGetResponseDataRelationshipsTemplateDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + testruns_single_get_response_data_relationships_template_data_obj = ( + cls( + type=type, + id=id, + revision=revision, + ) + ) + + testruns_single_get_response_data_relationships_template_data_obj.additional_properties = ( + d + ) + return ( + testruns_single_get_response_data_relationships_template_data_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_template_data_type.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_template_data_type.py new file mode 100644 index 00000000..488ad4be --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_relationships_template_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsSingleGetResponseDataRelationshipsTemplateDataType(str, Enum): + TESTRUNS = "testruns" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_type.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_type.py new file mode 100644 index 00000000..53275a0d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsSingleGetResponseDataType(str, Enum): + TESTRUNS = "testruns" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_included_item.py new file mode 100644 index 00000000..3c6290dd --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestrunsSingleGetResponseIncludedItem") + + +@_attrs_define +class TestrunsSingleGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + testruns_single_get_response_included_item_obj = cls() + + testruns_single_get_response_included_item_obj.additional_properties = ( + d + ) + return testruns_single_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_links.py new file mode 100644 index 00000000..6ab59aca --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_get_response_links.py @@ -0,0 +1,64 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestrunsSingleGetResponseLinks") + + +@_attrs_define +class TestrunsSingleGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + testruns_single_get_response_links_obj = cls( + self_=self_, + ) + + testruns_single_get_response_links_obj.additional_properties = d + return testruns_single_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request.py b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request.py new file mode 100644 index 00000000..b29e7409 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request.py @@ -0,0 +1,80 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_patch_request_data import ( + TestrunsSinglePatchRequestData, + ) + + +T = TypeVar("T", bound="TestrunsSinglePatchRequest") + + +@_attrs_define +class TestrunsSinglePatchRequest: + """ + Attributes: + data (Union[Unset, TestrunsSinglePatchRequestData]): + """ + + data: Union[Unset, "TestrunsSinglePatchRequestData"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_patch_request_data import ( + TestrunsSinglePatchRequestData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, TestrunsSinglePatchRequestData] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunsSinglePatchRequestData.from_dict(_data) + + testruns_single_patch_request_obj = cls( + data=data, + ) + + testruns_single_patch_request_obj.additional_properties = d + return testruns_single_patch_request_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data.py b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data.py new file mode 100644 index 00000000..555467c9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data.py @@ -0,0 +1,142 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_single_patch_request_data_type import ( + TestrunsSinglePatchRequestDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_patch_request_data_attributes import ( + TestrunsSinglePatchRequestDataAttributes, + ) + from ..models.testruns_single_patch_request_data_relationships import ( + TestrunsSinglePatchRequestDataRelationships, + ) + + +T = TypeVar("T", bound="TestrunsSinglePatchRequestData") + + +@_attrs_define +class TestrunsSinglePatchRequestData: + """ + Attributes: + type (Union[Unset, TestrunsSinglePatchRequestDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId. + attributes (Union[Unset, TestrunsSinglePatchRequestDataAttributes]): + relationships (Union[Unset, TestrunsSinglePatchRequestDataRelationships]): + """ + + type: Union[Unset, TestrunsSinglePatchRequestDataType] = UNSET + id: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TestrunsSinglePatchRequestDataAttributes" + ] = UNSET + relationships: Union[ + Unset, "TestrunsSinglePatchRequestDataRelationships" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_patch_request_data_attributes import ( + TestrunsSinglePatchRequestDataAttributes, + ) + from ..models.testruns_single_patch_request_data_relationships import ( + TestrunsSinglePatchRequestDataRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TestrunsSinglePatchRequestDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsSinglePatchRequestDataType(_type) + + id = d.pop("id", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, TestrunsSinglePatchRequestDataAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TestrunsSinglePatchRequestDataAttributes.from_dict( + _attributes + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TestrunsSinglePatchRequestDataRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + TestrunsSinglePatchRequestDataRelationships.from_dict( + _relationships + ) + ) + + testruns_single_patch_request_data_obj = cls( + type=type, + id=id, + attributes=attributes, + relationships=relationships, + ) + + testruns_single_patch_request_data_obj.additional_properties = d + return testruns_single_patch_request_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_attributes.py b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_attributes.py new file mode 100644 index 00000000..776e3701 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_attributes.py @@ -0,0 +1,206 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.testruns_single_patch_request_data_attributes_select_test_cases_by import ( + TestrunsSinglePatchRequestDataAttributesSelectTestCasesBy, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_patch_request_data_attributes_home_page_content import ( + TestrunsSinglePatchRequestDataAttributesHomePageContent, + ) + + +T = TypeVar("T", bound="TestrunsSinglePatchRequestDataAttributes") + + +@_attrs_define +class TestrunsSinglePatchRequestDataAttributes: + """ + Attributes: + finished_on (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + group_id (Union[Unset, str]): Example: Group ID. + home_page_content (Union[Unset, TestrunsSinglePatchRequestDataAttributesHomePageContent]): + id_prefix (Union[Unset, str]): Example: ID Prefix. + keep_in_history (Union[Unset, bool]): + query (Union[Unset, str]): Example: Query. + select_test_cases_by (Union[Unset, TestrunsSinglePatchRequestDataAttributesSelectTestCasesBy]): Example: + manualSelection. + status (Union[Unset, str]): Example: open. + title (Union[Unset, str]): Example: Title. + type (Union[Unset, str]): Example: manual. + use_report_from_template (Union[Unset, bool]): + """ + + finished_on: Union[Unset, datetime.datetime] = UNSET + group_id: Union[Unset, str] = UNSET + home_page_content: Union[ + Unset, "TestrunsSinglePatchRequestDataAttributesHomePageContent" + ] = UNSET + id_prefix: Union[Unset, str] = UNSET + keep_in_history: Union[Unset, bool] = UNSET + query: Union[Unset, str] = UNSET + select_test_cases_by: Union[ + Unset, TestrunsSinglePatchRequestDataAttributesSelectTestCasesBy + ] = UNSET + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + use_report_from_template: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + finished_on: Union[Unset, str] = UNSET + if not isinstance(self.finished_on, Unset): + finished_on = self.finished_on.isoformat() + + group_id = self.group_id + + home_page_content: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.home_page_content, Unset): + home_page_content = self.home_page_content.to_dict() + + id_prefix = self.id_prefix + + keep_in_history = self.keep_in_history + + query = self.query + + select_test_cases_by: Union[Unset, str] = UNSET + if not isinstance(self.select_test_cases_by, Unset): + select_test_cases_by = self.select_test_cases_by.value + + status = self.status + + title = self.title + + type = self.type + + use_report_from_template = self.use_report_from_template + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if finished_on is not UNSET: + field_dict["finishedOn"] = finished_on + if group_id is not UNSET: + field_dict["groupId"] = group_id + if home_page_content is not UNSET: + field_dict["homePageContent"] = home_page_content + if id_prefix is not UNSET: + field_dict["idPrefix"] = id_prefix + if keep_in_history is not UNSET: + field_dict["keepInHistory"] = keep_in_history + if query is not UNSET: + field_dict["query"] = query + if select_test_cases_by is not UNSET: + field_dict["selectTestCasesBy"] = select_test_cases_by + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if type is not UNSET: + field_dict["type"] = type + if use_report_from_template is not UNSET: + field_dict["useReportFromTemplate"] = use_report_from_template + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_patch_request_data_attributes_home_page_content import ( + TestrunsSinglePatchRequestDataAttributesHomePageContent, + ) + + d = src_dict.copy() + _finished_on = d.pop("finishedOn", UNSET) + finished_on: Union[Unset, datetime.datetime] + if isinstance(_finished_on, Unset): + finished_on = UNSET + else: + finished_on = isoparse(_finished_on) + + group_id = d.pop("groupId", UNSET) + + _home_page_content = d.pop("homePageContent", UNSET) + home_page_content: Union[ + Unset, TestrunsSinglePatchRequestDataAttributesHomePageContent + ] + if isinstance(_home_page_content, Unset): + home_page_content = UNSET + else: + home_page_content = TestrunsSinglePatchRequestDataAttributesHomePageContent.from_dict( + _home_page_content + ) + + id_prefix = d.pop("idPrefix", UNSET) + + keep_in_history = d.pop("keepInHistory", UNSET) + + query = d.pop("query", UNSET) + + _select_test_cases_by = d.pop("selectTestCasesBy", UNSET) + select_test_cases_by: Union[ + Unset, TestrunsSinglePatchRequestDataAttributesSelectTestCasesBy + ] + if isinstance(_select_test_cases_by, Unset): + select_test_cases_by = UNSET + else: + select_test_cases_by = ( + TestrunsSinglePatchRequestDataAttributesSelectTestCasesBy( + _select_test_cases_by + ) + ) + + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + type = d.pop("type", UNSET) + + use_report_from_template = d.pop("useReportFromTemplate", UNSET) + + testruns_single_patch_request_data_attributes_obj = cls( + finished_on=finished_on, + group_id=group_id, + home_page_content=home_page_content, + id_prefix=id_prefix, + keep_in_history=keep_in_history, + query=query, + select_test_cases_by=select_test_cases_by, + status=status, + title=title, + type=type, + use_report_from_template=use_report_from_template, + ) + + testruns_single_patch_request_data_attributes_obj.additional_properties = ( + d + ) + return testruns_single_patch_request_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_attributes_home_page_content.py b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_attributes_home_page_content.py new file mode 100644 index 00000000..322b12a8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_attributes_home_page_content.py @@ -0,0 +1,96 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_single_patch_request_data_attributes_home_page_content_type import ( + TestrunsSinglePatchRequestDataAttributesHomePageContentType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsSinglePatchRequestDataAttributesHomePageContent" +) + + +@_attrs_define +class TestrunsSinglePatchRequestDataAttributesHomePageContent: + """ + Attributes: + type (Union[Unset, TestrunsSinglePatchRequestDataAttributesHomePageContentType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TestrunsSinglePatchRequestDataAttributesHomePageContentType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrunsSinglePatchRequestDataAttributesHomePageContentType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsSinglePatchRequestDataAttributesHomePageContentType( + _type + ) + + value = d.pop("value", UNSET) + + testruns_single_patch_request_data_attributes_home_page_content_obj = ( + cls( + type=type, + value=value, + ) + ) + + testruns_single_patch_request_data_attributes_home_page_content_obj.additional_properties = ( + d + ) + return ( + testruns_single_patch_request_data_attributes_home_page_content_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_attributes_home_page_content_type.py b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_attributes_home_page_content_type.py new file mode 100644 index 00000000..0b5ca3fe --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_attributes_home_page_content_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsSinglePatchRequestDataAttributesHomePageContentType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_attributes_select_test_cases_by.py b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_attributes_select_test_cases_by.py new file mode 100644 index 00000000..73f5ae52 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_attributes_select_test_cases_by.py @@ -0,0 +1,16 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsSinglePatchRequestDataAttributesSelectTestCasesBy(str, Enum): + AUTOMATEDPROCESS = "automatedProcess" + DYNAMICLIVEDOC = "dynamicLiveDoc" + DYNAMICQUERYRESULT = "dynamicQueryResult" + MANUALSELECTION = "manualSelection" + STATICLIVEDOC = "staticLiveDoc" + STATICQUERYRESULT = "staticQueryResult" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships.py b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships.py new file mode 100644 index 00000000..692be6a5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships.py @@ -0,0 +1,146 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_patch_request_data_relationships_document import ( + TestrunsSinglePatchRequestDataRelationshipsDocument, + ) + from ..models.testruns_single_patch_request_data_relationships_project_span import ( + TestrunsSinglePatchRequestDataRelationshipsProjectSpan, + ) + from ..models.testruns_single_patch_request_data_relationships_summary_defect import ( + TestrunsSinglePatchRequestDataRelationshipsSummaryDefect, + ) + + +T = TypeVar("T", bound="TestrunsSinglePatchRequestDataRelationships") + + +@_attrs_define +class TestrunsSinglePatchRequestDataRelationships: + """ + Attributes: + document (Union[Unset, TestrunsSinglePatchRequestDataRelationshipsDocument]): + project_span (Union[Unset, TestrunsSinglePatchRequestDataRelationshipsProjectSpan]): + summary_defect (Union[Unset, TestrunsSinglePatchRequestDataRelationshipsSummaryDefect]): + """ + + document: Union[ + Unset, "TestrunsSinglePatchRequestDataRelationshipsDocument" + ] = UNSET + project_span: Union[ + Unset, "TestrunsSinglePatchRequestDataRelationshipsProjectSpan" + ] = UNSET + summary_defect: Union[ + Unset, "TestrunsSinglePatchRequestDataRelationshipsSummaryDefect" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + document: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.document, Unset): + document = self.document.to_dict() + + project_span: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project_span, Unset): + project_span = self.project_span.to_dict() + + summary_defect: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.summary_defect, Unset): + summary_defect = self.summary_defect.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if document is not UNSET: + field_dict["document"] = document + if project_span is not UNSET: + field_dict["projectSpan"] = project_span + if summary_defect is not UNSET: + field_dict["summaryDefect"] = summary_defect + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_patch_request_data_relationships_document import ( + TestrunsSinglePatchRequestDataRelationshipsDocument, + ) + from ..models.testruns_single_patch_request_data_relationships_project_span import ( + TestrunsSinglePatchRequestDataRelationshipsProjectSpan, + ) + from ..models.testruns_single_patch_request_data_relationships_summary_defect import ( + TestrunsSinglePatchRequestDataRelationshipsSummaryDefect, + ) + + d = src_dict.copy() + _document = d.pop("document", UNSET) + document: Union[ + Unset, TestrunsSinglePatchRequestDataRelationshipsDocument + ] + if isinstance(_document, Unset): + document = UNSET + else: + document = ( + TestrunsSinglePatchRequestDataRelationshipsDocument.from_dict( + _document + ) + ) + + _project_span = d.pop("projectSpan", UNSET) + project_span: Union[ + Unset, TestrunsSinglePatchRequestDataRelationshipsProjectSpan + ] + if isinstance(_project_span, Unset): + project_span = UNSET + else: + project_span = TestrunsSinglePatchRequestDataRelationshipsProjectSpan.from_dict( + _project_span + ) + + _summary_defect = d.pop("summaryDefect", UNSET) + summary_defect: Union[ + Unset, TestrunsSinglePatchRequestDataRelationshipsSummaryDefect + ] + if isinstance(_summary_defect, Unset): + summary_defect = UNSET + else: + summary_defect = TestrunsSinglePatchRequestDataRelationshipsSummaryDefect.from_dict( + _summary_defect + ) + + testruns_single_patch_request_data_relationships_obj = cls( + document=document, + project_span=project_span, + summary_defect=summary_defect, + ) + + testruns_single_patch_request_data_relationships_obj.additional_properties = ( + d + ) + return testruns_single_patch_request_data_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_document.py b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_document.py new file mode 100644 index 00000000..19597b3d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_document.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_patch_request_data_relationships_document_data import ( + TestrunsSinglePatchRequestDataRelationshipsDocumentData, + ) + + +T = TypeVar("T", bound="TestrunsSinglePatchRequestDataRelationshipsDocument") + + +@_attrs_define +class TestrunsSinglePatchRequestDataRelationshipsDocument: + """ + Attributes: + data (Union[Unset, TestrunsSinglePatchRequestDataRelationshipsDocumentData]): + """ + + data: Union[ + Unset, "TestrunsSinglePatchRequestDataRelationshipsDocumentData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_patch_request_data_relationships_document_data import ( + TestrunsSinglePatchRequestDataRelationshipsDocumentData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrunsSinglePatchRequestDataRelationshipsDocumentData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunsSinglePatchRequestDataRelationshipsDocumentData.from_dict( + _data + ) + + testruns_single_patch_request_data_relationships_document_obj = cls( + data=data, + ) + + testruns_single_patch_request_data_relationships_document_obj.additional_properties = ( + d + ) + return testruns_single_patch_request_data_relationships_document_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_document_data.py b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_document_data.py new file mode 100644 index 00000000..4b95562b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_document_data.py @@ -0,0 +1,96 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_single_patch_request_data_relationships_document_data_type import ( + TestrunsSinglePatchRequestDataRelationshipsDocumentDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsSinglePatchRequestDataRelationshipsDocumentData" +) + + +@_attrs_define +class TestrunsSinglePatchRequestDataRelationshipsDocumentData: + """ + Attributes: + type (Union[Unset, TestrunsSinglePatchRequestDataRelationshipsDocumentDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId. + """ + + type: Union[ + Unset, TestrunsSinglePatchRequestDataRelationshipsDocumentDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TestrunsSinglePatchRequestDataRelationshipsDocumentDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsSinglePatchRequestDataRelationshipsDocumentDataType( + _type + ) + + id = d.pop("id", UNSET) + + testruns_single_patch_request_data_relationships_document_data_obj = ( + cls( + type=type, + id=id, + ) + ) + + testruns_single_patch_request_data_relationships_document_data_obj.additional_properties = ( + d + ) + return ( + testruns_single_patch_request_data_relationships_document_data_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_document_data_type.py b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_document_data_type.py new file mode 100644 index 00000000..09fc496d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_document_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsSinglePatchRequestDataRelationshipsDocumentDataType(str, Enum): + DOCUMENTS = "documents" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_project_span.py b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_project_span.py new file mode 100644 index 00000000..35f363b7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_project_span.py @@ -0,0 +1,96 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_patch_request_data_relationships_project_span_data_item import ( + TestrunsSinglePatchRequestDataRelationshipsProjectSpanDataItem, + ) + + +T = TypeVar( + "T", bound="TestrunsSinglePatchRequestDataRelationshipsProjectSpan" +) + + +@_attrs_define +class TestrunsSinglePatchRequestDataRelationshipsProjectSpan: + """ + Attributes: + data (Union[Unset, List['TestrunsSinglePatchRequestDataRelationshipsProjectSpanDataItem']]): + """ + + data: Union[ + Unset, + List["TestrunsSinglePatchRequestDataRelationshipsProjectSpanDataItem"], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_patch_request_data_relationships_project_span_data_item import ( + TestrunsSinglePatchRequestDataRelationshipsProjectSpanDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TestrunsSinglePatchRequestDataRelationshipsProjectSpanDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + testruns_single_patch_request_data_relationships_project_span_obj = ( + cls( + data=data, + ) + ) + + testruns_single_patch_request_data_relationships_project_span_obj.additional_properties = ( + d + ) + return ( + testruns_single_patch_request_data_relationships_project_span_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_project_span_data_item.py b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_project_span_data_item.py new file mode 100644 index 00000000..46de443b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_project_span_data_item.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_single_patch_request_data_relationships_project_span_data_item_type import ( + TestrunsSinglePatchRequestDataRelationshipsProjectSpanDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsSinglePatchRequestDataRelationshipsProjectSpanDataItem" +) + + +@_attrs_define +class TestrunsSinglePatchRequestDataRelationshipsProjectSpanDataItem: + """ + Attributes: + type (Union[Unset, TestrunsSinglePatchRequestDataRelationshipsProjectSpanDataItemType]): + id (Union[Unset, str]): Example: MyProjectId. + """ + + type: Union[ + Unset, + TestrunsSinglePatchRequestDataRelationshipsProjectSpanDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunsSinglePatchRequestDataRelationshipsProjectSpanDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsSinglePatchRequestDataRelationshipsProjectSpanDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + testruns_single_patch_request_data_relationships_project_span_data_item_obj = cls( + type=type, + id=id, + ) + + testruns_single_patch_request_data_relationships_project_span_data_item_obj.additional_properties = ( + d + ) + return testruns_single_patch_request_data_relationships_project_span_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_project_span_data_item_type.py b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_project_span_data_item_type.py new file mode 100644 index 00000000..4336e62e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_project_span_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsSinglePatchRequestDataRelationshipsProjectSpanDataItemType( + str, Enum +): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_summary_defect.py b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_summary_defect.py new file mode 100644 index 00000000..34a0af26 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_summary_defect.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.testruns_single_patch_request_data_relationships_summary_defect_data import ( + TestrunsSinglePatchRequestDataRelationshipsSummaryDefectData, + ) + + +T = TypeVar( + "T", bound="TestrunsSinglePatchRequestDataRelationshipsSummaryDefect" +) + + +@_attrs_define +class TestrunsSinglePatchRequestDataRelationshipsSummaryDefect: + """ + Attributes: + data (Union[Unset, TestrunsSinglePatchRequestDataRelationshipsSummaryDefectData]): + """ + + data: Union[ + Unset, "TestrunsSinglePatchRequestDataRelationshipsSummaryDefectData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.testruns_single_patch_request_data_relationships_summary_defect_data import ( + TestrunsSinglePatchRequestDataRelationshipsSummaryDefectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, TestrunsSinglePatchRequestDataRelationshipsSummaryDefectData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TestrunsSinglePatchRequestDataRelationshipsSummaryDefectData.from_dict( + _data + ) + + testruns_single_patch_request_data_relationships_summary_defect_obj = ( + cls( + data=data, + ) + ) + + testruns_single_patch_request_data_relationships_summary_defect_obj.additional_properties = ( + d + ) + return ( + testruns_single_patch_request_data_relationships_summary_defect_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_summary_defect_data.py b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_summary_defect_data.py new file mode 100644 index 00000000..4d6f33b2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_summary_defect_data.py @@ -0,0 +1,93 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.testruns_single_patch_request_data_relationships_summary_defect_data_type import ( + TestrunsSinglePatchRequestDataRelationshipsSummaryDefectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TestrunsSinglePatchRequestDataRelationshipsSummaryDefectData" +) + + +@_attrs_define +class TestrunsSinglePatchRequestDataRelationshipsSummaryDefectData: + """ + Attributes: + type (Union[Unset, TestrunsSinglePatchRequestDataRelationshipsSummaryDefectDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + """ + + type: Union[ + Unset, TestrunsSinglePatchRequestDataRelationshipsSummaryDefectDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TestrunsSinglePatchRequestDataRelationshipsSummaryDefectDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TestrunsSinglePatchRequestDataRelationshipsSummaryDefectDataType( + _type + ) + + id = d.pop("id", UNSET) + + testruns_single_patch_request_data_relationships_summary_defect_data_obj = cls( + type=type, + id=id, + ) + + testruns_single_patch_request_data_relationships_summary_defect_data_obj.additional_properties = ( + d + ) + return testruns_single_patch_request_data_relationships_summary_defect_data_obj + + @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/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_summary_defect_data_type.py b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_summary_defect_data_type.py new file mode 100644 index 00000000..4c5967ad --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_relationships_summary_defect_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsSinglePatchRequestDataRelationshipsSummaryDefectDataType( + str, Enum +): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_type.py b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_type.py new file mode 100644 index 00000000..5ad1daba --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/testruns_single_patch_request_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TestrunsSinglePatchRequestDataType(str, Enum): + TESTRUNS = "testruns" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response.py new file mode 100644 index 00000000..90bd57de --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response.py @@ -0,0 +1,162 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_list_get_response_data_item import ( + TeststepResultsListGetResponseDataItem, + ) + from ..models.teststep_results_list_get_response_included_item import ( + TeststepResultsListGetResponseIncludedItem, + ) + from ..models.teststep_results_list_get_response_links import ( + TeststepResultsListGetResponseLinks, + ) + from ..models.teststep_results_list_get_response_meta import ( + TeststepResultsListGetResponseMeta, + ) + + +T = TypeVar("T", bound="TeststepResultsListGetResponse") + + +@_attrs_define +class TeststepResultsListGetResponse: + """ + Attributes: + meta (Union[Unset, TeststepResultsListGetResponseMeta]): + data (Union[Unset, List['TeststepResultsListGetResponseDataItem']]): + included (Union[Unset, List['TeststepResultsListGetResponseIncludedItem']]): Related entities might be returned, + see Rest API + User Guide. + links (Union[Unset, TeststepResultsListGetResponseLinks]): + """ + + meta: Union[Unset, "TeststepResultsListGetResponseMeta"] = UNSET + data: Union[Unset, List["TeststepResultsListGetResponseDataItem"]] = UNSET + included: Union[ + Unset, List["TeststepResultsListGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "TeststepResultsListGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_list_get_response_data_item import ( + TeststepResultsListGetResponseDataItem, + ) + from ..models.teststep_results_list_get_response_included_item import ( + TeststepResultsListGetResponseIncludedItem, + ) + from ..models.teststep_results_list_get_response_links import ( + TeststepResultsListGetResponseLinks, + ) + from ..models.teststep_results_list_get_response_meta import ( + TeststepResultsListGetResponseMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TeststepResultsListGetResponseMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TeststepResultsListGetResponseMeta.from_dict(_meta) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TeststepResultsListGetResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + TeststepResultsListGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TeststepResultsListGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TeststepResultsListGetResponseLinks.from_dict(_links) + + teststep_results_list_get_response_obj = cls( + meta=meta, + data=data, + included=included, + links=links, + ) + + teststep_results_list_get_response_obj.additional_properties = d + return teststep_results_list_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item.py new file mode 100644 index 00000000..141b96f9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item.py @@ -0,0 +1,203 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststep_results_list_get_response_data_item_type import ( + TeststepResultsListGetResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_list_get_response_data_item_attributes import ( + TeststepResultsListGetResponseDataItemAttributes, + ) + from ..models.teststep_results_list_get_response_data_item_links import ( + TeststepResultsListGetResponseDataItemLinks, + ) + from ..models.teststep_results_list_get_response_data_item_meta import ( + TeststepResultsListGetResponseDataItemMeta, + ) + from ..models.teststep_results_list_get_response_data_item_relationships import ( + TeststepResultsListGetResponseDataItemRelationships, + ) + + +T = TypeVar("T", bound="TeststepResultsListGetResponseDataItem") + + +@_attrs_define +class TeststepResultsListGetResponseDataItem: + """ + Attributes: + type (Union[Unset, TeststepResultsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyProjectId/MyTestcaseId/0/1. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TeststepResultsListGetResponseDataItemAttributes]): + relationships (Union[Unset, TeststepResultsListGetResponseDataItemRelationships]): + meta (Union[Unset, TeststepResultsListGetResponseDataItemMeta]): + links (Union[Unset, TeststepResultsListGetResponseDataItemLinks]): + """ + + type: Union[Unset, TeststepResultsListGetResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TeststepResultsListGetResponseDataItemAttributes" + ] = UNSET + relationships: Union[ + Unset, "TeststepResultsListGetResponseDataItemRelationships" + ] = UNSET + meta: Union[Unset, "TeststepResultsListGetResponseDataItemMeta"] = UNSET + links: Union[Unset, "TeststepResultsListGetResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_list_get_response_data_item_attributes import ( + TeststepResultsListGetResponseDataItemAttributes, + ) + from ..models.teststep_results_list_get_response_data_item_links import ( + TeststepResultsListGetResponseDataItemLinks, + ) + from ..models.teststep_results_list_get_response_data_item_meta import ( + TeststepResultsListGetResponseDataItemMeta, + ) + from ..models.teststep_results_list_get_response_data_item_relationships import ( + TeststepResultsListGetResponseDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TeststepResultsListGetResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepResultsListGetResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TeststepResultsListGetResponseDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + TeststepResultsListGetResponseDataItemAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TeststepResultsListGetResponseDataItemRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + TeststepResultsListGetResponseDataItemRelationships.from_dict( + _relationships + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TeststepResultsListGetResponseDataItemMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TeststepResultsListGetResponseDataItemMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, TeststepResultsListGetResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TeststepResultsListGetResponseDataItemLinks.from_dict( + _links + ) + + teststep_results_list_get_response_data_item_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + teststep_results_list_get_response_data_item_obj.additional_properties = ( + d + ) + return teststep_results_list_get_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_attributes.py new file mode 100644 index 00000000..f5f63637 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_attributes.py @@ -0,0 +1,97 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_list_get_response_data_item_attributes_comment import ( + TeststepResultsListGetResponseDataItemAttributesComment, + ) + + +T = TypeVar("T", bound="TeststepResultsListGetResponseDataItemAttributes") + + +@_attrs_define +class TeststepResultsListGetResponseDataItemAttributes: + """ + Attributes: + comment (Union[Unset, TeststepResultsListGetResponseDataItemAttributesComment]): + result (Union[Unset, str]): Example: passed. + """ + + comment: Union[ + Unset, "TeststepResultsListGetResponseDataItemAttributesComment" + ] = UNSET + result: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + comment: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.comment, Unset): + comment = self.comment.to_dict() + + result = self.result + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if comment is not UNSET: + field_dict["comment"] = comment + if result is not UNSET: + field_dict["result"] = result + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_list_get_response_data_item_attributes_comment import ( + TeststepResultsListGetResponseDataItemAttributesComment, + ) + + d = src_dict.copy() + _comment = d.pop("comment", UNSET) + comment: Union[ + Unset, TeststepResultsListGetResponseDataItemAttributesComment + ] + if isinstance(_comment, Unset): + comment = UNSET + else: + comment = TeststepResultsListGetResponseDataItemAttributesComment.from_dict( + _comment + ) + + result = d.pop("result", UNSET) + + teststep_results_list_get_response_data_item_attributes_obj = cls( + comment=comment, + result=result, + ) + + teststep_results_list_get_response_data_item_attributes_obj.additional_properties = ( + d + ) + return teststep_results_list_get_response_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_attributes_comment.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_attributes_comment.py new file mode 100644 index 00000000..69144873 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_attributes_comment.py @@ -0,0 +1,96 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststep_results_list_get_response_data_item_attributes_comment_type import ( + TeststepResultsListGetResponseDataItemAttributesCommentType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TeststepResultsListGetResponseDataItemAttributesComment" +) + + +@_attrs_define +class TeststepResultsListGetResponseDataItemAttributesComment: + """ + Attributes: + type (Union[Unset, TeststepResultsListGetResponseDataItemAttributesCommentType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TeststepResultsListGetResponseDataItemAttributesCommentType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TeststepResultsListGetResponseDataItemAttributesCommentType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepResultsListGetResponseDataItemAttributesCommentType( + _type + ) + + value = d.pop("value", UNSET) + + teststep_results_list_get_response_data_item_attributes_comment_obj = ( + cls( + type=type, + value=value, + ) + ) + + teststep_results_list_get_response_data_item_attributes_comment_obj.additional_properties = ( + d + ) + return ( + teststep_results_list_get_response_data_item_attributes_comment_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_attributes_comment_type.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_attributes_comment_type.py new file mode 100644 index 00000000..d2be6f8b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_attributes_comment_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepResultsListGetResponseDataItemAttributesCommentType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_links.py new file mode 100644 index 00000000..5257b24d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepResultsListGetResponseDataItemLinks") + + +@_attrs_define +class TeststepResultsListGetResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/testrecords/MyProjectId/MyTestcaseId/0/teststepresults/1. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + teststep_results_list_get_response_data_item_links_obj = cls( + self_=self_, + ) + + teststep_results_list_get_response_data_item_links_obj.additional_properties = ( + d + ) + return teststep_results_list_get_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_meta.py new file mode 100644 index 00000000..aedc06d2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_meta.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_list_get_response_data_item_meta_errors_item import ( + TeststepResultsListGetResponseDataItemMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TeststepResultsListGetResponseDataItemMeta") + + +@_attrs_define +class TeststepResultsListGetResponseDataItemMeta: + """ + Attributes: + errors (Union[Unset, List['TeststepResultsListGetResponseDataItemMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["TeststepResultsListGetResponseDataItemMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_list_get_response_data_item_meta_errors_item import ( + TeststepResultsListGetResponseDataItemMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ( + TeststepResultsListGetResponseDataItemMetaErrorsItem.from_dict( + errors_item_data + ) + ) + + errors.append(errors_item) + + teststep_results_list_get_response_data_item_meta_obj = cls( + errors=errors, + ) + + teststep_results_list_get_response_data_item_meta_obj.additional_properties = ( + d + ) + return teststep_results_list_get_response_data_item_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_meta_errors_item.py new file mode 100644 index 00000000..8d22afa2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_meta_errors_item.py @@ -0,0 +1,120 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_list_get_response_data_item_meta_errors_item_source import ( + TeststepResultsListGetResponseDataItemMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="TeststepResultsListGetResponseDataItemMetaErrorsItem") + + +@_attrs_define +class TeststepResultsListGetResponseDataItemMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TeststepResultsListGetResponseDataItemMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "TeststepResultsListGetResponseDataItemMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_list_get_response_data_item_meta_errors_item_source import ( + TeststepResultsListGetResponseDataItemMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, TeststepResultsListGetResponseDataItemMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = TeststepResultsListGetResponseDataItemMetaErrorsItemSource.from_dict( + _source + ) + + teststep_results_list_get_response_data_item_meta_errors_item_obj = ( + cls( + status=status, + title=title, + detail=detail, + source=source, + ) + ) + + teststep_results_list_get_response_data_item_meta_errors_item_obj.additional_properties = ( + d + ) + return ( + teststep_results_list_get_response_data_item_meta_errors_item_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_meta_errors_item_source.py new file mode 100644 index 00000000..7b383a4b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_meta_errors_item_source.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_list_get_response_data_item_meta_errors_item_source_resource import ( + TeststepResultsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", bound="TeststepResultsListGetResponseDataItemMetaErrorsItemSource" +) + + +@_attrs_define +class TeststepResultsListGetResponseDataItemMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TeststepResultsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing + the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "TeststepResultsListGetResponseDataItemMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_list_get_response_data_item_meta_errors_item_source_resource import ( + TeststepResultsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + TeststepResultsListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TeststepResultsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + + teststep_results_list_get_response_data_item_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + teststep_results_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( + d + ) + return teststep_results_list_get_response_data_item_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..a81ac0fb --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TeststepResultsListGetResponseDataItemMetaErrorsItemSourceResource", +) + + +@_attrs_define +class TeststepResultsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + teststep_results_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + teststep_results_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return teststep_results_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_relationships.py new file mode 100644 index 00000000..bc5ecfce --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_relationships.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_list_get_response_data_item_relationships_test_step import ( + TeststepResultsListGetResponseDataItemRelationshipsTestStep, + ) + + +T = TypeVar("T", bound="TeststepResultsListGetResponseDataItemRelationships") + + +@_attrs_define +class TeststepResultsListGetResponseDataItemRelationships: + """ + Attributes: + test_step (Union[Unset, TeststepResultsListGetResponseDataItemRelationshipsTestStep]): + """ + + test_step: Union[ + Unset, "TeststepResultsListGetResponseDataItemRelationshipsTestStep" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + test_step: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.test_step, Unset): + test_step = self.test_step.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if test_step is not UNSET: + field_dict["testStep"] = test_step + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_list_get_response_data_item_relationships_test_step import ( + TeststepResultsListGetResponseDataItemRelationshipsTestStep, + ) + + d = src_dict.copy() + _test_step = d.pop("testStep", UNSET) + test_step: Union[ + Unset, TeststepResultsListGetResponseDataItemRelationshipsTestStep + ] + if isinstance(_test_step, Unset): + test_step = UNSET + else: + test_step = TeststepResultsListGetResponseDataItemRelationshipsTestStep.from_dict( + _test_step + ) + + teststep_results_list_get_response_data_item_relationships_obj = cls( + test_step=test_step, + ) + + teststep_results_list_get_response_data_item_relationships_obj.additional_properties = ( + d + ) + return teststep_results_list_get_response_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_relationships_test_step.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_relationships_test_step.py new file mode 100644 index 00000000..7f414b77 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_relationships_test_step.py @@ -0,0 +1,92 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_list_get_response_data_item_relationships_test_step_data import ( + TeststepResultsListGetResponseDataItemRelationshipsTestStepData, + ) + + +T = TypeVar( + "T", bound="TeststepResultsListGetResponseDataItemRelationshipsTestStep" +) + + +@_attrs_define +class TeststepResultsListGetResponseDataItemRelationshipsTestStep: + """ + Attributes: + data (Union[Unset, TeststepResultsListGetResponseDataItemRelationshipsTestStepData]): + """ + + data: Union[ + Unset, + "TeststepResultsListGetResponseDataItemRelationshipsTestStepData", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_list_get_response_data_item_relationships_test_step_data import ( + TeststepResultsListGetResponseDataItemRelationshipsTestStepData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TeststepResultsListGetResponseDataItemRelationshipsTestStepData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TeststepResultsListGetResponseDataItemRelationshipsTestStepData.from_dict( + _data + ) + + teststep_results_list_get_response_data_item_relationships_test_step_obj = cls( + data=data, + ) + + teststep_results_list_get_response_data_item_relationships_test_step_obj.additional_properties = ( + d + ) + return teststep_results_list_get_response_data_item_relationships_test_step_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_relationships_test_step_data.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_relationships_test_step_data.py new file mode 100644 index 00000000..f9c4ea42 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_relationships_test_step_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststep_results_list_get_response_data_item_relationships_test_step_data_type import ( + TeststepResultsListGetResponseDataItemRelationshipsTestStepDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TeststepResultsListGetResponseDataItemRelationshipsTestStepData", +) + + +@_attrs_define +class TeststepResultsListGetResponseDataItemRelationshipsTestStepData: + """ + Attributes: + type (Union[Unset, TeststepResultsListGetResponseDataItemRelationshipsTestStepDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyTestStepIndex. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TeststepResultsListGetResponseDataItemRelationshipsTestStepDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TeststepResultsListGetResponseDataItemRelationshipsTestStepDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepResultsListGetResponseDataItemRelationshipsTestStepDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + teststep_results_list_get_response_data_item_relationships_test_step_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + teststep_results_list_get_response_data_item_relationships_test_step_data_obj.additional_properties = ( + d + ) + return teststep_results_list_get_response_data_item_relationships_test_step_data_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_relationships_test_step_data_type.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_relationships_test_step_data_type.py new file mode 100644 index 00000000..e7861da4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_relationships_test_step_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepResultsListGetResponseDataItemRelationshipsTestStepDataType( + str, Enum +): + TESTSTEPS = "teststeps" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_type.py new file mode 100644 index 00000000..a97f7be8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepResultsListGetResponseDataItemType(str, Enum): + TESTSTEP_RESULTS = "teststep_results" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_included_item.py new file mode 100644 index 00000000..93509277 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TeststepResultsListGetResponseIncludedItem") + + +@_attrs_define +class TeststepResultsListGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + teststep_results_list_get_response_included_item_obj = cls() + + teststep_results_list_get_response_included_item_obj.additional_properties = ( + d + ) + return teststep_results_list_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_links.py new file mode 100644 index 00000000..b4312c2e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_links.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepResultsListGetResponseLinks") + + +@_attrs_define +class TeststepResultsListGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId + /testrecords/MyProjectId/MyTestcaseId/0/teststepresults?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId + /testrecords/MyProjectId/MyTestcaseId/0/teststepresults?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId/ + testrecords/MyProjectId/MyTestcaseId/0/teststepresults?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId + /testrecords/MyProjectId/MyTestcaseId/0/teststepresults?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId/ + testrecords/MyProjectId/MyTestcaseId/0/teststepresults?page%5Bsize%5D=10&page%5Bnumber%5D=9. + """ + + self_: Union[Unset, str] = UNSET + first: Union[Unset, str] = UNSET + prev: Union[Unset, str] = UNSET + next_: Union[Unset, str] = UNSET + last: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + first = self.first + + prev = self.prev + + next_ = self.next_ + + last = self.last + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if first is not UNSET: + field_dict["first"] = first + if prev is not UNSET: + field_dict["prev"] = prev + if next_ is not UNSET: + field_dict["next"] = next_ + if last is not UNSET: + field_dict["last"] = last + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + first = d.pop("first", UNSET) + + prev = d.pop("prev", UNSET) + + next_ = d.pop("next", UNSET) + + last = d.pop("last", UNSET) + + teststep_results_list_get_response_links_obj = cls( + self_=self_, + first=first, + prev=prev, + next_=next_, + last=last, + ) + + teststep_results_list_get_response_links_obj.additional_properties = d + return teststep_results_list_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_meta.py new file mode 100644 index 00000000..9a924275 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_get_response_meta.py @@ -0,0 +1,63 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepResultsListGetResponseMeta") + + +@_attrs_define +class TeststepResultsListGetResponseMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + teststep_results_list_get_response_meta_obj = cls( + total_count=total_count, + ) + + teststep_results_list_get_response_meta_obj.additional_properties = d + return teststep_results_list_get_response_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request.py new file mode 100644 index 00000000..7b3e92fe --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_list_post_request_data_item import ( + TeststepResultsListPostRequestDataItem, + ) + + +T = TypeVar("T", bound="TeststepResultsListPostRequest") + + +@_attrs_define +class TeststepResultsListPostRequest: + """ + Attributes: + data (Union[Unset, List['TeststepResultsListPostRequestDataItem']]): + """ + + data: Union[Unset, List["TeststepResultsListPostRequestDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_list_post_request_data_item import ( + TeststepResultsListPostRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TeststepResultsListPostRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + teststep_results_list_post_request_obj = cls( + data=data, + ) + + teststep_results_list_post_request_obj.additional_properties = d + return teststep_results_list_post_request_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item.py new file mode 100644 index 00000000..207774f5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item.py @@ -0,0 +1,109 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststep_results_list_post_request_data_item_type import ( + TeststepResultsListPostRequestDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_list_post_request_data_item_attributes import ( + TeststepResultsListPostRequestDataItemAttributes, + ) + + +T = TypeVar("T", bound="TeststepResultsListPostRequestDataItem") + + +@_attrs_define +class TeststepResultsListPostRequestDataItem: + """ + Attributes: + type (Union[Unset, TeststepResultsListPostRequestDataItemType]): + attributes (Union[Unset, TeststepResultsListPostRequestDataItemAttributes]): + """ + + type: Union[Unset, TeststepResultsListPostRequestDataItemType] = UNSET + attributes: Union[ + Unset, "TeststepResultsListPostRequestDataItemAttributes" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_list_post_request_data_item_attributes import ( + TeststepResultsListPostRequestDataItemAttributes, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TeststepResultsListPostRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepResultsListPostRequestDataItemType(_type) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TeststepResultsListPostRequestDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + TeststepResultsListPostRequestDataItemAttributes.from_dict( + _attributes + ) + ) + + teststep_results_list_post_request_data_item_obj = cls( + type=type, + attributes=attributes, + ) + + teststep_results_list_post_request_data_item_obj.additional_properties = ( + d + ) + return teststep_results_list_post_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item_attributes.py new file mode 100644 index 00000000..5d6b7601 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item_attributes.py @@ -0,0 +1,97 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_list_post_request_data_item_attributes_comment import ( + TeststepResultsListPostRequestDataItemAttributesComment, + ) + + +T = TypeVar("T", bound="TeststepResultsListPostRequestDataItemAttributes") + + +@_attrs_define +class TeststepResultsListPostRequestDataItemAttributes: + """ + Attributes: + comment (Union[Unset, TeststepResultsListPostRequestDataItemAttributesComment]): + result (Union[Unset, str]): Example: passed. + """ + + comment: Union[ + Unset, "TeststepResultsListPostRequestDataItemAttributesComment" + ] = UNSET + result: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + comment: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.comment, Unset): + comment = self.comment.to_dict() + + result = self.result + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if comment is not UNSET: + field_dict["comment"] = comment + if result is not UNSET: + field_dict["result"] = result + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_list_post_request_data_item_attributes_comment import ( + TeststepResultsListPostRequestDataItemAttributesComment, + ) + + d = src_dict.copy() + _comment = d.pop("comment", UNSET) + comment: Union[ + Unset, TeststepResultsListPostRequestDataItemAttributesComment + ] + if isinstance(_comment, Unset): + comment = UNSET + else: + comment = TeststepResultsListPostRequestDataItemAttributesComment.from_dict( + _comment + ) + + result = d.pop("result", UNSET) + + teststep_results_list_post_request_data_item_attributes_obj = cls( + comment=comment, + result=result, + ) + + teststep_results_list_post_request_data_item_attributes_obj.additional_properties = ( + d + ) + return teststep_results_list_post_request_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item_attributes_comment.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item_attributes_comment.py new file mode 100644 index 00000000..b69bdf47 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item_attributes_comment.py @@ -0,0 +1,96 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststep_results_list_post_request_data_item_attributes_comment_type import ( + TeststepResultsListPostRequestDataItemAttributesCommentType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TeststepResultsListPostRequestDataItemAttributesComment" +) + + +@_attrs_define +class TeststepResultsListPostRequestDataItemAttributesComment: + """ + Attributes: + type (Union[Unset, TeststepResultsListPostRequestDataItemAttributesCommentType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TeststepResultsListPostRequestDataItemAttributesCommentType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TeststepResultsListPostRequestDataItemAttributesCommentType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepResultsListPostRequestDataItemAttributesCommentType( + _type + ) + + value = d.pop("value", UNSET) + + teststep_results_list_post_request_data_item_attributes_comment_obj = ( + cls( + type=type, + value=value, + ) + ) + + teststep_results_list_post_request_data_item_attributes_comment_obj.additional_properties = ( + d + ) + return ( + teststep_results_list_post_request_data_item_attributes_comment_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item_attributes_comment_type.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item_attributes_comment_type.py new file mode 100644 index 00000000..9a165779 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item_attributes_comment_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepResultsListPostRequestDataItemAttributesCommentType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item_type.py new file mode 100644 index 00000000..da8fffcf --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepResultsListPostRequestDataItemType(str, Enum): + TESTSTEP_RESULTS = "teststep_results" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_response.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_response.py new file mode 100644 index 00000000..af4339d8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_response.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_list_post_response_data_item import ( + TeststepResultsListPostResponseDataItem, + ) + + +T = TypeVar("T", bound="TeststepResultsListPostResponse") + + +@_attrs_define +class TeststepResultsListPostResponse: + """ + Attributes: + data (Union[Unset, List['TeststepResultsListPostResponseDataItem']]): + """ + + data: Union[Unset, List["TeststepResultsListPostResponseDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_list_post_response_data_item import ( + TeststepResultsListPostResponseDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TeststepResultsListPostResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + teststep_results_list_post_response_obj = cls( + data=data, + ) + + teststep_results_list_post_response_obj.additional_properties = d + return teststep_results_list_post_response_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_response_data_item.py new file mode 100644 index 00000000..339ee768 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_response_data_item.py @@ -0,0 +1,112 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststep_results_list_post_response_data_item_type import ( + TeststepResultsListPostResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_list_post_response_data_item_links import ( + TeststepResultsListPostResponseDataItemLinks, + ) + + +T = TypeVar("T", bound="TeststepResultsListPostResponseDataItem") + + +@_attrs_define +class TeststepResultsListPostResponseDataItem: + """ + Attributes: + type (Union[Unset, TeststepResultsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyProjectId/MyTestcaseId/0/1. + links (Union[Unset, TeststepResultsListPostResponseDataItemLinks]): + """ + + type: Union[Unset, TeststepResultsListPostResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + links: Union[Unset, "TeststepResultsListPostResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_list_post_response_data_item_links import ( + TeststepResultsListPostResponseDataItemLinks, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TeststepResultsListPostResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepResultsListPostResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[Unset, TeststepResultsListPostResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TeststepResultsListPostResponseDataItemLinks.from_dict( + _links + ) + + teststep_results_list_post_response_data_item_obj = cls( + type=type, + id=id, + links=links, + ) + + teststep_results_list_post_response_data_item_obj.additional_properties = ( + d + ) + return teststep_results_list_post_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_response_data_item_links.py new file mode 100644 index 00000000..da6cfb98 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepResultsListPostResponseDataItemLinks") + + +@_attrs_define +class TeststepResultsListPostResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/testrecords/MyProjectId/MyTestcaseId/0/teststepresults/1. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + teststep_results_list_post_response_data_item_links_obj = cls( + self_=self_, + ) + + teststep_results_list_post_response_data_item_links_obj.additional_properties = ( + d + ) + return teststep_results_list_post_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_response_data_item_type.py new file mode 100644 index 00000000..186f8096 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_list_post_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepResultsListPostResponseDataItemType(str, Enum): + TESTSTEP_RESULTS = "teststep_results" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response.py b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response.py new file mode 100644 index 00000000..0b91b4c4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response.py @@ -0,0 +1,135 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_single_get_response_data import ( + TeststepResultsSingleGetResponseData, + ) + from ..models.teststep_results_single_get_response_included_item import ( + TeststepResultsSingleGetResponseIncludedItem, + ) + from ..models.teststep_results_single_get_response_links import ( + TeststepResultsSingleGetResponseLinks, + ) + + +T = TypeVar("T", bound="TeststepResultsSingleGetResponse") + + +@_attrs_define +class TeststepResultsSingleGetResponse: + """ + Attributes: + data (Union[Unset, TeststepResultsSingleGetResponseData]): + included (Union[Unset, List['TeststepResultsSingleGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, TeststepResultsSingleGetResponseLinks]): + """ + + data: Union[Unset, "TeststepResultsSingleGetResponseData"] = UNSET + included: Union[ + Unset, List["TeststepResultsSingleGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "TeststepResultsSingleGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_single_get_response_data import ( + TeststepResultsSingleGetResponseData, + ) + from ..models.teststep_results_single_get_response_included_item import ( + TeststepResultsSingleGetResponseIncludedItem, + ) + from ..models.teststep_results_single_get_response_links import ( + TeststepResultsSingleGetResponseLinks, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, TeststepResultsSingleGetResponseData] + if isinstance(_data, Unset): + data = UNSET + else: + data = TeststepResultsSingleGetResponseData.from_dict(_data) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + TeststepResultsSingleGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TeststepResultsSingleGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TeststepResultsSingleGetResponseLinks.from_dict(_links) + + teststep_results_single_get_response_obj = cls( + data=data, + included=included, + links=links, + ) + + teststep_results_single_get_response_obj.additional_properties = d + return teststep_results_single_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data.py new file mode 100644 index 00000000..806b71d4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data.py @@ -0,0 +1,199 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststep_results_single_get_response_data_type import ( + TeststepResultsSingleGetResponseDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_single_get_response_data_attributes import ( + TeststepResultsSingleGetResponseDataAttributes, + ) + from ..models.teststep_results_single_get_response_data_links import ( + TeststepResultsSingleGetResponseDataLinks, + ) + from ..models.teststep_results_single_get_response_data_meta import ( + TeststepResultsSingleGetResponseDataMeta, + ) + from ..models.teststep_results_single_get_response_data_relationships import ( + TeststepResultsSingleGetResponseDataRelationships, + ) + + +T = TypeVar("T", bound="TeststepResultsSingleGetResponseData") + + +@_attrs_define +class TeststepResultsSingleGetResponseData: + """ + Attributes: + type (Union[Unset, TeststepResultsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/MyProjectId/MyTestcaseId/0/1. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TeststepResultsSingleGetResponseDataAttributes]): + relationships (Union[Unset, TeststepResultsSingleGetResponseDataRelationships]): + meta (Union[Unset, TeststepResultsSingleGetResponseDataMeta]): + links (Union[Unset, TeststepResultsSingleGetResponseDataLinks]): + """ + + type: Union[Unset, TeststepResultsSingleGetResponseDataType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TeststepResultsSingleGetResponseDataAttributes" + ] = UNSET + relationships: Union[ + Unset, "TeststepResultsSingleGetResponseDataRelationships" + ] = UNSET + meta: Union[Unset, "TeststepResultsSingleGetResponseDataMeta"] = UNSET + links: Union[Unset, "TeststepResultsSingleGetResponseDataLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_single_get_response_data_attributes import ( + TeststepResultsSingleGetResponseDataAttributes, + ) + from ..models.teststep_results_single_get_response_data_links import ( + TeststepResultsSingleGetResponseDataLinks, + ) + from ..models.teststep_results_single_get_response_data_meta import ( + TeststepResultsSingleGetResponseDataMeta, + ) + from ..models.teststep_results_single_get_response_data_relationships import ( + TeststepResultsSingleGetResponseDataRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TeststepResultsSingleGetResponseDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepResultsSingleGetResponseDataType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TeststepResultsSingleGetResponseDataAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + TeststepResultsSingleGetResponseDataAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TeststepResultsSingleGetResponseDataRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + TeststepResultsSingleGetResponseDataRelationships.from_dict( + _relationships + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TeststepResultsSingleGetResponseDataMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TeststepResultsSingleGetResponseDataMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, TeststepResultsSingleGetResponseDataLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TeststepResultsSingleGetResponseDataLinks.from_dict(_links) + + teststep_results_single_get_response_data_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + teststep_results_single_get_response_data_obj.additional_properties = d + return teststep_results_single_get_response_data_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_attributes.py new file mode 100644 index 00000000..bbd4a7b5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_attributes.py @@ -0,0 +1,97 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_single_get_response_data_attributes_comment import ( + TeststepResultsSingleGetResponseDataAttributesComment, + ) + + +T = TypeVar("T", bound="TeststepResultsSingleGetResponseDataAttributes") + + +@_attrs_define +class TeststepResultsSingleGetResponseDataAttributes: + """ + Attributes: + comment (Union[Unset, TeststepResultsSingleGetResponseDataAttributesComment]): + result (Union[Unset, str]): Example: passed. + """ + + comment: Union[ + Unset, "TeststepResultsSingleGetResponseDataAttributesComment" + ] = UNSET + result: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + comment: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.comment, Unset): + comment = self.comment.to_dict() + + result = self.result + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if comment is not UNSET: + field_dict["comment"] = comment + if result is not UNSET: + field_dict["result"] = result + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_single_get_response_data_attributes_comment import ( + TeststepResultsSingleGetResponseDataAttributesComment, + ) + + d = src_dict.copy() + _comment = d.pop("comment", UNSET) + comment: Union[ + Unset, TeststepResultsSingleGetResponseDataAttributesComment + ] + if isinstance(_comment, Unset): + comment = UNSET + else: + comment = TeststepResultsSingleGetResponseDataAttributesComment.from_dict( + _comment + ) + + result = d.pop("result", UNSET) + + teststep_results_single_get_response_data_attributes_obj = cls( + comment=comment, + result=result, + ) + + teststep_results_single_get_response_data_attributes_obj.additional_properties = ( + d + ) + return teststep_results_single_get_response_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_attributes_comment.py b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_attributes_comment.py new file mode 100644 index 00000000..66381748 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_attributes_comment.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststep_results_single_get_response_data_attributes_comment_type import ( + TeststepResultsSingleGetResponseDataAttributesCommentType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepResultsSingleGetResponseDataAttributesComment") + + +@_attrs_define +class TeststepResultsSingleGetResponseDataAttributesComment: + """ + Attributes: + type (Union[Unset, TeststepResultsSingleGetResponseDataAttributesCommentType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TeststepResultsSingleGetResponseDataAttributesCommentType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TeststepResultsSingleGetResponseDataAttributesCommentType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepResultsSingleGetResponseDataAttributesCommentType( + _type + ) + + value = d.pop("value", UNSET) + + teststep_results_single_get_response_data_attributes_comment_obj = cls( + type=type, + value=value, + ) + + teststep_results_single_get_response_data_attributes_comment_obj.additional_properties = ( + d + ) + return teststep_results_single_get_response_data_attributes_comment_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_attributes_comment_type.py b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_attributes_comment_type.py new file mode 100644 index 00000000..2a28124a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_attributes_comment_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepResultsSingleGetResponseDataAttributesCommentType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_links.py new file mode 100644 index 00000000..ce0497b1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepResultsSingleGetResponseDataLinks") + + +@_attrs_define +class TeststepResultsSingleGetResponseDataLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/testrecords/MyProjectId/MyTestcaseId/0/teststepresults/1. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + teststep_results_single_get_response_data_links_obj = cls( + self_=self_, + ) + + teststep_results_single_get_response_data_links_obj.additional_properties = ( + d + ) + return teststep_results_single_get_response_data_links_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_meta.py new file mode 100644 index 00000000..3dadf537 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_meta.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_single_get_response_data_meta_errors_item import ( + TeststepResultsSingleGetResponseDataMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TeststepResultsSingleGetResponseDataMeta") + + +@_attrs_define +class TeststepResultsSingleGetResponseDataMeta: + """ + Attributes: + errors (Union[Unset, List['TeststepResultsSingleGetResponseDataMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["TeststepResultsSingleGetResponseDataMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_single_get_response_data_meta_errors_item import ( + TeststepResultsSingleGetResponseDataMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ( + TeststepResultsSingleGetResponseDataMetaErrorsItem.from_dict( + errors_item_data + ) + ) + + errors.append(errors_item) + + teststep_results_single_get_response_data_meta_obj = cls( + errors=errors, + ) + + teststep_results_single_get_response_data_meta_obj.additional_properties = ( + d + ) + return teststep_results_single_get_response_data_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_meta_errors_item.py new file mode 100644 index 00000000..6cc701db --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_meta_errors_item.py @@ -0,0 +1,116 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_single_get_response_data_meta_errors_item_source import ( + TeststepResultsSingleGetResponseDataMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="TeststepResultsSingleGetResponseDataMetaErrorsItem") + + +@_attrs_define +class TeststepResultsSingleGetResponseDataMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TeststepResultsSingleGetResponseDataMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "TeststepResultsSingleGetResponseDataMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_single_get_response_data_meta_errors_item_source import ( + TeststepResultsSingleGetResponseDataMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, TeststepResultsSingleGetResponseDataMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = TeststepResultsSingleGetResponseDataMetaErrorsItemSource.from_dict( + _source + ) + + teststep_results_single_get_response_data_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + teststep_results_single_get_response_data_meta_errors_item_obj.additional_properties = ( + d + ) + return teststep_results_single_get_response_data_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_meta_errors_item_source.py new file mode 100644 index 00000000..58deff3b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_meta_errors_item_source.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_single_get_response_data_meta_errors_item_source_resource import ( + TeststepResultsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", bound="TeststepResultsSingleGetResponseDataMetaErrorsItemSource" +) + + +@_attrs_define +class TeststepResultsSingleGetResponseDataMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TeststepResultsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the + error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "TeststepResultsSingleGetResponseDataMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_single_get_response_data_meta_errors_item_source_resource import ( + TeststepResultsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + TeststepResultsSingleGetResponseDataMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TeststepResultsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + + teststep_results_single_get_response_data_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + teststep_results_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( + d + ) + return teststep_results_single_get_response_data_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..8ffd4cba --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TeststepResultsSingleGetResponseDataMetaErrorsItemSourceResource", +) + + +@_attrs_define +class TeststepResultsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + teststep_results_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + teststep_results_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return teststep_results_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_relationships.py new file mode 100644 index 00000000..29454288 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_relationships.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_single_get_response_data_relationships_test_step import ( + TeststepResultsSingleGetResponseDataRelationshipsTestStep, + ) + + +T = TypeVar("T", bound="TeststepResultsSingleGetResponseDataRelationships") + + +@_attrs_define +class TeststepResultsSingleGetResponseDataRelationships: + """ + Attributes: + test_step (Union[Unset, TeststepResultsSingleGetResponseDataRelationshipsTestStep]): + """ + + test_step: Union[ + Unset, "TeststepResultsSingleGetResponseDataRelationshipsTestStep" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + test_step: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.test_step, Unset): + test_step = self.test_step.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if test_step is not UNSET: + field_dict["testStep"] = test_step + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_single_get_response_data_relationships_test_step import ( + TeststepResultsSingleGetResponseDataRelationshipsTestStep, + ) + + d = src_dict.copy() + _test_step = d.pop("testStep", UNSET) + test_step: Union[ + Unset, TeststepResultsSingleGetResponseDataRelationshipsTestStep + ] + if isinstance(_test_step, Unset): + test_step = UNSET + else: + test_step = TeststepResultsSingleGetResponseDataRelationshipsTestStep.from_dict( + _test_step + ) + + teststep_results_single_get_response_data_relationships_obj = cls( + test_step=test_step, + ) + + teststep_results_single_get_response_data_relationships_obj.additional_properties = ( + d + ) + return teststep_results_single_get_response_data_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_relationships_test_step.py b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_relationships_test_step.py new file mode 100644 index 00000000..8e714fbd --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_relationships_test_step.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststep_results_single_get_response_data_relationships_test_step_data import ( + TeststepResultsSingleGetResponseDataRelationshipsTestStepData, + ) + + +T = TypeVar( + "T", bound="TeststepResultsSingleGetResponseDataRelationshipsTestStep" +) + + +@_attrs_define +class TeststepResultsSingleGetResponseDataRelationshipsTestStep: + """ + Attributes: + data (Union[Unset, TeststepResultsSingleGetResponseDataRelationshipsTestStepData]): + """ + + data: Union[ + Unset, "TeststepResultsSingleGetResponseDataRelationshipsTestStepData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststep_results_single_get_response_data_relationships_test_step_data import ( + TeststepResultsSingleGetResponseDataRelationshipsTestStepData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TeststepResultsSingleGetResponseDataRelationshipsTestStepData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TeststepResultsSingleGetResponseDataRelationshipsTestStepData.from_dict( + _data + ) + + teststep_results_single_get_response_data_relationships_test_step_obj = cls( + data=data, + ) + + teststep_results_single_get_response_data_relationships_test_step_obj.additional_properties = ( + d + ) + return teststep_results_single_get_response_data_relationships_test_step_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_relationships_test_step_data.py b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_relationships_test_step_data.py new file mode 100644 index 00000000..0da39fad --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_relationships_test_step_data.py @@ -0,0 +1,103 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststep_results_single_get_response_data_relationships_test_step_data_type import ( + TeststepResultsSingleGetResponseDataRelationshipsTestStepDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TeststepResultsSingleGetResponseDataRelationshipsTestStepData" +) + + +@_attrs_define +class TeststepResultsSingleGetResponseDataRelationshipsTestStepData: + """ + Attributes: + type (Union[Unset, TeststepResultsSingleGetResponseDataRelationshipsTestStepDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyTestStepIndex. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TeststepResultsSingleGetResponseDataRelationshipsTestStepDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TeststepResultsSingleGetResponseDataRelationshipsTestStepDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepResultsSingleGetResponseDataRelationshipsTestStepDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + teststep_results_single_get_response_data_relationships_test_step_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + teststep_results_single_get_response_data_relationships_test_step_data_obj.additional_properties = ( + d + ) + return teststep_results_single_get_response_data_relationships_test_step_data_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_relationships_test_step_data_type.py b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_relationships_test_step_data_type.py new file mode 100644 index 00000000..0cd88431 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_relationships_test_step_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepResultsSingleGetResponseDataRelationshipsTestStepDataType( + str, Enum +): + TESTSTEPS = "teststeps" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_type.py b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_type.py new file mode 100644 index 00000000..de29fea8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepResultsSingleGetResponseDataType(str, Enum): + TESTSTEP_RESULTS = "teststep_results" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_included_item.py new file mode 100644 index 00000000..13d3eed8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TeststepResultsSingleGetResponseIncludedItem") + + +@_attrs_define +class TeststepResultsSingleGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + teststep_results_single_get_response_included_item_obj = cls() + + teststep_results_single_get_response_included_item_obj.additional_properties = ( + d + ) + return teststep_results_single_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_links.py new file mode 100644 index 00000000..fd31652e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststep_results_single_get_response_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepResultsSingleGetResponseLinks") + + +@_attrs_define +class TeststepResultsSingleGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/testruns/MyTestRunId/testrecords/MyProjectId/MyTestcaseId/0/teststepresults/1. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + teststep_results_single_get_response_links_obj = cls( + self_=self_, + ) + + teststep_results_single_get_response_links_obj.additional_properties = ( + d + ) + return teststep_results_single_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response.py new file mode 100644 index 00000000..88d55ec1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response.py @@ -0,0 +1,174 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_list_get_response_data_item import ( + TeststepresultAttachmentsListGetResponseDataItem, + ) + from ..models.teststepresult_attachments_list_get_response_included_item import ( + TeststepresultAttachmentsListGetResponseIncludedItem, + ) + from ..models.teststepresult_attachments_list_get_response_links import ( + TeststepresultAttachmentsListGetResponseLinks, + ) + from ..models.teststepresult_attachments_list_get_response_meta import ( + TeststepresultAttachmentsListGetResponseMeta, + ) + + +T = TypeVar("T", bound="TeststepresultAttachmentsListGetResponse") + + +@_attrs_define +class TeststepresultAttachmentsListGetResponse: + """ + Attributes: + meta (Union[Unset, TeststepresultAttachmentsListGetResponseMeta]): + data (Union[Unset, List['TeststepresultAttachmentsListGetResponseDataItem']]): + included (Union[Unset, List['TeststepresultAttachmentsListGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, TeststepresultAttachmentsListGetResponseLinks]): + """ + + meta: Union[Unset, "TeststepresultAttachmentsListGetResponseMeta"] = UNSET + data: Union[ + Unset, List["TeststepresultAttachmentsListGetResponseDataItem"] + ] = UNSET + included: Union[ + Unset, List["TeststepresultAttachmentsListGetResponseIncludedItem"] + ] = UNSET + links: Union[ + Unset, "TeststepresultAttachmentsListGetResponseLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_list_get_response_data_item import ( + TeststepresultAttachmentsListGetResponseDataItem, + ) + from ..models.teststepresult_attachments_list_get_response_included_item import ( + TeststepresultAttachmentsListGetResponseIncludedItem, + ) + from ..models.teststepresult_attachments_list_get_response_links import ( + TeststepresultAttachmentsListGetResponseLinks, + ) + from ..models.teststepresult_attachments_list_get_response_meta import ( + TeststepresultAttachmentsListGetResponseMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TeststepresultAttachmentsListGetResponseMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TeststepresultAttachmentsListGetResponseMeta.from_dict( + _meta + ) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = ( + TeststepresultAttachmentsListGetResponseDataItem.from_dict( + data_item_data + ) + ) + + data.append(data_item) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + TeststepresultAttachmentsListGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TeststepresultAttachmentsListGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TeststepresultAttachmentsListGetResponseLinks.from_dict( + _links + ) + + teststepresult_attachments_list_get_response_obj = cls( + meta=meta, + data=data, + included=included, + links=links, + ) + + teststepresult_attachments_list_get_response_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item.py new file mode 100644 index 00000000..760b0bde --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item.py @@ -0,0 +1,216 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststepresult_attachments_list_get_response_data_item_type import ( + TeststepresultAttachmentsListGetResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_list_get_response_data_item_attributes import ( + TeststepresultAttachmentsListGetResponseDataItemAttributes, + ) + from ..models.teststepresult_attachments_list_get_response_data_item_links import ( + TeststepresultAttachmentsListGetResponseDataItemLinks, + ) + from ..models.teststepresult_attachments_list_get_response_data_item_meta import ( + TeststepresultAttachmentsListGetResponseDataItemMeta, + ) + from ..models.teststepresult_attachments_list_get_response_data_item_relationships import ( + TeststepresultAttachmentsListGetResponseDataItemRelationships, + ) + + +T = TypeVar("T", bound="TeststepresultAttachmentsListGetResponseDataItem") + + +@_attrs_define +class TeststepresultAttachmentsListGetResponseDataItem: + """ + Attributes: + type (Union[Unset, TeststepresultAttachmentsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/1234/MyProjectId/MyTestcaseId/0/1/MyAttachmentId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TeststepresultAttachmentsListGetResponseDataItemAttributes]): + relationships (Union[Unset, TeststepresultAttachmentsListGetResponseDataItemRelationships]): + meta (Union[Unset, TeststepresultAttachmentsListGetResponseDataItemMeta]): + links (Union[Unset, TeststepresultAttachmentsListGetResponseDataItemLinks]): + """ + + type: Union[ + Unset, TeststepresultAttachmentsListGetResponseDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TeststepresultAttachmentsListGetResponseDataItemAttributes" + ] = UNSET + relationships: Union[ + Unset, "TeststepresultAttachmentsListGetResponseDataItemRelationships" + ] = UNSET + meta: Union[ + Unset, "TeststepresultAttachmentsListGetResponseDataItemMeta" + ] = UNSET + links: Union[ + Unset, "TeststepresultAttachmentsListGetResponseDataItemLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_list_get_response_data_item_attributes import ( + TeststepresultAttachmentsListGetResponseDataItemAttributes, + ) + from ..models.teststepresult_attachments_list_get_response_data_item_links import ( + TeststepresultAttachmentsListGetResponseDataItemLinks, + ) + from ..models.teststepresult_attachments_list_get_response_data_item_meta import ( + TeststepresultAttachmentsListGetResponseDataItemMeta, + ) + from ..models.teststepresult_attachments_list_get_response_data_item_relationships import ( + TeststepresultAttachmentsListGetResponseDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TeststepresultAttachmentsListGetResponseDataItemType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepresultAttachmentsListGetResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TeststepresultAttachmentsListGetResponseDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TeststepresultAttachmentsListGetResponseDataItemAttributes.from_dict( + _attributes + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, + TeststepresultAttachmentsListGetResponseDataItemRelationships, + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = TeststepresultAttachmentsListGetResponseDataItemRelationships.from_dict( + _relationships + ) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, TeststepresultAttachmentsListGetResponseDataItemMeta + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = ( + TeststepresultAttachmentsListGetResponseDataItemMeta.from_dict( + _meta + ) + ) + + _links = d.pop("links", UNSET) + links: Union[ + Unset, TeststepresultAttachmentsListGetResponseDataItemLinks + ] + if isinstance(_links, Unset): + links = UNSET + else: + links = TeststepresultAttachmentsListGetResponseDataItemLinks.from_dict( + _links + ) + + teststepresult_attachments_list_get_response_data_item_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + teststepresult_attachments_list_get_response_data_item_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_get_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_attributes.py new file mode 100644 index 00000000..b04d5a00 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_attributes.py @@ -0,0 +1,112 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TeststepresultAttachmentsListGetResponseDataItemAttributes" +) + + +@_attrs_define +class TeststepresultAttachmentsListGetResponseDataItemAttributes: + """ + Attributes: + file_name (Union[Unset, str]): Example: File Name. + id (Union[Unset, str]): Example: MyAttachmentId. + length (Union[Unset, int]): + title (Union[Unset, str]): Example: Title. + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + """ + + file_name: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + length: Union[Unset, int] = UNSET + title: Union[Unset, str] = UNSET + updated: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + file_name = self.file_name + + id = self.id + + length = self.length + + title = self.title + + updated: Union[Unset, str] = UNSET + if not isinstance(self.updated, Unset): + updated = self.updated.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if file_name is not UNSET: + field_dict["fileName"] = file_name + if id is not UNSET: + field_dict["id"] = id + if length is not UNSET: + field_dict["length"] = length + if title is not UNSET: + field_dict["title"] = title + if updated is not UNSET: + field_dict["updated"] = updated + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + file_name = d.pop("fileName", UNSET) + + id = d.pop("id", UNSET) + + length = d.pop("length", UNSET) + + title = d.pop("title", UNSET) + + _updated = d.pop("updated", UNSET) + updated: Union[Unset, datetime.datetime] + if isinstance(_updated, Unset): + updated = UNSET + else: + updated = isoparse(_updated) + + teststepresult_attachments_list_get_response_data_item_attributes_obj = cls( + file_name=file_name, + id=id, + length=length, + title=title, + updated=updated, + ) + + teststepresult_attachments_list_get_response_data_item_attributes_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_get_response_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_links.py new file mode 100644 index 00000000..7b058d2b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_links.py @@ -0,0 +1,76 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepresultAttachmentsListGetResponseDataItemLinks") + + +@_attrs_define +class TeststepresultAttachmentsListGetResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId + /testrecords/MyProjectId/MyTestcaseId/0/teststepresults/1/attachments/MyAttachmentId?revision=1234. + content (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRun + Id/testrecords/MyProjectId/MyTestcaseId/0/teststepresults/1/attachments/MyAttachmentId/content?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + content: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + content = self.content + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if content is not UNSET: + field_dict["content"] = content + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + content = d.pop("content", UNSET) + + teststepresult_attachments_list_get_response_data_item_links_obj = cls( + self_=self_, + content=content, + ) + + teststepresult_attachments_list_get_response_data_item_links_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_get_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_meta.py new file mode 100644 index 00000000..dcd358fd --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_meta.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_list_get_response_data_item_meta_errors_item import ( + TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TeststepresultAttachmentsListGetResponseDataItemMeta") + + +@_attrs_define +class TeststepresultAttachmentsListGetResponseDataItemMeta: + """ + Attributes: + errors (Union[Unset, List['TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItem']]): + """ + + errors: Union[ + Unset, + List["TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItem"], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_list_get_response_data_item_meta_errors_item import ( + TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItem.from_dict( + errors_item_data + ) + + errors.append(errors_item) + + teststepresult_attachments_list_get_response_data_item_meta_obj = cls( + errors=errors, + ) + + teststepresult_attachments_list_get_response_data_item_meta_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_get_response_data_item_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_meta_errors_item.py new file mode 100644 index 00000000..de58e29a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_meta_errors_item.py @@ -0,0 +1,120 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_list_get_response_data_item_meta_errors_item_source import ( + TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSource, + ) + + +T = TypeVar( + "T", bound="TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItem" +) + + +@_attrs_define +class TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, + "TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_list_get_response_data_item_meta_errors_item_source import ( + TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, + TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSource, + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSource.from_dict( + _source + ) + + teststepresult_attachments_list_get_response_data_item_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + teststepresult_attachments_list_get_response_data_item_meta_errors_item_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_get_response_data_item_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_meta_errors_item_source.py new file mode 100644 index 00000000..3966c3ef --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_meta_errors_item_source.py @@ -0,0 +1,112 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_list_get_response_data_item_meta_errors_item_source_resource import ( + TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", + bound="TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSource", +) + + +@_attrs_define +class TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource + causing the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_list_get_response_data_item_meta_errors_item_source_resource import ( + TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + + teststepresult_attachments_list_get_response_data_item_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + teststepresult_attachments_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_get_response_data_item_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..71f395ad --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource", +) + + +@_attrs_define +class TeststepresultAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + teststepresult_attachments_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + teststepresult_attachments_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships.py new file mode 100644 index 00000000..de714339 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships.py @@ -0,0 +1,122 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_list_get_response_data_item_relationships_author import ( + TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthor, + ) + from ..models.teststepresult_attachments_list_get_response_data_item_relationships_project import ( + TeststepresultAttachmentsListGetResponseDataItemRelationshipsProject, + ) + + +T = TypeVar( + "T", bound="TeststepresultAttachmentsListGetResponseDataItemRelationships" +) + + +@_attrs_define +class TeststepresultAttachmentsListGetResponseDataItemRelationships: + """ + Attributes: + author (Union[Unset, TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthor]): + project (Union[Unset, TeststepresultAttachmentsListGetResponseDataItemRelationshipsProject]): + """ + + author: Union[ + Unset, + "TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthor", + ] = UNSET + project: Union[ + Unset, + "TeststepresultAttachmentsListGetResponseDataItemRelationshipsProject", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + author: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.author, Unset): + author = self.author.to_dict() + + project: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project, Unset): + project = self.project.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if author is not UNSET: + field_dict["author"] = author + if project is not UNSET: + field_dict["project"] = project + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_list_get_response_data_item_relationships_author import ( + TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthor, + ) + from ..models.teststepresult_attachments_list_get_response_data_item_relationships_project import ( + TeststepresultAttachmentsListGetResponseDataItemRelationshipsProject, + ) + + d = src_dict.copy() + _author = d.pop("author", UNSET) + author: Union[ + Unset, + TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthor, + ] + if isinstance(_author, Unset): + author = UNSET + else: + author = TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthor.from_dict( + _author + ) + + _project = d.pop("project", UNSET) + project: Union[ + Unset, + TeststepresultAttachmentsListGetResponseDataItemRelationshipsProject, + ] + if isinstance(_project, Unset): + project = UNSET + else: + project = TeststepresultAttachmentsListGetResponseDataItemRelationshipsProject.from_dict( + _project + ) + + teststepresult_attachments_list_get_response_data_item_relationships_obj = cls( + author=author, + project=project, + ) + + teststepresult_attachments_list_get_response_data_item_relationships_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_get_response_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_author.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_author.py new file mode 100644 index 00000000..6d41bdeb --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_author.py @@ -0,0 +1,93 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_list_get_response_data_item_relationships_author_data import ( + TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthorData, + ) + + +T = TypeVar( + "T", + bound="TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthor", +) + + +@_attrs_define +class TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthor: + """ + Attributes: + data (Union[Unset, TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthorData]): + """ + + data: Union[ + Unset, + "TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthorData", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_list_get_response_data_item_relationships_author_data import ( + TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthorData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthorData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthorData.from_dict( + _data + ) + + teststepresult_attachments_list_get_response_data_item_relationships_author_obj = cls( + data=data, + ) + + teststepresult_attachments_list_get_response_data_item_relationships_author_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_get_response_data_item_relationships_author_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_author_data.py new file mode 100644 index 00000000..0690f3ea --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_author_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststepresult_attachments_list_get_response_data_item_relationships_author_data_type import ( + TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthorDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthorData", +) + + +@_attrs_define +class TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthorData: + """ + Attributes: + type (Union[Unset, TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthorDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthorDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthorDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + teststepresult_attachments_list_get_response_data_item_relationships_author_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + teststepresult_attachments_list_get_response_data_item_relationships_author_data_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_get_response_data_item_relationships_author_data_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_author_data_type.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_author_data_type.py new file mode 100644 index 00000000..21d2610e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_author_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepresultAttachmentsListGetResponseDataItemRelationshipsAuthorDataType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_project.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_project.py new file mode 100644 index 00000000..6fd44594 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_project.py @@ -0,0 +1,93 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_list_get_response_data_item_relationships_project_data import ( + TeststepresultAttachmentsListGetResponseDataItemRelationshipsProjectData, + ) + + +T = TypeVar( + "T", + bound="TeststepresultAttachmentsListGetResponseDataItemRelationshipsProject", +) + + +@_attrs_define +class TeststepresultAttachmentsListGetResponseDataItemRelationshipsProject: + """ + Attributes: + data (Union[Unset, TeststepresultAttachmentsListGetResponseDataItemRelationshipsProjectData]): + """ + + data: Union[ + Unset, + "TeststepresultAttachmentsListGetResponseDataItemRelationshipsProjectData", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_list_get_response_data_item_relationships_project_data import ( + TeststepresultAttachmentsListGetResponseDataItemRelationshipsProjectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TeststepresultAttachmentsListGetResponseDataItemRelationshipsProjectData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TeststepresultAttachmentsListGetResponseDataItemRelationshipsProjectData.from_dict( + _data + ) + + teststepresult_attachments_list_get_response_data_item_relationships_project_obj = cls( + data=data, + ) + + teststepresult_attachments_list_get_response_data_item_relationships_project_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_get_response_data_item_relationships_project_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_project_data.py new file mode 100644 index 00000000..11528cb3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_project_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststepresult_attachments_list_get_response_data_item_relationships_project_data_type import ( + TeststepresultAttachmentsListGetResponseDataItemRelationshipsProjectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TeststepresultAttachmentsListGetResponseDataItemRelationshipsProjectData", +) + + +@_attrs_define +class TeststepresultAttachmentsListGetResponseDataItemRelationshipsProjectData: + """ + Attributes: + type (Union[Unset, TeststepresultAttachmentsListGetResponseDataItemRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TeststepresultAttachmentsListGetResponseDataItemRelationshipsProjectDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TeststepresultAttachmentsListGetResponseDataItemRelationshipsProjectDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepresultAttachmentsListGetResponseDataItemRelationshipsProjectDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + teststepresult_attachments_list_get_response_data_item_relationships_project_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + teststepresult_attachments_list_get_response_data_item_relationships_project_data_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_get_response_data_item_relationships_project_data_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_project_data_type.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_project_data_type.py new file mode 100644 index 00000000..beeb10ca --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_relationships_project_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepresultAttachmentsListGetResponseDataItemRelationshipsProjectDataType( + str, Enum +): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_type.py new file mode 100644 index 00000000..1f174367 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepresultAttachmentsListGetResponseDataItemType(str, Enum): + TESTSTEPRESULT_ATTACHMENTS = "teststepresult_attachments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_included_item.py new file mode 100644 index 00000000..7aa209bc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TeststepresultAttachmentsListGetResponseIncludedItem") + + +@_attrs_define +class TeststepresultAttachmentsListGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + teststepresult_attachments_list_get_response_included_item_obj = cls() + + teststepresult_attachments_list_get_response_included_item_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_links.py new file mode 100644 index 00000000..a4e41964 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_links.py @@ -0,0 +1,106 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepresultAttachmentsListGetResponseLinks") + + +@_attrs_define +class TeststepresultAttachmentsListGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId + /testrecords/MyProjectId/MyTestcaseId/0/teststepresults/1/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId + /testrecords/MyProjectId/MyTestcaseId/0/teststepresults/1/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId/ + testrecords/MyProjectId/MyTestcaseId/0/teststepresults/1/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId + /testrecords/MyProjectId/MyTestcaseId/0/teststepresults/1/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId/ + testrecords/MyProjectId/MyTestcaseId/0/teststepresults/1/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=9. + """ + + self_: Union[Unset, str] = UNSET + first: Union[Unset, str] = UNSET + prev: Union[Unset, str] = UNSET + next_: Union[Unset, str] = UNSET + last: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + first = self.first + + prev = self.prev + + next_ = self.next_ + + last = self.last + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if first is not UNSET: + field_dict["first"] = first + if prev is not UNSET: + field_dict["prev"] = prev + if next_ is not UNSET: + field_dict["next"] = next_ + if last is not UNSET: + field_dict["last"] = last + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + first = d.pop("first", UNSET) + + prev = d.pop("prev", UNSET) + + next_ = d.pop("next", UNSET) + + last = d.pop("last", UNSET) + + teststepresult_attachments_list_get_response_links_obj = cls( + self_=self_, + first=first, + prev=prev, + next_=next_, + last=last, + ) + + teststepresult_attachments_list_get_response_links_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_meta.py new file mode 100644 index 00000000..d3e89a04 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_get_response_meta.py @@ -0,0 +1,65 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepresultAttachmentsListGetResponseMeta") + + +@_attrs_define +class TeststepresultAttachmentsListGetResponseMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + teststepresult_attachments_list_get_response_meta_obj = cls( + total_count=total_count, + ) + + teststepresult_attachments_list_get_response_meta_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_get_response_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_request.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_request.py new file mode 100644 index 00000000..8b0ea476 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_request.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_list_post_request_data_item import ( + TeststepresultAttachmentsListPostRequestDataItem, + ) + + +T = TypeVar("T", bound="TeststepresultAttachmentsListPostRequest") + + +@_attrs_define +class TeststepresultAttachmentsListPostRequest: + """ + Attributes: + data (Union[Unset, List['TeststepresultAttachmentsListPostRequestDataItem']]): + """ + + data: Union[ + Unset, List["TeststepresultAttachmentsListPostRequestDataItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_list_post_request_data_item import ( + TeststepresultAttachmentsListPostRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = ( + TeststepresultAttachmentsListPostRequestDataItem.from_dict( + data_item_data + ) + ) + + data.append(data_item) + + teststepresult_attachments_list_post_request_obj = cls( + data=data, + ) + + teststepresult_attachments_list_post_request_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_post_request_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_request_data_item.py new file mode 100644 index 00000000..d5fa3737 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_request_data_item.py @@ -0,0 +1,120 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststepresult_attachments_list_post_request_data_item_type import ( + TeststepresultAttachmentsListPostRequestDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_list_post_request_data_item_attributes import ( + TeststepresultAttachmentsListPostRequestDataItemAttributes, + ) + + +T = TypeVar("T", bound="TeststepresultAttachmentsListPostRequestDataItem") + + +@_attrs_define +class TeststepresultAttachmentsListPostRequestDataItem: + """ + Attributes: + type (Union[Unset, TeststepresultAttachmentsListPostRequestDataItemType]): + lid (Union[Unset, str]): + attributes (Union[Unset, TeststepresultAttachmentsListPostRequestDataItemAttributes]): + """ + + type: Union[ + Unset, TeststepresultAttachmentsListPostRequestDataItemType + ] = UNSET + lid: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TeststepresultAttachmentsListPostRequestDataItemAttributes" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + lid = self.lid + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if lid is not UNSET: + field_dict["lid"] = lid + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_list_post_request_data_item_attributes import ( + TeststepresultAttachmentsListPostRequestDataItemAttributes, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TeststepresultAttachmentsListPostRequestDataItemType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepresultAttachmentsListPostRequestDataItemType(_type) + + lid = d.pop("lid", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TeststepresultAttachmentsListPostRequestDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TeststepresultAttachmentsListPostRequestDataItemAttributes.from_dict( + _attributes + ) + + teststepresult_attachments_list_post_request_data_item_obj = cls( + type=type, + lid=lid, + attributes=attributes, + ) + + teststepresult_attachments_list_post_request_data_item_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_post_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_request_data_item_attributes.py new file mode 100644 index 00000000..299e93e7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_request_data_item_attributes.py @@ -0,0 +1,76 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TeststepresultAttachmentsListPostRequestDataItemAttributes" +) + + +@_attrs_define +class TeststepresultAttachmentsListPostRequestDataItemAttributes: + """ + Attributes: + file_name (Union[Unset, str]): Example: File Name. + title (Union[Unset, str]): Example: Title. + """ + + file_name: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + file_name = self.file_name + + title = self.title + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if file_name is not UNSET: + field_dict["fileName"] = file_name + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + file_name = d.pop("fileName", UNSET) + + title = d.pop("title", UNSET) + + teststepresult_attachments_list_post_request_data_item_attributes_obj = cls( + file_name=file_name, + title=title, + ) + + teststepresult_attachments_list_post_request_data_item_attributes_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_post_request_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_request_data_item_type.py new file mode 100644 index 00000000..183dcf3c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepresultAttachmentsListPostRequestDataItemType(str, Enum): + TESTSTEPRESULT_ATTACHMENTS = "teststepresult_attachments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_response.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_response.py new file mode 100644 index 00000000..f0b59a0e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_response.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_list_post_response_data_item import ( + TeststepresultAttachmentsListPostResponseDataItem, + ) + + +T = TypeVar("T", bound="TeststepresultAttachmentsListPostResponse") + + +@_attrs_define +class TeststepresultAttachmentsListPostResponse: + """ + Attributes: + data (Union[Unset, List['TeststepresultAttachmentsListPostResponseDataItem']]): + """ + + data: Union[ + Unset, List["TeststepresultAttachmentsListPostResponseDataItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_list_post_response_data_item import ( + TeststepresultAttachmentsListPostResponseDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = ( + TeststepresultAttachmentsListPostResponseDataItem.from_dict( + data_item_data + ) + ) + + data.append(data_item) + + teststepresult_attachments_list_post_response_obj = cls( + data=data, + ) + + teststepresult_attachments_list_post_response_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_post_response_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_response_data_item.py new file mode 100644 index 00000000..6c202eca --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_response_data_item.py @@ -0,0 +1,120 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststepresult_attachments_list_post_response_data_item_type import ( + TeststepresultAttachmentsListPostResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_list_post_response_data_item_links import ( + TeststepresultAttachmentsListPostResponseDataItemLinks, + ) + + +T = TypeVar("T", bound="TeststepresultAttachmentsListPostResponseDataItem") + + +@_attrs_define +class TeststepresultAttachmentsListPostResponseDataItem: + """ + Attributes: + type (Union[Unset, TeststepresultAttachmentsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/1234/MyProjectId/MyTestcaseId/0/1/MyAttachmentId. + links (Union[Unset, TeststepresultAttachmentsListPostResponseDataItemLinks]): + """ + + type: Union[ + Unset, TeststepresultAttachmentsListPostResponseDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + links: Union[ + Unset, "TeststepresultAttachmentsListPostResponseDataItemLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_list_post_response_data_item_links import ( + TeststepresultAttachmentsListPostResponseDataItemLinks, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TeststepresultAttachmentsListPostResponseDataItemType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepresultAttachmentsListPostResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[ + Unset, TeststepresultAttachmentsListPostResponseDataItemLinks + ] + if isinstance(_links, Unset): + links = UNSET + else: + links = TeststepresultAttachmentsListPostResponseDataItemLinks.from_dict( + _links + ) + + teststepresult_attachments_list_post_response_data_item_obj = cls( + type=type, + id=id, + links=links, + ) + + teststepresult_attachments_list_post_response_data_item_obj.additional_properties = ( + d + ) + return teststepresult_attachments_list_post_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_response_data_item_links.py new file mode 100644 index 00000000..3bc1be0a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_response_data_item_links.py @@ -0,0 +1,82 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TeststepresultAttachmentsListPostResponseDataItemLinks" +) + + +@_attrs_define +class TeststepresultAttachmentsListPostResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId + /testrecords/MyProjectId/MyTestcaseId/0/teststepresults/1/attachments/MyAttachmentId?revision=1234. + content (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRun + Id/testrecords/MyProjectId/MyTestcaseId/0/teststepresults/1/attachments/MyAttachmentId/content?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + content: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + content = self.content + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if content is not UNSET: + field_dict["content"] = content + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + content = d.pop("content", UNSET) + + teststepresult_attachments_list_post_response_data_item_links_obj = ( + cls( + self_=self_, + content=content, + ) + ) + + teststepresult_attachments_list_post_response_data_item_links_obj.additional_properties = ( + d + ) + return ( + teststepresult_attachments_list_post_response_data_item_links_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_response_data_item_type.py new file mode 100644 index 00000000..12aaea8b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_list_post_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepresultAttachmentsListPostResponseDataItemType(str, Enum): + TESTSTEPRESULT_ATTACHMENTS = "teststepresult_attachments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response.py new file mode 100644 index 00000000..d2aada7d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response.py @@ -0,0 +1,143 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_single_get_response_data import ( + TeststepresultAttachmentsSingleGetResponseData, + ) + from ..models.teststepresult_attachments_single_get_response_included_item import ( + TeststepresultAttachmentsSingleGetResponseIncludedItem, + ) + from ..models.teststepresult_attachments_single_get_response_links import ( + TeststepresultAttachmentsSingleGetResponseLinks, + ) + + +T = TypeVar("T", bound="TeststepresultAttachmentsSingleGetResponse") + + +@_attrs_define +class TeststepresultAttachmentsSingleGetResponse: + """ + Attributes: + data (Union[Unset, TeststepresultAttachmentsSingleGetResponseData]): + included (Union[Unset, List['TeststepresultAttachmentsSingleGetResponseIncludedItem']]): Related entities might + be returned, see Rest API User Guide. + links (Union[Unset, TeststepresultAttachmentsSingleGetResponseLinks]): + """ + + data: Union[ + Unset, "TeststepresultAttachmentsSingleGetResponseData" + ] = UNSET + included: Union[ + Unset, List["TeststepresultAttachmentsSingleGetResponseIncludedItem"] + ] = UNSET + links: Union[ + Unset, "TeststepresultAttachmentsSingleGetResponseLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_single_get_response_data import ( + TeststepresultAttachmentsSingleGetResponseData, + ) + from ..models.teststepresult_attachments_single_get_response_included_item import ( + TeststepresultAttachmentsSingleGetResponseIncludedItem, + ) + from ..models.teststepresult_attachments_single_get_response_links import ( + TeststepresultAttachmentsSingleGetResponseLinks, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, TeststepresultAttachmentsSingleGetResponseData] + if isinstance(_data, Unset): + data = UNSET + else: + data = TeststepresultAttachmentsSingleGetResponseData.from_dict( + _data + ) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = TeststepresultAttachmentsSingleGetResponseIncludedItem.from_dict( + included_item_data + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TeststepresultAttachmentsSingleGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TeststepresultAttachmentsSingleGetResponseLinks.from_dict( + _links + ) + + teststepresult_attachments_single_get_response_obj = cls( + data=data, + included=included, + links=links, + ) + + teststepresult_attachments_single_get_response_obj.additional_properties = ( + d + ) + return teststepresult_attachments_single_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data.py new file mode 100644 index 00000000..25b93ba1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data.py @@ -0,0 +1,213 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststepresult_attachments_single_get_response_data_type import ( + TeststepresultAttachmentsSingleGetResponseDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_single_get_response_data_attributes import ( + TeststepresultAttachmentsSingleGetResponseDataAttributes, + ) + from ..models.teststepresult_attachments_single_get_response_data_links import ( + TeststepresultAttachmentsSingleGetResponseDataLinks, + ) + from ..models.teststepresult_attachments_single_get_response_data_meta import ( + TeststepresultAttachmentsSingleGetResponseDataMeta, + ) + from ..models.teststepresult_attachments_single_get_response_data_relationships import ( + TeststepresultAttachmentsSingleGetResponseDataRelationships, + ) + + +T = TypeVar("T", bound="TeststepresultAttachmentsSingleGetResponseData") + + +@_attrs_define +class TeststepresultAttachmentsSingleGetResponseData: + """ + Attributes: + type (Union[Unset, TeststepresultAttachmentsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyTestRunId/1234/MyProjectId/MyTestcaseId/0/1/MyAttachmentId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TeststepresultAttachmentsSingleGetResponseDataAttributes]): + relationships (Union[Unset, TeststepresultAttachmentsSingleGetResponseDataRelationships]): + meta (Union[Unset, TeststepresultAttachmentsSingleGetResponseDataMeta]): + links (Union[Unset, TeststepresultAttachmentsSingleGetResponseDataLinks]): + """ + + type: Union[ + Unset, TeststepresultAttachmentsSingleGetResponseDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TeststepresultAttachmentsSingleGetResponseDataAttributes" + ] = UNSET + relationships: Union[ + Unset, "TeststepresultAttachmentsSingleGetResponseDataRelationships" + ] = UNSET + meta: Union[ + Unset, "TeststepresultAttachmentsSingleGetResponseDataMeta" + ] = UNSET + links: Union[ + Unset, "TeststepresultAttachmentsSingleGetResponseDataLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_single_get_response_data_attributes import ( + TeststepresultAttachmentsSingleGetResponseDataAttributes, + ) + from ..models.teststepresult_attachments_single_get_response_data_links import ( + TeststepresultAttachmentsSingleGetResponseDataLinks, + ) + from ..models.teststepresult_attachments_single_get_response_data_meta import ( + TeststepresultAttachmentsSingleGetResponseDataMeta, + ) + from ..models.teststepresult_attachments_single_get_response_data_relationships import ( + TeststepresultAttachmentsSingleGetResponseDataRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TeststepresultAttachmentsSingleGetResponseDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepresultAttachmentsSingleGetResponseDataType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, TeststepresultAttachmentsSingleGetResponseDataAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TeststepresultAttachmentsSingleGetResponseDataAttributes.from_dict( + _attributes + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, TeststepresultAttachmentsSingleGetResponseDataRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = TeststepresultAttachmentsSingleGetResponseDataRelationships.from_dict( + _relationships + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TeststepresultAttachmentsSingleGetResponseDataMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = ( + TeststepresultAttachmentsSingleGetResponseDataMeta.from_dict( + _meta + ) + ) + + _links = d.pop("links", UNSET) + links: Union[ + Unset, TeststepresultAttachmentsSingleGetResponseDataLinks + ] + if isinstance(_links, Unset): + links = UNSET + else: + links = ( + TeststepresultAttachmentsSingleGetResponseDataLinks.from_dict( + _links + ) + ) + + teststepresult_attachments_single_get_response_data_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + teststepresult_attachments_single_get_response_data_obj.additional_properties = ( + d + ) + return teststepresult_attachments_single_get_response_data_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_attributes.py new file mode 100644 index 00000000..f4b721dc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_attributes.py @@ -0,0 +1,116 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TeststepresultAttachmentsSingleGetResponseDataAttributes" +) + + +@_attrs_define +class TeststepresultAttachmentsSingleGetResponseDataAttributes: + """ + Attributes: + file_name (Union[Unset, str]): Example: File Name. + id (Union[Unset, str]): Example: MyAttachmentId. + length (Union[Unset, int]): + title (Union[Unset, str]): Example: Title. + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + """ + + file_name: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + length: Union[Unset, int] = UNSET + title: Union[Unset, str] = UNSET + updated: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + file_name = self.file_name + + id = self.id + + length = self.length + + title = self.title + + updated: Union[Unset, str] = UNSET + if not isinstance(self.updated, Unset): + updated = self.updated.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if file_name is not UNSET: + field_dict["fileName"] = file_name + if id is not UNSET: + field_dict["id"] = id + if length is not UNSET: + field_dict["length"] = length + if title is not UNSET: + field_dict["title"] = title + if updated is not UNSET: + field_dict["updated"] = updated + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + file_name = d.pop("fileName", UNSET) + + id = d.pop("id", UNSET) + + length = d.pop("length", UNSET) + + title = d.pop("title", UNSET) + + _updated = d.pop("updated", UNSET) + updated: Union[Unset, datetime.datetime] + if isinstance(_updated, Unset): + updated = UNSET + else: + updated = isoparse(_updated) + + teststepresult_attachments_single_get_response_data_attributes_obj = ( + cls( + file_name=file_name, + id=id, + length=length, + title=title, + updated=updated, + ) + ) + + teststepresult_attachments_single_get_response_data_attributes_obj.additional_properties = ( + d + ) + return ( + teststepresult_attachments_single_get_response_data_attributes_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_links.py new file mode 100644 index 00000000..b9bed420 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_links.py @@ -0,0 +1,76 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepresultAttachmentsSingleGetResponseDataLinks") + + +@_attrs_define +class TeststepresultAttachmentsSingleGetResponseDataLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId + /testrecords/MyProjectId/MyTestcaseId/0/teststepresults/1/attachments/MyAttachmentId?revision=1234. + content (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRun + Id/testrecords/MyProjectId/MyTestcaseId/0/teststepresults/1/attachments/MyAttachmentId/content?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + content: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + content = self.content + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if content is not UNSET: + field_dict["content"] = content + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + content = d.pop("content", UNSET) + + teststepresult_attachments_single_get_response_data_links_obj = cls( + self_=self_, + content=content, + ) + + teststepresult_attachments_single_get_response_data_links_obj.additional_properties = ( + d + ) + return teststepresult_attachments_single_get_response_data_links_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_meta.py new file mode 100644 index 00000000..0c8ecc04 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_meta.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_single_get_response_data_meta_errors_item import ( + TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TeststepresultAttachmentsSingleGetResponseDataMeta") + + +@_attrs_define +class TeststepresultAttachmentsSingleGetResponseDataMeta: + """ + Attributes: + errors (Union[Unset, List['TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItem']]): + """ + + errors: Union[ + Unset, + List["TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItem"], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_single_get_response_data_meta_errors_item import ( + TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItem.from_dict( + errors_item_data + ) + + errors.append(errors_item) + + teststepresult_attachments_single_get_response_data_meta_obj = cls( + errors=errors, + ) + + teststepresult_attachments_single_get_response_data_meta_obj.additional_properties = ( + d + ) + return teststepresult_attachments_single_get_response_data_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_meta_errors_item.py new file mode 100644 index 00000000..9e980f6f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_meta_errors_item.py @@ -0,0 +1,120 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_single_get_response_data_meta_errors_item_source import ( + TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSource, + ) + + +T = TypeVar( + "T", bound="TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItem" +) + + +@_attrs_define +class TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, + "TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_single_get_response_data_meta_errors_item_source import ( + TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, + TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSource, + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSource.from_dict( + _source + ) + + teststepresult_attachments_single_get_response_data_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + teststepresult_attachments_single_get_response_data_meta_errors_item_obj.additional_properties = ( + d + ) + return teststepresult_attachments_single_get_response_data_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_meta_errors_item_source.py new file mode 100644 index 00000000..63d43fbe --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_meta_errors_item_source.py @@ -0,0 +1,112 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_single_get_response_data_meta_errors_item_source_resource import ( + TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", + bound="TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSource", +) + + +@_attrs_define +class TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource + causing the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_single_get_response_data_meta_errors_item_source_resource import ( + TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + + teststepresult_attachments_single_get_response_data_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + teststepresult_attachments_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( + d + ) + return teststepresult_attachments_single_get_response_data_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..3fde825c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource", +) + + +@_attrs_define +class TeststepresultAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + teststepresult_attachments_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + teststepresult_attachments_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return teststepresult_attachments_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships.py new file mode 100644 index 00000000..62cbc3be --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships.py @@ -0,0 +1,122 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_single_get_response_data_relationships_author import ( + TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthor, + ) + from ..models.teststepresult_attachments_single_get_response_data_relationships_project import ( + TeststepresultAttachmentsSingleGetResponseDataRelationshipsProject, + ) + + +T = TypeVar( + "T", bound="TeststepresultAttachmentsSingleGetResponseDataRelationships" +) + + +@_attrs_define +class TeststepresultAttachmentsSingleGetResponseDataRelationships: + """ + Attributes: + author (Union[Unset, TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthor]): + project (Union[Unset, TeststepresultAttachmentsSingleGetResponseDataRelationshipsProject]): + """ + + author: Union[ + Unset, + "TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthor", + ] = UNSET + project: Union[ + Unset, + "TeststepresultAttachmentsSingleGetResponseDataRelationshipsProject", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + author: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.author, Unset): + author = self.author.to_dict() + + project: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project, Unset): + project = self.project.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if author is not UNSET: + field_dict["author"] = author + if project is not UNSET: + field_dict["project"] = project + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_single_get_response_data_relationships_author import ( + TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthor, + ) + from ..models.teststepresult_attachments_single_get_response_data_relationships_project import ( + TeststepresultAttachmentsSingleGetResponseDataRelationshipsProject, + ) + + d = src_dict.copy() + _author = d.pop("author", UNSET) + author: Union[ + Unset, + TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthor, + ] + if isinstance(_author, Unset): + author = UNSET + else: + author = TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthor.from_dict( + _author + ) + + _project = d.pop("project", UNSET) + project: Union[ + Unset, + TeststepresultAttachmentsSingleGetResponseDataRelationshipsProject, + ] + if isinstance(_project, Unset): + project = UNSET + else: + project = TeststepresultAttachmentsSingleGetResponseDataRelationshipsProject.from_dict( + _project + ) + + teststepresult_attachments_single_get_response_data_relationships_obj = cls( + author=author, + project=project, + ) + + teststepresult_attachments_single_get_response_data_relationships_obj.additional_properties = ( + d + ) + return teststepresult_attachments_single_get_response_data_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_author.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_author.py new file mode 100644 index 00000000..452d4537 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_author.py @@ -0,0 +1,93 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_single_get_response_data_relationships_author_data import ( + TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthorData, + ) + + +T = TypeVar( + "T", + bound="TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthor", +) + + +@_attrs_define +class TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthor: + """ + Attributes: + data (Union[Unset, TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthorData]): + """ + + data: Union[ + Unset, + "TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthorData", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_single_get_response_data_relationships_author_data import ( + TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthorData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthorData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthorData.from_dict( + _data + ) + + teststepresult_attachments_single_get_response_data_relationships_author_obj = cls( + data=data, + ) + + teststepresult_attachments_single_get_response_data_relationships_author_obj.additional_properties = ( + d + ) + return teststepresult_attachments_single_get_response_data_relationships_author_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_author_data.py new file mode 100644 index 00000000..922ef5fc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_author_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststepresult_attachments_single_get_response_data_relationships_author_data_type import ( + TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthorDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthorData", +) + + +@_attrs_define +class TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthorData: + """ + Attributes: + type (Union[Unset, TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthorDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthorDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthorDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + teststepresult_attachments_single_get_response_data_relationships_author_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + teststepresult_attachments_single_get_response_data_relationships_author_data_obj.additional_properties = ( + d + ) + return teststepresult_attachments_single_get_response_data_relationships_author_data_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_author_data_type.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_author_data_type.py new file mode 100644 index 00000000..a95c87e1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_author_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepresultAttachmentsSingleGetResponseDataRelationshipsAuthorDataType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_project.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_project.py new file mode 100644 index 00000000..b02cf8d2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_project.py @@ -0,0 +1,93 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststepresult_attachments_single_get_response_data_relationships_project_data import ( + TeststepresultAttachmentsSingleGetResponseDataRelationshipsProjectData, + ) + + +T = TypeVar( + "T", + bound="TeststepresultAttachmentsSingleGetResponseDataRelationshipsProject", +) + + +@_attrs_define +class TeststepresultAttachmentsSingleGetResponseDataRelationshipsProject: + """ + Attributes: + data (Union[Unset, TeststepresultAttachmentsSingleGetResponseDataRelationshipsProjectData]): + """ + + data: Union[ + Unset, + "TeststepresultAttachmentsSingleGetResponseDataRelationshipsProjectData", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststepresult_attachments_single_get_response_data_relationships_project_data import ( + TeststepresultAttachmentsSingleGetResponseDataRelationshipsProjectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + TeststepresultAttachmentsSingleGetResponseDataRelationshipsProjectData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = TeststepresultAttachmentsSingleGetResponseDataRelationshipsProjectData.from_dict( + _data + ) + + teststepresult_attachments_single_get_response_data_relationships_project_obj = cls( + data=data, + ) + + teststepresult_attachments_single_get_response_data_relationships_project_obj.additional_properties = ( + d + ) + return teststepresult_attachments_single_get_response_data_relationships_project_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_project_data.py new file mode 100644 index 00000000..974f3659 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_project_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststepresult_attachments_single_get_response_data_relationships_project_data_type import ( + TeststepresultAttachmentsSingleGetResponseDataRelationshipsProjectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="TeststepresultAttachmentsSingleGetResponseDataRelationshipsProjectData", +) + + +@_attrs_define +class TeststepresultAttachmentsSingleGetResponseDataRelationshipsProjectData: + """ + Attributes: + type (Union[Unset, TeststepresultAttachmentsSingleGetResponseDataRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + TeststepresultAttachmentsSingleGetResponseDataRelationshipsProjectDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + TeststepresultAttachmentsSingleGetResponseDataRelationshipsProjectDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepresultAttachmentsSingleGetResponseDataRelationshipsProjectDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + teststepresult_attachments_single_get_response_data_relationships_project_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + teststepresult_attachments_single_get_response_data_relationships_project_data_obj.additional_properties = ( + d + ) + return teststepresult_attachments_single_get_response_data_relationships_project_data_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_project_data_type.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_project_data_type.py new file mode 100644 index 00000000..5db4d82c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_relationships_project_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepresultAttachmentsSingleGetResponseDataRelationshipsProjectDataType( + str, Enum +): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_type.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_type.py new file mode 100644 index 00000000..d7cb3dc5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepresultAttachmentsSingleGetResponseDataType(str, Enum): + TESTSTEPRESULT_ATTACHMENTS = "teststepresult_attachments" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_included_item.py new file mode 100644 index 00000000..3c3b6576 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_included_item.py @@ -0,0 +1,55 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", bound="TeststepresultAttachmentsSingleGetResponseIncludedItem" +) + + +@_attrs_define +class TeststepresultAttachmentsSingleGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + teststepresult_attachments_single_get_response_included_item_obj = ( + cls() + ) + + teststepresult_attachments_single_get_response_included_item_obj.additional_properties = ( + d + ) + return teststepresult_attachments_single_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_links.py new file mode 100644 index 00000000..2997661d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststepresult_attachments_single_get_response_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepresultAttachmentsSingleGetResponseLinks") + + +@_attrs_define +class TeststepresultAttachmentsSingleGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId + /testrecords/MyProjectId/MyTestcaseId/0/teststepresults/1/attachments/MyAttachmentId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + teststepresult_attachments_single_get_response_links_obj = cls( + self_=self_, + ) + + teststepresult_attachments_single_get_response_links_obj.additional_properties = ( + d + ) + return teststepresult_attachments_single_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_delete_request.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_delete_request.py new file mode 100644 index 00000000..22a09250 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_delete_request.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_list_delete_request_data_item import ( + TeststepsListDeleteRequestDataItem, + ) + + +T = TypeVar("T", bound="TeststepsListDeleteRequest") + + +@_attrs_define +class TeststepsListDeleteRequest: + """ + Attributes: + data (Union[Unset, List['TeststepsListDeleteRequestDataItem']]): + """ + + data: Union[Unset, List["TeststepsListDeleteRequestDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_list_delete_request_data_item import ( + TeststepsListDeleteRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TeststepsListDeleteRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + teststeps_list_delete_request_obj = cls( + data=data, + ) + + teststeps_list_delete_request_obj.additional_properties = d + return teststeps_list_delete_request_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_delete_request_data_item.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_delete_request_data_item.py new file mode 100644 index 00000000..ebc982c7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_delete_request_data_item.py @@ -0,0 +1,82 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststeps_list_delete_request_data_item_type import ( + TeststepsListDeleteRequestDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepsListDeleteRequestDataItem") + + +@_attrs_define +class TeststepsListDeleteRequestDataItem: + """ + Attributes: + type (Union[Unset, TeststepsListDeleteRequestDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyTestStepIndex. + """ + + type: Union[Unset, TeststepsListDeleteRequestDataItemType] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TeststepsListDeleteRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepsListDeleteRequestDataItemType(_type) + + id = d.pop("id", UNSET) + + teststeps_list_delete_request_data_item_obj = cls( + type=type, + id=id, + ) + + teststeps_list_delete_request_data_item_obj.additional_properties = d + return teststeps_list_delete_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_delete_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_delete_request_data_item_type.py new file mode 100644 index 00000000..36eb0d71 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_delete_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepsListDeleteRequestDataItemType(str, Enum): + TESTSTEPS = "teststeps" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response.py new file mode 100644 index 00000000..1054b6af --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response.py @@ -0,0 +1,160 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_list_get_response_data_item import ( + TeststepsListGetResponseDataItem, + ) + from ..models.teststeps_list_get_response_included_item import ( + TeststepsListGetResponseIncludedItem, + ) + from ..models.teststeps_list_get_response_links import ( + TeststepsListGetResponseLinks, + ) + from ..models.teststeps_list_get_response_meta import ( + TeststepsListGetResponseMeta, + ) + + +T = TypeVar("T", bound="TeststepsListGetResponse") + + +@_attrs_define +class TeststepsListGetResponse: + """ + Attributes: + meta (Union[Unset, TeststepsListGetResponseMeta]): + data (Union[Unset, List['TeststepsListGetResponseDataItem']]): + included (Union[Unset, List['TeststepsListGetResponseIncludedItem']]): Related entities might be returned, see + Rest API + User Guide. + links (Union[Unset, TeststepsListGetResponseLinks]): + """ + + meta: Union[Unset, "TeststepsListGetResponseMeta"] = UNSET + data: Union[Unset, List["TeststepsListGetResponseDataItem"]] = UNSET + included: Union[ + Unset, List["TeststepsListGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "TeststepsListGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_list_get_response_data_item import ( + TeststepsListGetResponseDataItem, + ) + from ..models.teststeps_list_get_response_included_item import ( + TeststepsListGetResponseIncludedItem, + ) + from ..models.teststeps_list_get_response_links import ( + TeststepsListGetResponseLinks, + ) + from ..models.teststeps_list_get_response_meta import ( + TeststepsListGetResponseMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TeststepsListGetResponseMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TeststepsListGetResponseMeta.from_dict(_meta) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TeststepsListGetResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = TeststepsListGetResponseIncludedItem.from_dict( + included_item_data + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TeststepsListGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TeststepsListGetResponseLinks.from_dict(_links) + + teststeps_list_get_response_obj = cls( + meta=meta, + data=data, + included=included, + links=links, + ) + + teststeps_list_get_response_obj.additional_properties = d + return teststeps_list_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item.py new file mode 100644 index 00000000..c001f27b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item.py @@ -0,0 +1,165 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststeps_list_get_response_data_item_type import ( + TeststepsListGetResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_list_get_response_data_item_attributes import ( + TeststepsListGetResponseDataItemAttributes, + ) + from ..models.teststeps_list_get_response_data_item_links import ( + TeststepsListGetResponseDataItemLinks, + ) + from ..models.teststeps_list_get_response_data_item_meta import ( + TeststepsListGetResponseDataItemMeta, + ) + + +T = TypeVar("T", bound="TeststepsListGetResponseDataItem") + + +@_attrs_define +class TeststepsListGetResponseDataItem: + """ + Attributes: + type (Union[Unset, TeststepsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyTestStepIndex. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TeststepsListGetResponseDataItemAttributes]): + meta (Union[Unset, TeststepsListGetResponseDataItemMeta]): + links (Union[Unset, TeststepsListGetResponseDataItemLinks]): + """ + + type: Union[Unset, TeststepsListGetResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TeststepsListGetResponseDataItemAttributes" + ] = UNSET + meta: Union[Unset, "TeststepsListGetResponseDataItemMeta"] = UNSET + links: Union[Unset, "TeststepsListGetResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_list_get_response_data_item_attributes import ( + TeststepsListGetResponseDataItemAttributes, + ) + from ..models.teststeps_list_get_response_data_item_links import ( + TeststepsListGetResponseDataItemLinks, + ) + from ..models.teststeps_list_get_response_data_item_meta import ( + TeststepsListGetResponseDataItemMeta, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TeststepsListGetResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepsListGetResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, TeststepsListGetResponseDataItemAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TeststepsListGetResponseDataItemAttributes.from_dict( + _attributes + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TeststepsListGetResponseDataItemMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TeststepsListGetResponseDataItemMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, TeststepsListGetResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TeststepsListGetResponseDataItemLinks.from_dict(_links) + + teststeps_list_get_response_data_item_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + meta=meta, + links=links, + ) + + teststeps_list_get_response_data_item_obj.additional_properties = d + return teststeps_list_get_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_attributes.py new file mode 100644 index 00000000..91688cca --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_attributes.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, 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.teststeps_list_get_response_data_item_attributes_values_item import ( + TeststepsListGetResponseDataItemAttributesValuesItem, + ) + + +T = TypeVar("T", bound="TeststepsListGetResponseDataItemAttributes") + + +@_attrs_define +class TeststepsListGetResponseDataItemAttributes: + """ + Attributes: + index (Union[Unset, str]): + keys (Union[Unset, List[str]]): + values (Union[Unset, List['TeststepsListGetResponseDataItemAttributesValuesItem']]): + """ + + index: Union[Unset, str] = UNSET + keys: Union[Unset, List[str]] = UNSET + values: Union[ + Unset, List["TeststepsListGetResponseDataItemAttributesValuesItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + + keys: Union[Unset, List[str]] = UNSET + if not isinstance(self.keys, Unset): + keys = self.keys + + values: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.values, Unset): + values = [] + for values_item_data in self.values: + values_item = values_item_data.to_dict() + values.append(values_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + if keys is not UNSET: + field_dict["keys"] = keys + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_list_get_response_data_item_attributes_values_item import ( + TeststepsListGetResponseDataItemAttributesValuesItem, + ) + + d = src_dict.copy() + index = d.pop("index", UNSET) + + keys = cast(List[str], d.pop("keys", UNSET)) + + values = [] + _values = d.pop("values", UNSET) + for values_item_data in _values or []: + values_item = ( + TeststepsListGetResponseDataItemAttributesValuesItem.from_dict( + values_item_data + ) + ) + + values.append(values_item) + + teststeps_list_get_response_data_item_attributes_obj = cls( + index=index, + keys=keys, + values=values, + ) + + teststeps_list_get_response_data_item_attributes_obj.additional_properties = ( + d + ) + return teststeps_list_get_response_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_attributes_values_item.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_attributes_values_item.py new file mode 100644 index 00000000..1c217789 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_attributes_values_item.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststeps_list_get_response_data_item_attributes_values_item_type import ( + TeststepsListGetResponseDataItemAttributesValuesItemType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepsListGetResponseDataItemAttributesValuesItem") + + +@_attrs_define +class TeststepsListGetResponseDataItemAttributesValuesItem: + """ + Attributes: + type (Union[Unset, TeststepsListGetResponseDataItemAttributesValuesItemType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TeststepsListGetResponseDataItemAttributesValuesItemType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TeststepsListGetResponseDataItemAttributesValuesItemType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepsListGetResponseDataItemAttributesValuesItemType( + _type + ) + + value = d.pop("value", UNSET) + + teststeps_list_get_response_data_item_attributes_values_item_obj = cls( + type=type, + value=value, + ) + + teststeps_list_get_response_data_item_attributes_values_item_obj.additional_properties = ( + d + ) + return teststeps_list_get_response_data_item_attributes_values_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_attributes_values_item_type.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_attributes_values_item_type.py new file mode 100644 index 00000000..78beaaef --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_attributes_values_item_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepsListGetResponseDataItemAttributesValuesItemType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_links.py new file mode 100644 index 00000000..9bae6efc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepsListGetResponseDataItemLinks") + + +@_attrs_define +class TeststepsListGetResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/teststeps/MyTestStepIndex?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + teststeps_list_get_response_data_item_links_obj = cls( + self_=self_, + ) + + teststeps_list_get_response_data_item_links_obj.additional_properties = ( + d + ) + return teststeps_list_get_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_meta.py new file mode 100644 index 00000000..684e3eb0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_meta.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_list_get_response_data_item_meta_errors_item import ( + TeststepsListGetResponseDataItemMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TeststepsListGetResponseDataItemMeta") + + +@_attrs_define +class TeststepsListGetResponseDataItemMeta: + """ + Attributes: + errors (Union[Unset, List['TeststepsListGetResponseDataItemMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["TeststepsListGetResponseDataItemMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_list_get_response_data_item_meta_errors_item import ( + TeststepsListGetResponseDataItemMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ( + TeststepsListGetResponseDataItemMetaErrorsItem.from_dict( + errors_item_data + ) + ) + + errors.append(errors_item) + + teststeps_list_get_response_data_item_meta_obj = cls( + errors=errors, + ) + + teststeps_list_get_response_data_item_meta_obj.additional_properties = ( + d + ) + return teststeps_list_get_response_data_item_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_meta_errors_item.py new file mode 100644 index 00000000..2e7b3308 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_meta_errors_item.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_list_get_response_data_item_meta_errors_item_source import ( + TeststepsListGetResponseDataItemMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="TeststepsListGetResponseDataItemMetaErrorsItem") + + +@_attrs_define +class TeststepsListGetResponseDataItemMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TeststepsListGetResponseDataItemMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "TeststepsListGetResponseDataItemMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_list_get_response_data_item_meta_errors_item_source import ( + TeststepsListGetResponseDataItemMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, TeststepsListGetResponseDataItemMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = ( + TeststepsListGetResponseDataItemMetaErrorsItemSource.from_dict( + _source + ) + ) + + teststeps_list_get_response_data_item_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + teststeps_list_get_response_data_item_meta_errors_item_obj.additional_properties = ( + d + ) + return teststeps_list_get_response_data_item_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_meta_errors_item_source.py new file mode 100644 index 00000000..ec6e8dfc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_meta_errors_item_source.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_list_get_response_data_item_meta_errors_item_source_resource import ( + TeststepsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + +T = TypeVar("T", bound="TeststepsListGetResponseDataItemMetaErrorsItemSource") + + +@_attrs_define +class TeststepsListGetResponseDataItemMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TeststepsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing the + error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "TeststepsListGetResponseDataItemMetaErrorsItemSourceResource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_list_get_response_data_item_meta_errors_item_source_resource import ( + TeststepsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, TeststepsListGetResponseDataItemMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TeststepsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + + teststeps_list_get_response_data_item_meta_errors_item_source_obj = ( + cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + ) + + teststeps_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( + d + ) + return ( + teststeps_list_get_response_data_item_meta_errors_item_source_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..705862f8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TeststepsListGetResponseDataItemMetaErrorsItemSourceResource" +) + + +@_attrs_define +class TeststepsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + teststeps_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + teststeps_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return teststeps_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_type.py new file mode 100644 index 00000000..ffda5405 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepsListGetResponseDataItemType(str, Enum): + TESTSTEPS = "teststeps" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_included_item.py new file mode 100644 index 00000000..41fcfa9f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_included_item.py @@ -0,0 +1,49 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TeststepsListGetResponseIncludedItem") + + +@_attrs_define +class TeststepsListGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + teststeps_list_get_response_included_item_obj = cls() + + teststeps_list_get_response_included_item_obj.additional_properties = d + return teststeps_list_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_links.py new file mode 100644 index 00000000..0d41cce0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_links.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepsListGetResponseLinks") + + +@_attrs_define +class TeststepsListGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/teststeps?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/teststeps?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/teststeps?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/teststeps?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/teststeps?page%5Bsize%5D=10&page%5Bnumber%5D=9. + """ + + self_: Union[Unset, str] = UNSET + first: Union[Unset, str] = UNSET + prev: Union[Unset, str] = UNSET + next_: Union[Unset, str] = UNSET + last: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + first = self.first + + prev = self.prev + + next_ = self.next_ + + last = self.last + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if first is not UNSET: + field_dict["first"] = first + if prev is not UNSET: + field_dict["prev"] = prev + if next_ is not UNSET: + field_dict["next"] = next_ + if last is not UNSET: + field_dict["last"] = last + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + first = d.pop("first", UNSET) + + prev = d.pop("prev", UNSET) + + next_ = d.pop("next", UNSET) + + last = d.pop("last", UNSET) + + teststeps_list_get_response_links_obj = cls( + self_=self_, + first=first, + prev=prev, + next_=next_, + last=last, + ) + + teststeps_list_get_response_links_obj.additional_properties = d + return teststeps_list_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_meta.py new file mode 100644 index 00000000..c19ed6a2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_get_response_meta.py @@ -0,0 +1,63 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepsListGetResponseMeta") + + +@_attrs_define +class TeststepsListGetResponseMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + teststeps_list_get_response_meta_obj = cls( + total_count=total_count, + ) + + teststeps_list_get_response_meta_obj.additional_properties = d + return teststeps_list_get_response_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request.py new file mode 100644 index 00000000..da0b5e06 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_list_patch_request_data_item import ( + TeststepsListPatchRequestDataItem, + ) + + +T = TypeVar("T", bound="TeststepsListPatchRequest") + + +@_attrs_define +class TeststepsListPatchRequest: + """ + Attributes: + data (Union[Unset, List['TeststepsListPatchRequestDataItem']]): + """ + + data: Union[Unset, List["TeststepsListPatchRequestDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_list_patch_request_data_item import ( + TeststepsListPatchRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TeststepsListPatchRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + teststeps_list_patch_request_obj = cls( + data=data, + ) + + teststeps_list_patch_request_obj.additional_properties = d + return teststeps_list_patch_request_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item.py new file mode 100644 index 00000000..2603538a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item.py @@ -0,0 +1,112 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststeps_list_patch_request_data_item_type import ( + TeststepsListPatchRequestDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_list_patch_request_data_item_attributes import ( + TeststepsListPatchRequestDataItemAttributes, + ) + + +T = TypeVar("T", bound="TeststepsListPatchRequestDataItem") + + +@_attrs_define +class TeststepsListPatchRequestDataItem: + """ + Attributes: + type (Union[Unset, TeststepsListPatchRequestDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyTestStepIndex. + attributes (Union[Unset, TeststepsListPatchRequestDataItemAttributes]): + """ + + type: Union[Unset, TeststepsListPatchRequestDataItemType] = UNSET + id: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TeststepsListPatchRequestDataItemAttributes" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_list_patch_request_data_item_attributes import ( + TeststepsListPatchRequestDataItemAttributes, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TeststepsListPatchRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepsListPatchRequestDataItemType(_type) + + id = d.pop("id", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, TeststepsListPatchRequestDataItemAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TeststepsListPatchRequestDataItemAttributes.from_dict( + _attributes + ) + + teststeps_list_patch_request_data_item_obj = cls( + type=type, + id=id, + attributes=attributes, + ) + + teststeps_list_patch_request_data_item_obj.additional_properties = d + return teststeps_list_patch_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item_attributes.py new file mode 100644 index 00000000..919f31eb --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item_attributes.py @@ -0,0 +1,100 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, 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.teststeps_list_patch_request_data_item_attributes_values_item import ( + TeststepsListPatchRequestDataItemAttributesValuesItem, + ) + + +T = TypeVar("T", bound="TeststepsListPatchRequestDataItemAttributes") + + +@_attrs_define +class TeststepsListPatchRequestDataItemAttributes: + """ + Attributes: + keys (Union[Unset, List[str]]): + values (Union[Unset, List['TeststepsListPatchRequestDataItemAttributesValuesItem']]): + """ + + keys: Union[Unset, List[str]] = UNSET + values: Union[ + Unset, List["TeststepsListPatchRequestDataItemAttributesValuesItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + keys: Union[Unset, List[str]] = UNSET + if not isinstance(self.keys, Unset): + keys = self.keys + + values: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.values, Unset): + values = [] + for values_item_data in self.values: + values_item = values_item_data.to_dict() + values.append(values_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if keys is not UNSET: + field_dict["keys"] = keys + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_list_patch_request_data_item_attributes_values_item import ( + TeststepsListPatchRequestDataItemAttributesValuesItem, + ) + + d = src_dict.copy() + keys = cast(List[str], d.pop("keys", UNSET)) + + values = [] + _values = d.pop("values", UNSET) + for values_item_data in _values or []: + values_item = TeststepsListPatchRequestDataItemAttributesValuesItem.from_dict( + values_item_data + ) + + values.append(values_item) + + teststeps_list_patch_request_data_item_attributes_obj = cls( + keys=keys, + values=values, + ) + + teststeps_list_patch_request_data_item_attributes_obj.additional_properties = ( + d + ) + return teststeps_list_patch_request_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item_attributes_values_item.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item_attributes_values_item.py new file mode 100644 index 00000000..72cb0212 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item_attributes_values_item.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststeps_list_patch_request_data_item_attributes_values_item_type import ( + TeststepsListPatchRequestDataItemAttributesValuesItemType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepsListPatchRequestDataItemAttributesValuesItem") + + +@_attrs_define +class TeststepsListPatchRequestDataItemAttributesValuesItem: + """ + Attributes: + type (Union[Unset, TeststepsListPatchRequestDataItemAttributesValuesItemType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TeststepsListPatchRequestDataItemAttributesValuesItemType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TeststepsListPatchRequestDataItemAttributesValuesItemType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepsListPatchRequestDataItemAttributesValuesItemType( + _type + ) + + value = d.pop("value", UNSET) + + teststeps_list_patch_request_data_item_attributes_values_item_obj = ( + cls( + type=type, + value=value, + ) + ) + + teststeps_list_patch_request_data_item_attributes_values_item_obj.additional_properties = ( + d + ) + return ( + teststeps_list_patch_request_data_item_attributes_values_item_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item_attributes_values_item_type.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item_attributes_values_item_type.py new file mode 100644 index 00000000..79c24b7f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item_attributes_values_item_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepsListPatchRequestDataItemAttributesValuesItemType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item_type.py new file mode 100644 index 00000000..a481d8f1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_patch_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepsListPatchRequestDataItemType(str, Enum): + TESTSTEPS = "teststeps" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststeps_list_post_request.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_request.py new file mode 100644 index 00000000..f545e412 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_request.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_list_post_request_data_item import ( + TeststepsListPostRequestDataItem, + ) + + +T = TypeVar("T", bound="TeststepsListPostRequest") + + +@_attrs_define +class TeststepsListPostRequest: + """ + Attributes: + data (Union[Unset, List['TeststepsListPostRequestDataItem']]): + """ + + data: Union[Unset, List["TeststepsListPostRequestDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_list_post_request_data_item import ( + TeststepsListPostRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TeststepsListPostRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + teststeps_list_post_request_obj = cls( + data=data, + ) + + teststeps_list_post_request_obj.additional_properties = d + return teststeps_list_post_request_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item.py new file mode 100644 index 00000000..bfec0c6b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item.py @@ -0,0 +1,103 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststeps_list_post_request_data_item_type import ( + TeststepsListPostRequestDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_list_post_request_data_item_attributes import ( + TeststepsListPostRequestDataItemAttributes, + ) + + +T = TypeVar("T", bound="TeststepsListPostRequestDataItem") + + +@_attrs_define +class TeststepsListPostRequestDataItem: + """ + Attributes: + type (Union[Unset, TeststepsListPostRequestDataItemType]): + attributes (Union[Unset, TeststepsListPostRequestDataItemAttributes]): + """ + + type: Union[Unset, TeststepsListPostRequestDataItemType] = UNSET + attributes: Union[ + Unset, "TeststepsListPostRequestDataItemAttributes" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_list_post_request_data_item_attributes import ( + TeststepsListPostRequestDataItemAttributes, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TeststepsListPostRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepsListPostRequestDataItemType(_type) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, TeststepsListPostRequestDataItemAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TeststepsListPostRequestDataItemAttributes.from_dict( + _attributes + ) + + teststeps_list_post_request_data_item_obj = cls( + type=type, + attributes=attributes, + ) + + teststeps_list_post_request_data_item_obj.additional_properties = d + return teststeps_list_post_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item_attributes.py new file mode 100644 index 00000000..9e5c5565 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item_attributes.py @@ -0,0 +1,102 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, 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.teststeps_list_post_request_data_item_attributes_values_item import ( + TeststepsListPostRequestDataItemAttributesValuesItem, + ) + + +T = TypeVar("T", bound="TeststepsListPostRequestDataItemAttributes") + + +@_attrs_define +class TeststepsListPostRequestDataItemAttributes: + """ + Attributes: + keys (Union[Unset, List[str]]): + values (Union[Unset, List['TeststepsListPostRequestDataItemAttributesValuesItem']]): + """ + + keys: Union[Unset, List[str]] = UNSET + values: Union[ + Unset, List["TeststepsListPostRequestDataItemAttributesValuesItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + keys: Union[Unset, List[str]] = UNSET + if not isinstance(self.keys, Unset): + keys = self.keys + + values: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.values, Unset): + values = [] + for values_item_data in self.values: + values_item = values_item_data.to_dict() + values.append(values_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if keys is not UNSET: + field_dict["keys"] = keys + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_list_post_request_data_item_attributes_values_item import ( + TeststepsListPostRequestDataItemAttributesValuesItem, + ) + + d = src_dict.copy() + keys = cast(List[str], d.pop("keys", UNSET)) + + values = [] + _values = d.pop("values", UNSET) + for values_item_data in _values or []: + values_item = ( + TeststepsListPostRequestDataItemAttributesValuesItem.from_dict( + values_item_data + ) + ) + + values.append(values_item) + + teststeps_list_post_request_data_item_attributes_obj = cls( + keys=keys, + values=values, + ) + + teststeps_list_post_request_data_item_attributes_obj.additional_properties = ( + d + ) + return teststeps_list_post_request_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item_attributes_values_item.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item_attributes_values_item.py new file mode 100644 index 00000000..a0c63ae5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item_attributes_values_item.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststeps_list_post_request_data_item_attributes_values_item_type import ( + TeststepsListPostRequestDataItemAttributesValuesItemType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepsListPostRequestDataItemAttributesValuesItem") + + +@_attrs_define +class TeststepsListPostRequestDataItemAttributesValuesItem: + """ + Attributes: + type (Union[Unset, TeststepsListPostRequestDataItemAttributesValuesItemType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TeststepsListPostRequestDataItemAttributesValuesItemType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TeststepsListPostRequestDataItemAttributesValuesItemType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepsListPostRequestDataItemAttributesValuesItemType( + _type + ) + + value = d.pop("value", UNSET) + + teststeps_list_post_request_data_item_attributes_values_item_obj = cls( + type=type, + value=value, + ) + + teststeps_list_post_request_data_item_attributes_values_item_obj.additional_properties = ( + d + ) + return teststeps_list_post_request_data_item_attributes_values_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item_attributes_values_item_type.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item_attributes_values_item_type.py new file mode 100644 index 00000000..7548f45f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item_attributes_values_item_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepsListPostRequestDataItemAttributesValuesItemType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item_type.py new file mode 100644 index 00000000..f548cb11 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepsListPostRequestDataItemType(str, Enum): + TESTSTEPS = "teststeps" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststeps_list_post_response.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_response.py new file mode 100644 index 00000000..50f140fc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_response.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_list_post_response_data_item import ( + TeststepsListPostResponseDataItem, + ) + + +T = TypeVar("T", bound="TeststepsListPostResponse") + + +@_attrs_define +class TeststepsListPostResponse: + """ + Attributes: + data (Union[Unset, List['TeststepsListPostResponseDataItem']]): + """ + + data: Union[Unset, List["TeststepsListPostResponseDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_list_post_response_data_item import ( + TeststepsListPostResponseDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = TeststepsListPostResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + teststeps_list_post_response_obj = cls( + data=data, + ) + + teststeps_list_post_response_obj.additional_properties = d + return teststeps_list_post_response_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_response_data_item.py new file mode 100644 index 00000000..f7453e7e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_response_data_item.py @@ -0,0 +1,108 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststeps_list_post_response_data_item_type import ( + TeststepsListPostResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_list_post_response_data_item_links import ( + TeststepsListPostResponseDataItemLinks, + ) + + +T = TypeVar("T", bound="TeststepsListPostResponseDataItem") + + +@_attrs_define +class TeststepsListPostResponseDataItem: + """ + Attributes: + type (Union[Unset, TeststepsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyTestStepIndex. + links (Union[Unset, TeststepsListPostResponseDataItemLinks]): + """ + + type: Union[Unset, TeststepsListPostResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + links: Union[Unset, "TeststepsListPostResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_list_post_response_data_item_links import ( + TeststepsListPostResponseDataItemLinks, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TeststepsListPostResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepsListPostResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[Unset, TeststepsListPostResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TeststepsListPostResponseDataItemLinks.from_dict(_links) + + teststeps_list_post_response_data_item_obj = cls( + type=type, + id=id, + links=links, + ) + + teststeps_list_post_response_data_item_obj.additional_properties = d + return teststeps_list_post_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_response_data_item_links.py new file mode 100644 index 00000000..574ee9b2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepsListPostResponseDataItemLinks") + + +@_attrs_define +class TeststepsListPostResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/teststeps/MyTestStepIndex?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + teststeps_list_post_response_data_item_links_obj = cls( + self_=self_, + ) + + teststeps_list_post_response_data_item_links_obj.additional_properties = ( + d + ) + return teststeps_list_post_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_list_post_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_response_data_item_type.py new file mode 100644 index 00000000..865a884b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_list_post_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepsListPostResponseDataItemType(str, Enum): + TESTSTEPS = "teststeps" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response.py new file mode 100644 index 00000000..f2a00bfa --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response.py @@ -0,0 +1,133 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_single_get_response_data import ( + TeststepsSingleGetResponseData, + ) + from ..models.teststeps_single_get_response_included_item import ( + TeststepsSingleGetResponseIncludedItem, + ) + from ..models.teststeps_single_get_response_links import ( + TeststepsSingleGetResponseLinks, + ) + + +T = TypeVar("T", bound="TeststepsSingleGetResponse") + + +@_attrs_define +class TeststepsSingleGetResponse: + """ + Attributes: + data (Union[Unset, TeststepsSingleGetResponseData]): + included (Union[Unset, List['TeststepsSingleGetResponseIncludedItem']]): Related entities might be returned, see + Rest API + User Guide. + links (Union[Unset, TeststepsSingleGetResponseLinks]): + """ + + data: Union[Unset, "TeststepsSingleGetResponseData"] = UNSET + included: Union[ + Unset, List["TeststepsSingleGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "TeststepsSingleGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_single_get_response_data import ( + TeststepsSingleGetResponseData, + ) + from ..models.teststeps_single_get_response_included_item import ( + TeststepsSingleGetResponseIncludedItem, + ) + from ..models.teststeps_single_get_response_links import ( + TeststepsSingleGetResponseLinks, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, TeststepsSingleGetResponseData] + if isinstance(_data, Unset): + data = UNSET + else: + data = TeststepsSingleGetResponseData.from_dict(_data) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = TeststepsSingleGetResponseIncludedItem.from_dict( + included_item_data + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, TeststepsSingleGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TeststepsSingleGetResponseLinks.from_dict(_links) + + teststeps_single_get_response_obj = cls( + data=data, + included=included, + links=links, + ) + + teststeps_single_get_response_obj.additional_properties = d + return teststeps_single_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data.py new file mode 100644 index 00000000..b35fee79 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data.py @@ -0,0 +1,165 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststeps_single_get_response_data_type import ( + TeststepsSingleGetResponseDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_single_get_response_data_attributes import ( + TeststepsSingleGetResponseDataAttributes, + ) + from ..models.teststeps_single_get_response_data_links import ( + TeststepsSingleGetResponseDataLinks, + ) + from ..models.teststeps_single_get_response_data_meta import ( + TeststepsSingleGetResponseDataMeta, + ) + + +T = TypeVar("T", bound="TeststepsSingleGetResponseData") + + +@_attrs_define +class TeststepsSingleGetResponseData: + """ + Attributes: + type (Union[Unset, TeststepsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyTestStepIndex. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, TeststepsSingleGetResponseDataAttributes]): + meta (Union[Unset, TeststepsSingleGetResponseDataMeta]): + links (Union[Unset, TeststepsSingleGetResponseDataLinks]): + """ + + type: Union[Unset, TeststepsSingleGetResponseDataType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TeststepsSingleGetResponseDataAttributes" + ] = UNSET + meta: Union[Unset, "TeststepsSingleGetResponseDataMeta"] = UNSET + links: Union[Unset, "TeststepsSingleGetResponseDataLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_single_get_response_data_attributes import ( + TeststepsSingleGetResponseDataAttributes, + ) + from ..models.teststeps_single_get_response_data_links import ( + TeststepsSingleGetResponseDataLinks, + ) + from ..models.teststeps_single_get_response_data_meta import ( + TeststepsSingleGetResponseDataMeta, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TeststepsSingleGetResponseDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepsSingleGetResponseDataType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, TeststepsSingleGetResponseDataAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TeststepsSingleGetResponseDataAttributes.from_dict( + _attributes + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, TeststepsSingleGetResponseDataMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = TeststepsSingleGetResponseDataMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, TeststepsSingleGetResponseDataLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = TeststepsSingleGetResponseDataLinks.from_dict(_links) + + teststeps_single_get_response_data_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + meta=meta, + links=links, + ) + + teststeps_single_get_response_data_obj.additional_properties = d + return teststeps_single_get_response_data_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_attributes.py new file mode 100644 index 00000000..30b78e7d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_attributes.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, 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.teststeps_single_get_response_data_attributes_values_item import ( + TeststepsSingleGetResponseDataAttributesValuesItem, + ) + + +T = TypeVar("T", bound="TeststepsSingleGetResponseDataAttributes") + + +@_attrs_define +class TeststepsSingleGetResponseDataAttributes: + """ + Attributes: + index (Union[Unset, str]): + keys (Union[Unset, List[str]]): + values (Union[Unset, List['TeststepsSingleGetResponseDataAttributesValuesItem']]): + """ + + index: Union[Unset, str] = UNSET + keys: Union[Unset, List[str]] = UNSET + values: Union[ + Unset, List["TeststepsSingleGetResponseDataAttributesValuesItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + + keys: Union[Unset, List[str]] = UNSET + if not isinstance(self.keys, Unset): + keys = self.keys + + values: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.values, Unset): + values = [] + for values_item_data in self.values: + values_item = values_item_data.to_dict() + values.append(values_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + if keys is not UNSET: + field_dict["keys"] = keys + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_single_get_response_data_attributes_values_item import ( + TeststepsSingleGetResponseDataAttributesValuesItem, + ) + + d = src_dict.copy() + index = d.pop("index", UNSET) + + keys = cast(List[str], d.pop("keys", UNSET)) + + values = [] + _values = d.pop("values", UNSET) + for values_item_data in _values or []: + values_item = ( + TeststepsSingleGetResponseDataAttributesValuesItem.from_dict( + values_item_data + ) + ) + + values.append(values_item) + + teststeps_single_get_response_data_attributes_obj = cls( + index=index, + keys=keys, + values=values, + ) + + teststeps_single_get_response_data_attributes_obj.additional_properties = ( + d + ) + return teststeps_single_get_response_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_attributes_values_item.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_attributes_values_item.py new file mode 100644 index 00000000..95a295f3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_attributes_values_item.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststeps_single_get_response_data_attributes_values_item_type import ( + TeststepsSingleGetResponseDataAttributesValuesItemType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepsSingleGetResponseDataAttributesValuesItem") + + +@_attrs_define +class TeststepsSingleGetResponseDataAttributesValuesItem: + """ + Attributes: + type (Union[Unset, TeststepsSingleGetResponseDataAttributesValuesItemType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TeststepsSingleGetResponseDataAttributesValuesItemType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TeststepsSingleGetResponseDataAttributesValuesItemType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepsSingleGetResponseDataAttributesValuesItemType( + _type + ) + + value = d.pop("value", UNSET) + + teststeps_single_get_response_data_attributes_values_item_obj = cls( + type=type, + value=value, + ) + + teststeps_single_get_response_data_attributes_values_item_obj.additional_properties = ( + d + ) + return teststeps_single_get_response_data_attributes_values_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_attributes_values_item_type.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_attributes_values_item_type.py new file mode 100644 index 00000000..b4b62a32 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_attributes_values_item_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepsSingleGetResponseDataAttributesValuesItemType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_links.py new file mode 100644 index 00000000..5c846d91 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_links.py @@ -0,0 +1,64 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepsSingleGetResponseDataLinks") + + +@_attrs_define +class TeststepsSingleGetResponseDataLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/teststeps/MyTestStepIndex?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + teststeps_single_get_response_data_links_obj = cls( + self_=self_, + ) + + teststeps_single_get_response_data_links_obj.additional_properties = d + return teststeps_single_get_response_data_links_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_meta.py new file mode 100644 index 00000000..05601869 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_meta.py @@ -0,0 +1,89 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_single_get_response_data_meta_errors_item import ( + TeststepsSingleGetResponseDataMetaErrorsItem, + ) + + +T = TypeVar("T", bound="TeststepsSingleGetResponseDataMeta") + + +@_attrs_define +class TeststepsSingleGetResponseDataMeta: + """ + Attributes: + errors (Union[Unset, List['TeststepsSingleGetResponseDataMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["TeststepsSingleGetResponseDataMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_single_get_response_data_meta_errors_item import ( + TeststepsSingleGetResponseDataMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ( + TeststepsSingleGetResponseDataMetaErrorsItem.from_dict( + errors_item_data + ) + ) + + errors.append(errors_item) + + teststeps_single_get_response_data_meta_obj = cls( + errors=errors, + ) + + teststeps_single_get_response_data_meta_obj.additional_properties = d + return teststeps_single_get_response_data_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_meta_errors_item.py new file mode 100644 index 00000000..bcb93efb --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_meta_errors_item.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_single_get_response_data_meta_errors_item_source import ( + TeststepsSingleGetResponseDataMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="TeststepsSingleGetResponseDataMetaErrorsItem") + + +@_attrs_define +class TeststepsSingleGetResponseDataMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, TeststepsSingleGetResponseDataMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "TeststepsSingleGetResponseDataMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_single_get_response_data_meta_errors_item_source import ( + TeststepsSingleGetResponseDataMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, TeststepsSingleGetResponseDataMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = ( + TeststepsSingleGetResponseDataMetaErrorsItemSource.from_dict( + _source + ) + ) + + teststeps_single_get_response_data_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + teststeps_single_get_response_data_meta_errors_item_obj.additional_properties = ( + d + ) + return teststeps_single_get_response_data_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_meta_errors_item_source.py new file mode 100644 index 00000000..0b0a6b46 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_meta_errors_item_source.py @@ -0,0 +1,106 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_single_get_response_data_meta_errors_item_source_resource import ( + TeststepsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + +T = TypeVar("T", bound="TeststepsSingleGetResponseDataMetaErrorsItemSource") + + +@_attrs_define +class TeststepsSingleGetResponseDataMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, TeststepsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "TeststepsSingleGetResponseDataMetaErrorsItemSourceResource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_single_get_response_data_meta_errors_item_source_resource import ( + TeststepsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, TeststepsSingleGetResponseDataMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = TeststepsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + + teststeps_single_get_response_data_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + teststeps_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( + d + ) + return teststeps_single_get_response_data_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..fc4d92f7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="TeststepsSingleGetResponseDataMetaErrorsItemSourceResource" +) + + +@_attrs_define +class TeststepsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + teststeps_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + teststeps_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return teststeps_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_type.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_type.py new file mode 100644 index 00000000..326d3061 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepsSingleGetResponseDataType(str, Enum): + TESTSTEPS = "teststeps" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_included_item.py new file mode 100644 index 00000000..f582311d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TeststepsSingleGetResponseIncludedItem") + + +@_attrs_define +class TeststepsSingleGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + teststeps_single_get_response_included_item_obj = cls() + + teststeps_single_get_response_included_item_obj.additional_properties = ( + d + ) + return teststeps_single_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_links.py new file mode 100644 index 00000000..ff8fc7e2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_get_response_links.py @@ -0,0 +1,64 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepsSingleGetResponseLinks") + + +@_attrs_define +class TeststepsSingleGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/teststeps/MyTestStepIndex?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + teststeps_single_get_response_links_obj = cls( + self_=self_, + ) + + teststeps_single_get_response_links_obj.additional_properties = d + return teststeps_single_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request.py new file mode 100644 index 00000000..37a5bc84 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request.py @@ -0,0 +1,80 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_single_patch_request_data import ( + TeststepsSinglePatchRequestData, + ) + + +T = TypeVar("T", bound="TeststepsSinglePatchRequest") + + +@_attrs_define +class TeststepsSinglePatchRequest: + """ + Attributes: + data (Union[Unset, TeststepsSinglePatchRequestData]): + """ + + data: Union[Unset, "TeststepsSinglePatchRequestData"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_single_patch_request_data import ( + TeststepsSinglePatchRequestData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, TeststepsSinglePatchRequestData] + if isinstance(_data, Unset): + data = UNSET + else: + data = TeststepsSinglePatchRequestData.from_dict(_data) + + teststeps_single_patch_request_obj = cls( + data=data, + ) + + teststeps_single_patch_request_obj.additional_properties = d + return teststeps_single_patch_request_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data.py new file mode 100644 index 00000000..6eb306d4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data.py @@ -0,0 +1,112 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststeps_single_patch_request_data_type import ( + TeststepsSinglePatchRequestDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.teststeps_single_patch_request_data_attributes import ( + TeststepsSinglePatchRequestDataAttributes, + ) + + +T = TypeVar("T", bound="TeststepsSinglePatchRequestData") + + +@_attrs_define +class TeststepsSinglePatchRequestData: + """ + Attributes: + type (Union[Unset, TeststepsSinglePatchRequestDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyTestStepIndex. + attributes (Union[Unset, TeststepsSinglePatchRequestDataAttributes]): + """ + + type: Union[Unset, TeststepsSinglePatchRequestDataType] = UNSET + id: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "TeststepsSinglePatchRequestDataAttributes" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_single_patch_request_data_attributes import ( + TeststepsSinglePatchRequestDataAttributes, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, TeststepsSinglePatchRequestDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepsSinglePatchRequestDataType(_type) + + id = d.pop("id", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, TeststepsSinglePatchRequestDataAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = TeststepsSinglePatchRequestDataAttributes.from_dict( + _attributes + ) + + teststeps_single_patch_request_data_obj = cls( + type=type, + id=id, + attributes=attributes, + ) + + teststeps_single_patch_request_data_obj.additional_properties = d + return teststeps_single_patch_request_data_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data_attributes.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data_attributes.py new file mode 100644 index 00000000..76c3f9fa --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data_attributes.py @@ -0,0 +1,102 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, 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.teststeps_single_patch_request_data_attributes_values_item import ( + TeststepsSinglePatchRequestDataAttributesValuesItem, + ) + + +T = TypeVar("T", bound="TeststepsSinglePatchRequestDataAttributes") + + +@_attrs_define +class TeststepsSinglePatchRequestDataAttributes: + """ + Attributes: + keys (Union[Unset, List[str]]): + values (Union[Unset, List['TeststepsSinglePatchRequestDataAttributesValuesItem']]): + """ + + keys: Union[Unset, List[str]] = UNSET + values: Union[ + Unset, List["TeststepsSinglePatchRequestDataAttributesValuesItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + keys: Union[Unset, List[str]] = UNSET + if not isinstance(self.keys, Unset): + keys = self.keys + + values: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.values, Unset): + values = [] + for values_item_data in self.values: + values_item = values_item_data.to_dict() + values.append(values_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if keys is not UNSET: + field_dict["keys"] = keys + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.teststeps_single_patch_request_data_attributes_values_item import ( + TeststepsSinglePatchRequestDataAttributesValuesItem, + ) + + d = src_dict.copy() + keys = cast(List[str], d.pop("keys", UNSET)) + + values = [] + _values = d.pop("values", UNSET) + for values_item_data in _values or []: + values_item = ( + TeststepsSinglePatchRequestDataAttributesValuesItem.from_dict( + values_item_data + ) + ) + + values.append(values_item) + + teststeps_single_patch_request_data_attributes_obj = cls( + keys=keys, + values=values, + ) + + teststeps_single_patch_request_data_attributes_obj.additional_properties = ( + d + ) + return teststeps_single_patch_request_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data_attributes_values_item.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data_attributes_values_item.py new file mode 100644 index 00000000..977d1bd1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data_attributes_values_item.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.teststeps_single_patch_request_data_attributes_values_item_type import ( + TeststepsSinglePatchRequestDataAttributesValuesItemType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TeststepsSinglePatchRequestDataAttributesValuesItem") + + +@_attrs_define +class TeststepsSinglePatchRequestDataAttributesValuesItem: + """ + Attributes: + type (Union[Unset, TeststepsSinglePatchRequestDataAttributesValuesItemType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, TeststepsSinglePatchRequestDataAttributesValuesItemType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, TeststepsSinglePatchRequestDataAttributesValuesItemType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = TeststepsSinglePatchRequestDataAttributesValuesItemType( + _type + ) + + value = d.pop("value", UNSET) + + teststeps_single_patch_request_data_attributes_values_item_obj = cls( + type=type, + value=value, + ) + + teststeps_single_patch_request_data_attributes_values_item_obj.additional_properties = ( + d + ) + return teststeps_single_patch_request_data_attributes_values_item_obj + + @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/polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data_attributes_values_item_type.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data_attributes_values_item_type.py new file mode 100644 index 00000000..4ad8274e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data_attributes_values_item_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepsSinglePatchRequestDataAttributesValuesItemType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data_type.py b/polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data_type.py new file mode 100644 index 00000000..5d45c30b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/teststeps_single_patch_request_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class TeststepsSinglePatchRequestDataType(str, Enum): + TESTSTEPS = "teststeps" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/update_avatar_request_body.py b/polarion_rest_api_client/open_api_client/models/update_avatar_request_body.py new file mode 100644 index 00000000..0ff99d57 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/update_avatar_request_body.py @@ -0,0 +1,92 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from io import BytesIO +from typing import Any, Dict, List, Tuple, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, File, FileJsonType, Unset + +T = TypeVar("T", bound="UpdateAvatarRequestBody") + + +@_attrs_define +class UpdateAvatarRequestBody: + """ + Attributes: + content (Union[Unset, File]): avatar content + """ + + content: Union[Unset, File] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + content: Union[Unset, FileJsonType] = UNSET + if not isinstance(self.content, Unset): + content = self.content.to_tuple() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if content is not UNSET: + field_dict["content"] = content + + return field_dict + + def to_multipart(self) -> List[Tuple[str, Any]]: + field_list: List[Tuple[str, Any]] = [] + content: Union[Unset, FileJsonType] = UNSET + if not isinstance(self.content, Unset): + content = self.content.to_tuple() + + if content is not UNSET: + field_list.append(("content", content)) + + field_dict: Dict[str, Any] = {} + field_dict.update( + { + key: (None, str(value).encode(), "text/plain") + for key, value in self.additional_properties.items() + } + ) + + field_list += list(field_dict.items()) + + return field_list + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _content = d.pop("content", UNSET) + content: Union[Unset, File] + if isinstance(_content, Unset): + content = UNSET + else: + content = File(payload=BytesIO(_content)) + + update_avatar_request_body_obj = cls( + content=content, + ) + + update_avatar_request_body_obj.additional_properties = d + return update_avatar_request_body_obj + + @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/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response.py index 5124855b..7a8a854b 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response.py @@ -26,13 +26,12 @@ @_attrs_define class UsergroupsSingleGetResponse: """ - Attributes - ---------- - data : Union[Unset, UsergroupsSingleGetResponseData] - included : Union[Unset, List['UsergroupsSingleGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, UsergroupsSingleGetResponseLinks] + Attributes: + data (Union[Unset, UsergroupsSingleGetResponseData]): + included (Union[Unset, List['UsergroupsSingleGetResponseIncludedItem']]): Related entities might be returned, + see Rest API + User Guide. + links (Union[Unset, UsergroupsSingleGetResponseLinks]): """ data: Union[Unset, "UsergroupsSingleGetResponseData"] = UNSET @@ -54,7 +53,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data.py index ae9ebe15..e564b36d 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data.py @@ -32,15 +32,14 @@ @_attrs_define class UsergroupsSingleGetResponseData: """ - Attributes - ---------- - type : Union[Unset, UsergroupsSingleGetResponseDataType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, UsergroupsSingleGetResponseDataAttributes] - relationships : Union[Unset, UsergroupsSingleGetResponseDataRelationships] - meta : Union[Unset, UsergroupsSingleGetResponseDataMeta] - links : Union[Unset, UsergroupsSingleGetResponseDataLinks] + Attributes: + type (Union[Unset, UsergroupsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyUserGroupId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, UsergroupsSingleGetResponseDataAttributes]): + relationships (Union[Unset, UsergroupsSingleGetResponseDataRelationships]): + meta (Union[Unset, UsergroupsSingleGetResponseDataMeta]): + links (Union[Unset, UsergroupsSingleGetResponseDataLinks]): """ type: Union[Unset, UsergroupsSingleGetResponseDataType] = UNSET @@ -64,7 +63,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_attributes.py index 1431f040..607c4c84 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_attributes.py @@ -20,13 +20,12 @@ @_attrs_define class UsergroupsSingleGetResponseDataAttributes: """ - Attributes - ---------- - description : Union[Unset, UsergroupsSingleGetResponseDataAttributesDescription] - id : Union[Unset, str] - ldap_search_filter : Union[Unset, str] - name : Union[Unset, str] - sso_synchronization_allowed : Union[Unset, bool] + Attributes: + description (Union[Unset, UsergroupsSingleGetResponseDataAttributesDescription]): + id (Union[Unset, str]): Example: MyUserGroupId. + ldap_search_filter (Union[Unset, str]): Example: LDAP Search Filter. + name (Union[Unset, str]): Example: Name. + sso_synchronization_allowed (Union[Unset, bool]): """ description: Union[ @@ -46,8 +45,11 @@ def to_dict(self) -> Dict[str, Any]: description = self.description.to_dict() id = self.id + ldap_search_filter = self.ldap_search_filter + name = self.name + sso_synchronization_allowed = self.sso_synchronization_allowed field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_attributes_description.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_attributes_description.py index b5c75eb0..9b61a91f 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_attributes_description.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_attributes_description.py @@ -17,10 +17,9 @@ @_attrs_define class UsergroupsSingleGetResponseDataAttributesDescription: """ - Attributes - ---------- - type : Union[Unset, UsergroupsSingleGetResponseDataAttributesDescriptionType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, UsergroupsSingleGetResponseDataAttributesDescriptionType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_links.py index 88f0bf83..0c3eb772 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_links.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_links.py @@ -14,9 +14,8 @@ @_attrs_define class UsergroupsSingleGetResponseDataLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/usergroups/MyUserGroupId. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_meta.py index 0e1b7d43..a5eaceaa 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_meta.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_meta.py @@ -20,9 +20,8 @@ @_attrs_define class UsergroupsSingleGetResponseDataMeta: """ - Attributes - ---------- - errors : Union[Unset, List['UsergroupsSingleGetResponseDataMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['UsergroupsSingleGetResponseDataMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_meta_errors_item.py index 6aa32d91..d4328932 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class UsergroupsSingleGetResponseDataMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, UsergroupsSingleGetResponseDataMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, UsergroupsSingleGetResponseDataMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class UsergroupsSingleGetResponseDataMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_meta_errors_item_source.py index ebb8e242..31325e08 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_meta_errors_item_source.py @@ -1,37 +1,50 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.usergroups_single_get_response_data_meta_errors_item_source_resource import ( + UsergroupsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + T = TypeVar("T", bound="UsergroupsSingleGetResponseDataMetaErrorsItemSource") @_attrs_define class UsergroupsSingleGetResponseDataMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, UsergroupsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the + error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "UsergroupsSingleGetResponseDataMetaErrorsItemSourceResource" + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -39,19 +52,37 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.usergroups_single_get_response_data_meta_errors_item_source_resource import ( + UsergroupsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, UsergroupsSingleGetResponseDataMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = UsergroupsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + usergroups_single_get_response_data_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) usergroups_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..e37d6cb8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="UsergroupsSingleGetResponseDataMetaErrorsItemSourceResource" +) + + +@_attrs_define +class UsergroupsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + usergroups_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + usergroups_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return usergroups_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships.py index 8aa44323..86b593fe 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships.py @@ -26,11 +26,10 @@ @_attrs_define class UsergroupsSingleGetResponseDataRelationships: """ - Attributes - ---------- - global_roles : Union[Unset, UsergroupsSingleGetResponseDataRelationshipsGlobalRoles] - project_roles : Union[Unset, UsergroupsSingleGetResponseDataRelationshipsProjectRoles] - users : Union[Unset, UsergroupsSingleGetResponseDataRelationshipsUsers] + Attributes: + global_roles (Union[Unset, UsergroupsSingleGetResponseDataRelationshipsGlobalRoles]): + project_roles (Union[Unset, UsergroupsSingleGetResponseDataRelationshipsProjectRoles]): + users (Union[Unset, UsergroupsSingleGetResponseDataRelationshipsUsers]): """ global_roles: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_global_roles.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_global_roles.py index affd9b01..1ed3fecb 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_global_roles.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_global_roles.py @@ -25,10 +25,9 @@ @_attrs_define class UsergroupsSingleGetResponseDataRelationshipsGlobalRoles: """ - Attributes - ---------- - data : Union[Unset, List['UsergroupsSingleGetResponseDataRelationshipsGlobalRolesDataItem']] - meta : Union[Unset, UsergroupsSingleGetResponseDataRelationshipsGlobalRolesMeta] + Attributes: + data (Union[Unset, List['UsergroupsSingleGetResponseDataRelationshipsGlobalRolesDataItem']]): + meta (Union[Unset, UsergroupsSingleGetResponseDataRelationshipsGlobalRolesMeta]): """ data: Union[ @@ -50,7 +49,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_global_roles_data_item.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_global_roles_data_item.py index c49240c1..999c6d49 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_global_roles_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_global_roles_data_item.py @@ -20,10 +20,9 @@ @_attrs_define class UsergroupsSingleGetResponseDataRelationshipsGlobalRolesDataItem: """ - Attributes - ---------- - type : Union[Unset, UsergroupsSingleGetResponseDataRelationshipsGlobalRolesDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, UsergroupsSingleGetResponseDataRelationshipsGlobalRolesDataItemType]): + id (Union[Unset, str]): Example: MyRoleId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_global_roles_meta.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_global_roles_meta.py index 846b3af2..73656cdf 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_global_roles_meta.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_global_roles_meta.py @@ -16,9 +16,8 @@ @_attrs_define class UsergroupsSingleGetResponseDataRelationshipsGlobalRolesMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_project_roles.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_project_roles.py index 077b29d6..003089a5 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_project_roles.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_project_roles.py @@ -25,10 +25,9 @@ @_attrs_define class UsergroupsSingleGetResponseDataRelationshipsProjectRoles: """ - Attributes - ---------- - data : Union[Unset, List['UsergroupsSingleGetResponseDataRelationshipsProjectRolesDataItem']] - meta : Union[Unset, UsergroupsSingleGetResponseDataRelationshipsProjectRolesMeta] + Attributes: + data (Union[Unset, List['UsergroupsSingleGetResponseDataRelationshipsProjectRolesDataItem']]): + meta (Union[Unset, UsergroupsSingleGetResponseDataRelationshipsProjectRolesMeta]): """ data: Union[ @@ -50,7 +49,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_project_roles_data_item.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_project_roles_data_item.py index 44b02f60..8130b5a6 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_project_roles_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_project_roles_data_item.py @@ -20,10 +20,9 @@ @_attrs_define class UsergroupsSingleGetResponseDataRelationshipsProjectRolesDataItem: """ - Attributes - ---------- - type : Union[Unset, UsergroupsSingleGetResponseDataRelationshipsProjectRolesDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, UsergroupsSingleGetResponseDataRelationshipsProjectRolesDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyRoleId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_project_roles_meta.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_project_roles_meta.py index 1262030e..8d7998ec 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_project_roles_meta.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_project_roles_meta.py @@ -16,9 +16,8 @@ @_attrs_define class UsergroupsSingleGetResponseDataRelationshipsProjectRolesMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_users.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_users.py index 95690699..230c168b 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_users.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_users.py @@ -23,10 +23,9 @@ @_attrs_define class UsergroupsSingleGetResponseDataRelationshipsUsers: """ - Attributes - ---------- - data : Union[Unset, List['UsergroupsSingleGetResponseDataRelationshipsUsersDataItem']] - meta : Union[Unset, UsergroupsSingleGetResponseDataRelationshipsUsersMeta] + Attributes: + data (Union[Unset, List['UsergroupsSingleGetResponseDataRelationshipsUsersDataItem']]): + meta (Union[Unset, UsergroupsSingleGetResponseDataRelationshipsUsersMeta]): """ data: Union[ @@ -46,7 +45,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_users_data_item.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_users_data_item.py index 31726425..953907c5 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_users_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_users_data_item.py @@ -19,11 +19,10 @@ @_attrs_define class UsergroupsSingleGetResponseDataRelationshipsUsersDataItem: """ - Attributes - ---------- - type : Union[Unset, UsergroupsSingleGetResponseDataRelationshipsUsersDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, UsergroupsSingleGetResponseDataRelationshipsUsersDataItemType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_users_meta.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_users_meta.py index 8eb27a29..ea779125 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_users_meta.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_data_relationships_users_meta.py @@ -14,9 +14,8 @@ @_attrs_define class UsergroupsSingleGetResponseDataRelationshipsUsersMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_links.py index bc07ddc6..cff0df6e 100644 --- a/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/usergroups_single_get_response_links.py @@ -14,9 +14,8 @@ @_attrs_define class UsergroupsSingleGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/usergroups/MyUserGroupId. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response.py index bed89034..551e81a0 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response.py @@ -27,14 +27,13 @@ @_attrs_define class UsersListGetResponse: """ - Attributes - ---------- - meta : Union[Unset, UsersListGetResponseMeta] - data : Union[Unset, List['UsersListGetResponseDataItem']] - included : Union[Unset, List['UsersListGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, UsersListGetResponseLinks] + Attributes: + meta (Union[Unset, UsersListGetResponseMeta]): + data (Union[Unset, List['UsersListGetResponseDataItem']]): + included (Union[Unset, List['UsersListGetResponseIncludedItem']]): Related entities might be returned, see Rest API User + Guide. + links (Union[Unset, UsersListGetResponseLinks]): """ meta: Union[Unset, "UsersListGetResponseMeta"] = UNSET @@ -55,7 +54,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) included: Union[Unset, List[Dict[str, Any]]] = UNSET @@ -63,7 +61,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item.py index 1d76ad7c..96466562 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item.py @@ -32,15 +32,14 @@ @_attrs_define class UsersListGetResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, UsersListGetResponseDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, UsersListGetResponseDataItemAttributes] - relationships : Union[Unset, UsersListGetResponseDataItemRelationships] - meta : Union[Unset, UsersListGetResponseDataItemMeta] - links : Union[Unset, UsersListGetResponseDataItemLinks] + Attributes: + type (Union[Unset, UsersListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, UsersListGetResponseDataItemAttributes]): + relationships (Union[Unset, UsersListGetResponseDataItemRelationships]): + meta (Union[Unset, UsersListGetResponseDataItemMeta]): + links (Union[Unset, UsersListGetResponseDataItemLinks]): """ type: Union[Unset, UsersListGetResponseDataItemType] = UNSET @@ -62,7 +61,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_attributes.py index 77df657d..641dbe54 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_attributes.py @@ -20,15 +20,15 @@ @_attrs_define class UsersListGetResponseDataItemAttributes: """ - Attributes - ---------- - avatar_url : Union[Unset, str] - description : Union[Unset, UsersListGetResponseDataItemAttributesDescription] - disabled_notifications : Union[Unset, bool] - email : Union[Unset, str] - id : Union[Unset, str] - initials : Union[Unset, str] - name : Union[Unset, str] + Attributes: + avatar_url (Union[Unset, str]): Example: http://server-host-name/application- + path/icons/avatar/MyUserId/avatar.png?revision=1234. + description (Union[Unset, UsersListGetResponseDataItemAttributesDescription]): + disabled_notifications (Union[Unset, bool]): + email (Union[Unset, str]): Example: Email. + id (Union[Unset, str]): Example: MyUserId. + initials (Union[Unset, str]): Example: Initials. + name (Union[Unset, str]): Example: Name. """ avatar_url: Union[Unset, str] = UNSET @@ -46,14 +46,19 @@ class UsersListGetResponseDataItemAttributes: def to_dict(self) -> Dict[str, Any]: avatar_url = self.avatar_url + description: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.description, Unset): description = self.description.to_dict() disabled_notifications = self.disabled_notifications + email = self.email + id = self.id + initials = self.initials + name = self.name field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_attributes_description.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_attributes_description.py index 96eb0816..fe5d3455 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_attributes_description.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_attributes_description.py @@ -17,10 +17,9 @@ @_attrs_define class UsersListGetResponseDataItemAttributesDescription: """ - Attributes - ---------- - type : Union[Unset, UsersListGetResponseDataItemAttributesDescriptionType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, UsersListGetResponseDataItemAttributesDescriptionType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_links.py index 3f21f0cd..884fc885 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_links.py @@ -14,9 +14,8 @@ @_attrs_define class UsersListGetResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/users/MyUserId. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_meta.py index 9d4d35dd..29ed73ee 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_meta.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_meta.py @@ -20,9 +20,8 @@ @_attrs_define class UsersListGetResponseDataItemMeta: """ - Attributes - ---------- - errors : Union[Unset, List['UsersListGetResponseDataItemMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['UsersListGetResponseDataItemMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_meta_errors_item.py index bc5f9533..5b80bda6 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class UsersListGetResponseDataItemMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, UsersListGetResponseDataItemMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, UsersListGetResponseDataItemMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class UsersListGetResponseDataItemMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_meta_errors_item_source.py index 37008975..78c89fc7 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_meta_errors_item_source.py @@ -1,37 +1,49 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.users_list_get_response_data_item_meta_errors_item_source_resource import ( + UsersListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + T = TypeVar("T", bound="UsersListGetResponseDataItemMetaErrorsItemSource") @_attrs_define class UsersListGetResponseDataItemMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, UsersListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing the error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "UsersListGetResponseDataItemMetaErrorsItemSourceResource" + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -39,19 +51,37 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.users_list_get_response_data_item_meta_errors_item_source_resource import ( + UsersListGetResponseDataItemMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, UsersListGetResponseDataItemMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = UsersListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + users_list_get_response_data_item_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) users_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..9e9d2645 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="UsersListGetResponseDataItemMetaErrorsItemSourceResource" +) + + +@_attrs_define +class UsersListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + users_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + users_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return users_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships.py index 045a9b4c..45363ba0 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships.py @@ -26,11 +26,10 @@ @_attrs_define class UsersListGetResponseDataItemRelationships: """ - Attributes - ---------- - global_roles : Union[Unset, UsersListGetResponseDataItemRelationshipsGlobalRoles] - project_roles : Union[Unset, UsersListGetResponseDataItemRelationshipsProjectRoles] - user_groups : Union[Unset, UsersListGetResponseDataItemRelationshipsUserGroups] + Attributes: + global_roles (Union[Unset, UsersListGetResponseDataItemRelationshipsGlobalRoles]): + project_roles (Union[Unset, UsersListGetResponseDataItemRelationshipsProjectRoles]): + user_groups (Union[Unset, UsersListGetResponseDataItemRelationshipsUserGroups]): """ global_roles: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_global_roles.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_global_roles.py index ffd311bd..b42b089a 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_global_roles.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_global_roles.py @@ -23,10 +23,9 @@ @_attrs_define class UsersListGetResponseDataItemRelationshipsGlobalRoles: """ - Attributes - ---------- - data : Union[Unset, List['UsersListGetResponseDataItemRelationshipsGlobalRolesDataItem']] - meta : Union[Unset, UsersListGetResponseDataItemRelationshipsGlobalRolesMeta] + Attributes: + data (Union[Unset, List['UsersListGetResponseDataItemRelationshipsGlobalRolesDataItem']]): + meta (Union[Unset, UsersListGetResponseDataItemRelationshipsGlobalRolesMeta]): """ data: Union[ @@ -46,7 +45,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_global_roles_data_item.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_global_roles_data_item.py index 575f4526..12772be9 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_global_roles_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_global_roles_data_item.py @@ -19,10 +19,9 @@ @_attrs_define class UsersListGetResponseDataItemRelationshipsGlobalRolesDataItem: """ - Attributes - ---------- - type : Union[Unset, UsersListGetResponseDataItemRelationshipsGlobalRolesDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, UsersListGetResponseDataItemRelationshipsGlobalRolesDataItemType]): + id (Union[Unset, str]): Example: MyRoleId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_global_roles_meta.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_global_roles_meta.py index 0c1aa245..7f8efc01 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_global_roles_meta.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_global_roles_meta.py @@ -16,9 +16,8 @@ @_attrs_define class UsersListGetResponseDataItemRelationshipsGlobalRolesMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_project_roles.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_project_roles.py index 87ccdb3b..2bb2adda 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_project_roles.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_project_roles.py @@ -23,10 +23,9 @@ @_attrs_define class UsersListGetResponseDataItemRelationshipsProjectRoles: """ - Attributes - ---------- - data : Union[Unset, List['UsersListGetResponseDataItemRelationshipsProjectRolesDataItem']] - meta : Union[Unset, UsersListGetResponseDataItemRelationshipsProjectRolesMeta] + Attributes: + data (Union[Unset, List['UsersListGetResponseDataItemRelationshipsProjectRolesDataItem']]): + meta (Union[Unset, UsersListGetResponseDataItemRelationshipsProjectRolesMeta]): """ data: Union[ @@ -46,7 +45,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_project_roles_data_item.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_project_roles_data_item.py index 25e73cb0..9228051a 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_project_roles_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_project_roles_data_item.py @@ -19,10 +19,9 @@ @_attrs_define class UsersListGetResponseDataItemRelationshipsProjectRolesDataItem: """ - Attributes - ---------- - type : Union[Unset, UsersListGetResponseDataItemRelationshipsProjectRolesDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, UsersListGetResponseDataItemRelationshipsProjectRolesDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyRoleId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_project_roles_meta.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_project_roles_meta.py index 21de248b..73950184 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_project_roles_meta.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_project_roles_meta.py @@ -16,9 +16,8 @@ @_attrs_define class UsersListGetResponseDataItemRelationshipsProjectRolesMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_user_groups.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_user_groups.py index 4d1e3ce0..65a920d7 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_user_groups.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_user_groups.py @@ -23,10 +23,9 @@ @_attrs_define class UsersListGetResponseDataItemRelationshipsUserGroups: """ - Attributes - ---------- - data : Union[Unset, List['UsersListGetResponseDataItemRelationshipsUserGroupsDataItem']] - meta : Union[Unset, UsersListGetResponseDataItemRelationshipsUserGroupsMeta] + Attributes: + data (Union[Unset, List['UsersListGetResponseDataItemRelationshipsUserGroupsDataItem']]): + meta (Union[Unset, UsersListGetResponseDataItemRelationshipsUserGroupsMeta]): """ data: Union[ @@ -46,7 +45,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_user_groups_data_item.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_user_groups_data_item.py index b2bfe32d..06b0612d 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_user_groups_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_user_groups_data_item.py @@ -19,11 +19,10 @@ @_attrs_define class UsersListGetResponseDataItemRelationshipsUserGroupsDataItem: """ - Attributes - ---------- - type : Union[Unset, UsersListGetResponseDataItemRelationshipsUserGroupsDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, UsersListGetResponseDataItemRelationshipsUserGroupsDataItemType]): + id (Union[Unset, str]): Example: MyUserGroupId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_user_groups_meta.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_user_groups_meta.py index 5ef3cda3..85ff6459 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_user_groups_meta.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_data_item_relationships_user_groups_meta.py @@ -16,9 +16,8 @@ @_attrs_define class UsersListGetResponseDataItemRelationshipsUserGroupsMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_links.py index 207dc6fd..5110bec8 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_links.py @@ -14,13 +14,17 @@ @_attrs_define class UsersListGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - first : Union[Unset, str] - prev : Union[Unset, str] - next_ : Union[Unset, str] - last : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/users?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/users?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/users?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/users?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/users?page%5Bsize%5D=10&page%5Bnumber%5D=9. """ self_: Union[Unset, str] = UNSET @@ -34,9 +38,13 @@ class UsersListGetResponseLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + first = self.first + prev = self.prev + next_ = self.next_ + last = self.last field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/users_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/users_list_get_response_meta.py index 71c5c3f7..a639fb68 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_get_response_meta.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_get_response_meta.py @@ -14,9 +14,8 @@ @_attrs_define class UsersListGetResponseMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_list_post_request.py b/polarion_rest_api_client/open_api_client/models/users_list_post_request.py index 2ece433e..a02dddf5 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_post_request.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_post_request.py @@ -20,9 +20,8 @@ @_attrs_define class UsersListPostRequest: """ - Attributes - ---------- - data : Union[Unset, List['UsersListPostRequestDataItem']] + Attributes: + data (Union[Unset, List['UsersListPostRequestDataItem']]): """ data: Union[Unset, List["UsersListPostRequestDataItem"]] = UNSET @@ -36,7 +35,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item.py index 355e932f..51088fb8 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item.py @@ -26,11 +26,10 @@ @_attrs_define class UsersListPostRequestDataItem: """ - Attributes - ---------- - type : Union[Unset, UsersListPostRequestDataItemType] - attributes : Union[Unset, UsersListPostRequestDataItemAttributes] - relationships : Union[Unset, UsersListPostRequestDataItemRelationships] + Attributes: + type (Union[Unset, UsersListPostRequestDataItemType]): + attributes (Union[Unset, UsersListPostRequestDataItemAttributes]): + relationships (Union[Unset, UsersListPostRequestDataItemRelationships]): """ type: Union[Unset, UsersListPostRequestDataItemType] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_attributes.py index 7291bdb1..4bda0e8c 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_attributes.py @@ -20,14 +20,13 @@ @_attrs_define class UsersListPostRequestDataItemAttributes: """ - Attributes - ---------- - id : str - description : Union[Unset, UsersListPostRequestDataItemAttributesDescription] - disabled_notifications : Union[Unset, bool] - email : Union[Unset, str] - initials : Union[Unset, str] - name : Union[Unset, str] + Attributes: + id (str): Example: MyUserId. + description (Union[Unset, UsersListPostRequestDataItemAttributesDescription]): + disabled_notifications (Union[Unset, bool]): + email (Union[Unset, str]): Example: Email. + initials (Union[Unset, str]): Example: Initials. + name (Union[Unset, str]): Example: Name. """ id: str @@ -44,13 +43,17 @@ class UsersListPostRequestDataItemAttributes: def to_dict(self) -> Dict[str, Any]: id = self.id + description: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.description, Unset): description = self.description.to_dict() disabled_notifications = self.disabled_notifications + email = self.email + initials = self.initials + name = self.name field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_attributes_description.py b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_attributes_description.py index c0f893c8..0cf5263d 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_attributes_description.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_attributes_description.py @@ -17,10 +17,9 @@ @_attrs_define class UsersListPostRequestDataItemAttributesDescription: """ - Attributes - ---------- - type : Union[Unset, UsersListPostRequestDataItemAttributesDescriptionType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, UsersListPostRequestDataItemAttributesDescriptionType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships.py index c78040fc..ee47e097 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships.py @@ -26,11 +26,10 @@ @_attrs_define class UsersListPostRequestDataItemRelationships: """ - Attributes - ---------- - global_roles : Union[Unset, UsersListPostRequestDataItemRelationshipsGlobalRoles] - project_roles : Union[Unset, UsersListPostRequestDataItemRelationshipsProjectRoles] - user_groups : Union[Unset, UsersListPostRequestDataItemRelationshipsUserGroups] + Attributes: + global_roles (Union[Unset, UsersListPostRequestDataItemRelationshipsGlobalRoles]): + project_roles (Union[Unset, UsersListPostRequestDataItemRelationshipsProjectRoles]): + user_groups (Union[Unset, UsersListPostRequestDataItemRelationshipsUserGroups]): """ global_roles: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_global_roles.py b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_global_roles.py index 9d7436bc..190d3337 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_global_roles.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_global_roles.py @@ -20,9 +20,8 @@ @_attrs_define class UsersListPostRequestDataItemRelationshipsGlobalRoles: """ - Attributes - ---------- - data : Union[Unset, List['UsersListPostRequestDataItemRelationshipsGlobalRolesDataItem']] + Attributes: + data (Union[Unset, List['UsersListPostRequestDataItemRelationshipsGlobalRolesDataItem']]): """ data: Union[ @@ -39,7 +38,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_global_roles_data_item.py b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_global_roles_data_item.py index 17e5b9de..42a6daa4 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_global_roles_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_global_roles_data_item.py @@ -19,10 +19,9 @@ @_attrs_define class UsersListPostRequestDataItemRelationshipsGlobalRolesDataItem: """ - Attributes - ---------- - type : Union[Unset, UsersListPostRequestDataItemRelationshipsGlobalRolesDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, UsersListPostRequestDataItemRelationshipsGlobalRolesDataItemType]): + id (Union[Unset, str]): Example: MyRoleId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_project_roles.py b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_project_roles.py index 809da701..1a6ddc46 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_project_roles.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_project_roles.py @@ -20,9 +20,8 @@ @_attrs_define class UsersListPostRequestDataItemRelationshipsProjectRoles: """ - Attributes - ---------- - data : Union[Unset, List['UsersListPostRequestDataItemRelationshipsProjectRolesDataItem']] + Attributes: + data (Union[Unset, List['UsersListPostRequestDataItemRelationshipsProjectRolesDataItem']]): """ data: Union[ @@ -39,7 +38,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_project_roles_data_item.py b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_project_roles_data_item.py index 9b5af158..46126872 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_project_roles_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_project_roles_data_item.py @@ -19,10 +19,9 @@ @_attrs_define class UsersListPostRequestDataItemRelationshipsProjectRolesDataItem: """ - Attributes - ---------- - type : Union[Unset, UsersListPostRequestDataItemRelationshipsProjectRolesDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, UsersListPostRequestDataItemRelationshipsProjectRolesDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyRoleId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_user_groups.py b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_user_groups.py index 4eab8a28..14491237 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_user_groups.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_user_groups.py @@ -20,9 +20,8 @@ @_attrs_define class UsersListPostRequestDataItemRelationshipsUserGroups: """ - Attributes - ---------- - data : Union[Unset, List['UsersListPostRequestDataItemRelationshipsUserGroupsDataItem']] + Attributes: + data (Union[Unset, List['UsersListPostRequestDataItemRelationshipsUserGroupsDataItem']]): """ data: Union[ @@ -39,7 +38,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_user_groups_data_item.py b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_user_groups_data_item.py index e7774f98..ebf2a94a 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_user_groups_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_post_request_data_item_relationships_user_groups_data_item.py @@ -19,10 +19,9 @@ @_attrs_define class UsersListPostRequestDataItemRelationshipsUserGroupsDataItem: """ - Attributes - ---------- - type : Union[Unset, UsersListPostRequestDataItemRelationshipsUserGroupsDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, UsersListPostRequestDataItemRelationshipsUserGroupsDataItemType]): + id (Union[Unset, str]): Example: MyUserGroupId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/users_list_post_response.py b/polarion_rest_api_client/open_api_client/models/users_list_post_response.py index f024b11b..476dd18f 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_post_response.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_post_response.py @@ -20,9 +20,8 @@ @_attrs_define class UsersListPostResponse: """ - Attributes - ---------- - data : Union[Unset, List['UsersListPostResponseDataItem']] + Attributes: + data (Union[Unset, List['UsersListPostResponseDataItem']]): """ data: Union[Unset, List["UsersListPostResponseDataItem"]] = UNSET @@ -36,7 +35,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/users_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/users_list_post_response_data_item.py index 84a95797..797c4e1f 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_post_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_post_response_data_item.py @@ -23,11 +23,10 @@ @_attrs_define class UsersListPostResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, UsersListPostResponseDataItemType] - id : Union[Unset, str] - links : Union[Unset, UsersListPostResponseDataItemLinks] + Attributes: + type (Union[Unset, UsersListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyUserId. + links (Union[Unset, UsersListPostResponseDataItemLinks]): """ type: Union[Unset, UsersListPostResponseDataItemType] = UNSET @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + links: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/users_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/users_list_post_response_data_item_links.py index 98ef9759..c51d2b2b 100644 --- a/polarion_rest_api_client/open_api_client/models/users_list_post_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/users_list_post_response_data_item_links.py @@ -14,9 +14,8 @@ @_attrs_define class UsersListPostResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/users/MyUserId. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response.py index def1a6ef..55513d82 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response.py @@ -26,13 +26,12 @@ @_attrs_define class UsersSingleGetResponse: """ - Attributes - ---------- - data : Union[Unset, UsersSingleGetResponseData] - included : Union[Unset, List['UsersSingleGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, UsersSingleGetResponseLinks] + Attributes: + data (Union[Unset, UsersSingleGetResponseData]): + included (Union[Unset, List['UsersSingleGetResponseIncludedItem']]): Related entities might be returned, see Rest API User + Guide. + links (Union[Unset, UsersSingleGetResponseLinks]): """ data: Union[Unset, "UsersSingleGetResponseData"] = UNSET @@ -52,7 +51,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data.py index 0235de0e..626216ce 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data.py @@ -32,15 +32,14 @@ @_attrs_define class UsersSingleGetResponseData: """ - Attributes - ---------- - type : Union[Unset, UsersSingleGetResponseDataType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, UsersSingleGetResponseDataAttributes] - relationships : Union[Unset, UsersSingleGetResponseDataRelationships] - meta : Union[Unset, UsersSingleGetResponseDataMeta] - links : Union[Unset, UsersSingleGetResponseDataLinks] + Attributes: + type (Union[Unset, UsersSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, UsersSingleGetResponseDataAttributes]): + relationships (Union[Unset, UsersSingleGetResponseDataRelationships]): + meta (Union[Unset, UsersSingleGetResponseDataMeta]): + links (Union[Unset, UsersSingleGetResponseDataLinks]): """ type: Union[Unset, UsersSingleGetResponseDataType] = UNSET @@ -62,7 +61,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_attributes.py index b14d2be3..0bcbfc83 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_attributes.py @@ -20,15 +20,15 @@ @_attrs_define class UsersSingleGetResponseDataAttributes: """ - Attributes - ---------- - avatar_url : Union[Unset, str] - description : Union[Unset, UsersSingleGetResponseDataAttributesDescription] - disabled_notifications : Union[Unset, bool] - email : Union[Unset, str] - id : Union[Unset, str] - initials : Union[Unset, str] - name : Union[Unset, str] + Attributes: + avatar_url (Union[Unset, str]): Example: http://server-host-name/application- + path/icons/avatar/MyUserId/avatar.png?revision=1234. + description (Union[Unset, UsersSingleGetResponseDataAttributesDescription]): + disabled_notifications (Union[Unset, bool]): + email (Union[Unset, str]): Example: Email. + id (Union[Unset, str]): Example: MyUserId. + initials (Union[Unset, str]): Example: Initials. + name (Union[Unset, str]): Example: Name. """ avatar_url: Union[Unset, str] = UNSET @@ -46,14 +46,19 @@ class UsersSingleGetResponseDataAttributes: def to_dict(self) -> Dict[str, Any]: avatar_url = self.avatar_url + description: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.description, Unset): description = self.description.to_dict() disabled_notifications = self.disabled_notifications + email = self.email + id = self.id + initials = self.initials + name = self.name field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_attributes_description.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_attributes_description.py index bbc64469..f410f466 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_attributes_description.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_attributes_description.py @@ -17,10 +17,9 @@ @_attrs_define class UsersSingleGetResponseDataAttributesDescription: """ - Attributes - ---------- - type : Union[Unset, UsersSingleGetResponseDataAttributesDescriptionType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, UsersSingleGetResponseDataAttributesDescriptionType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_links.py index 22937e3a..879a2fcf 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_links.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_links.py @@ -14,9 +14,8 @@ @_attrs_define class UsersSingleGetResponseDataLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/users/MyUserId. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_meta.py index 399b547c..55ced329 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_meta.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_meta.py @@ -20,9 +20,8 @@ @_attrs_define class UsersSingleGetResponseDataMeta: """ - Attributes - ---------- - errors : Union[Unset, List['UsersSingleGetResponseDataMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['UsersSingleGetResponseDataMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_meta_errors_item.py index 71cf7406..db7f70a1 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class UsersSingleGetResponseDataMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, UsersSingleGetResponseDataMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, UsersSingleGetResponseDataMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class UsersSingleGetResponseDataMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_meta_errors_item_source.py index fb17d8af..842bb4db 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_meta_errors_item_source.py @@ -1,37 +1,49 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.users_single_get_response_data_meta_errors_item_source_resource import ( + UsersSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + T = TypeVar("T", bound="UsersSingleGetResponseDataMetaErrorsItemSource") @_attrs_define class UsersSingleGetResponseDataMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, UsersSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "UsersSingleGetResponseDataMetaErrorsItemSourceResource" + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -39,19 +51,37 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.users_single_get_response_data_meta_errors_item_source_resource import ( + UsersSingleGetResponseDataMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, UsersSingleGetResponseDataMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = UsersSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + users_single_get_response_data_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) users_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..8b9ddf5c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,81 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="UsersSingleGetResponseDataMetaErrorsItemSourceResource" +) + + +@_attrs_define +class UsersSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + users_single_get_response_data_meta_errors_item_source_resource_obj = ( + cls( + id=id, + type=type, + ) + ) + + users_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return ( + users_single_get_response_data_meta_errors_item_source_resource_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships.py index 8514ab4c..5a467125 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships.py @@ -26,11 +26,10 @@ @_attrs_define class UsersSingleGetResponseDataRelationships: """ - Attributes - ---------- - global_roles : Union[Unset, UsersSingleGetResponseDataRelationshipsGlobalRoles] - project_roles : Union[Unset, UsersSingleGetResponseDataRelationshipsProjectRoles] - user_groups : Union[Unset, UsersSingleGetResponseDataRelationshipsUserGroups] + Attributes: + global_roles (Union[Unset, UsersSingleGetResponseDataRelationshipsGlobalRoles]): + project_roles (Union[Unset, UsersSingleGetResponseDataRelationshipsProjectRoles]): + user_groups (Union[Unset, UsersSingleGetResponseDataRelationshipsUserGroups]): """ global_roles: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_global_roles.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_global_roles.py index f223dd83..733597f7 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_global_roles.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_global_roles.py @@ -23,10 +23,9 @@ @_attrs_define class UsersSingleGetResponseDataRelationshipsGlobalRoles: """ - Attributes - ---------- - data : Union[Unset, List['UsersSingleGetResponseDataRelationshipsGlobalRolesDataItem']] - meta : Union[Unset, UsersSingleGetResponseDataRelationshipsGlobalRolesMeta] + Attributes: + data (Union[Unset, List['UsersSingleGetResponseDataRelationshipsGlobalRolesDataItem']]): + meta (Union[Unset, UsersSingleGetResponseDataRelationshipsGlobalRolesMeta]): """ data: Union[ @@ -46,7 +45,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_global_roles_data_item.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_global_roles_data_item.py index 8cc7cac1..3bb44bbb 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_global_roles_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_global_roles_data_item.py @@ -19,10 +19,9 @@ @_attrs_define class UsersSingleGetResponseDataRelationshipsGlobalRolesDataItem: """ - Attributes - ---------- - type : Union[Unset, UsersSingleGetResponseDataRelationshipsGlobalRolesDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, UsersSingleGetResponseDataRelationshipsGlobalRolesDataItemType]): + id (Union[Unset, str]): Example: MyRoleId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_global_roles_meta.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_global_roles_meta.py index ae8b68c8..53530c38 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_global_roles_meta.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_global_roles_meta.py @@ -16,9 +16,8 @@ @_attrs_define class UsersSingleGetResponseDataRelationshipsGlobalRolesMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_project_roles.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_project_roles.py index 6db12445..a039d58a 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_project_roles.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_project_roles.py @@ -23,10 +23,9 @@ @_attrs_define class UsersSingleGetResponseDataRelationshipsProjectRoles: """ - Attributes - ---------- - data : Union[Unset, List['UsersSingleGetResponseDataRelationshipsProjectRolesDataItem']] - meta : Union[Unset, UsersSingleGetResponseDataRelationshipsProjectRolesMeta] + Attributes: + data (Union[Unset, List['UsersSingleGetResponseDataRelationshipsProjectRolesDataItem']]): + meta (Union[Unset, UsersSingleGetResponseDataRelationshipsProjectRolesMeta]): """ data: Union[ @@ -46,7 +45,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_project_roles_data_item.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_project_roles_data_item.py index 41a6a452..20809548 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_project_roles_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_project_roles_data_item.py @@ -19,10 +19,9 @@ @_attrs_define class UsersSingleGetResponseDataRelationshipsProjectRolesDataItem: """ - Attributes - ---------- - type : Union[Unset, UsersSingleGetResponseDataRelationshipsProjectRolesDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, UsersSingleGetResponseDataRelationshipsProjectRolesDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyRoleId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_project_roles_meta.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_project_roles_meta.py index c248d4c0..ea121b8f 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_project_roles_meta.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_project_roles_meta.py @@ -16,9 +16,8 @@ @_attrs_define class UsersSingleGetResponseDataRelationshipsProjectRolesMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_user_groups.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_user_groups.py index 2b2e802a..f7ba5a1b 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_user_groups.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_user_groups.py @@ -23,10 +23,9 @@ @_attrs_define class UsersSingleGetResponseDataRelationshipsUserGroups: """ - Attributes - ---------- - data : Union[Unset, List['UsersSingleGetResponseDataRelationshipsUserGroupsDataItem']] - meta : Union[Unset, UsersSingleGetResponseDataRelationshipsUserGroupsMeta] + Attributes: + data (Union[Unset, List['UsersSingleGetResponseDataRelationshipsUserGroupsDataItem']]): + meta (Union[Unset, UsersSingleGetResponseDataRelationshipsUserGroupsMeta]): """ data: Union[ @@ -46,7 +45,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_user_groups_data_item.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_user_groups_data_item.py index 8a4abb75..fde9b30a 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_user_groups_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_user_groups_data_item.py @@ -19,11 +19,10 @@ @_attrs_define class UsersSingleGetResponseDataRelationshipsUserGroupsDataItem: """ - Attributes - ---------- - type : Union[Unset, UsersSingleGetResponseDataRelationshipsUserGroupsDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, UsersSingleGetResponseDataRelationshipsUserGroupsDataItemType]): + id (Union[Unset, str]): Example: MyUserGroupId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_user_groups_meta.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_user_groups_meta.py index d406ce7f..79785d62 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_user_groups_meta.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_data_relationships_user_groups_meta.py @@ -14,9 +14,8 @@ @_attrs_define class UsersSingleGetResponseDataRelationshipsUserGroupsMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/users_single_get_response_links.py index 6bc25bff..03d654e9 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_get_response_links.py @@ -14,9 +14,8 @@ @_attrs_define class UsersSingleGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application-path/users/MyUserId. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_single_patch_request.py b/polarion_rest_api_client/open_api_client/models/users_single_patch_request.py index b5b0a198..ebac94a4 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_patch_request.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_patch_request.py @@ -20,9 +20,8 @@ @_attrs_define class UsersSinglePatchRequest: """ - Attributes - ---------- - data : Union[Unset, UsersSinglePatchRequestData] + Attributes: + data (Union[Unset, UsersSinglePatchRequestData]): """ data: Union[Unset, "UsersSinglePatchRequestData"] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data.py b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data.py index 5520e9a1..b6d9d51f 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data.py @@ -26,12 +26,11 @@ @_attrs_define class UsersSinglePatchRequestData: """ - Attributes - ---------- - type : Union[Unset, UsersSinglePatchRequestDataType] - id : Union[Unset, str] - attributes : Union[Unset, UsersSinglePatchRequestDataAttributes] - relationships : Union[Unset, UsersSinglePatchRequestDataRelationships] + Attributes: + type (Union[Unset, UsersSinglePatchRequestDataType]): + id (Union[Unset, str]): Example: MyUserId. + attributes (Union[Unset, UsersSinglePatchRequestDataAttributes]): + relationships (Union[Unset, UsersSinglePatchRequestDataRelationships]): """ type: Union[Unset, UsersSinglePatchRequestDataType] = UNSET @@ -50,6 +49,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_attributes.py b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_attributes.py index 8a46fb7c..62d2b21e 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_attributes.py @@ -20,13 +20,12 @@ @_attrs_define class UsersSinglePatchRequestDataAttributes: """ - Attributes - ---------- - description : Union[Unset, UsersSinglePatchRequestDataAttributesDescription] - disabled_notifications : Union[Unset, bool] - email : Union[Unset, str] - initials : Union[Unset, str] - name : Union[Unset, str] + Attributes: + description (Union[Unset, UsersSinglePatchRequestDataAttributesDescription]): + disabled_notifications (Union[Unset, bool]): + email (Union[Unset, str]): Example: Email. + initials (Union[Unset, str]): Example: Initials. + name (Union[Unset, str]): Example: Name. """ description: Union[ @@ -46,8 +45,11 @@ def to_dict(self) -> Dict[str, Any]: description = self.description.to_dict() disabled_notifications = self.disabled_notifications + email = self.email + initials = self.initials + name = self.name field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_attributes_description.py b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_attributes_description.py index 5072587a..80719d17 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_attributes_description.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_attributes_description.py @@ -17,10 +17,9 @@ @_attrs_define class UsersSinglePatchRequestDataAttributesDescription: """ - Attributes - ---------- - type : Union[Unset, UsersSinglePatchRequestDataAttributesDescriptionType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, UsersSinglePatchRequestDataAttributesDescriptionType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships.py b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships.py index 585e6239..f25f0554 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships.py @@ -26,11 +26,10 @@ @_attrs_define class UsersSinglePatchRequestDataRelationships: """ - Attributes - ---------- - global_roles : Union[Unset, UsersSinglePatchRequestDataRelationshipsGlobalRoles] - project_roles : Union[Unset, UsersSinglePatchRequestDataRelationshipsProjectRoles] - user_groups : Union[Unset, UsersSinglePatchRequestDataRelationshipsUserGroups] + Attributes: + global_roles (Union[Unset, UsersSinglePatchRequestDataRelationshipsGlobalRoles]): + project_roles (Union[Unset, UsersSinglePatchRequestDataRelationshipsProjectRoles]): + user_groups (Union[Unset, UsersSinglePatchRequestDataRelationshipsUserGroups]): """ global_roles: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_global_roles.py b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_global_roles.py index 70f6eb77..5d54772e 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_global_roles.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_global_roles.py @@ -20,9 +20,8 @@ @_attrs_define class UsersSinglePatchRequestDataRelationshipsGlobalRoles: """ - Attributes - ---------- - data : Union[Unset, List['UsersSinglePatchRequestDataRelationshipsGlobalRolesDataItem']] + Attributes: + data (Union[Unset, List['UsersSinglePatchRequestDataRelationshipsGlobalRolesDataItem']]): """ data: Union[ @@ -39,7 +38,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_global_roles_data_item.py b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_global_roles_data_item.py index 4359adea..08ea7e2b 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_global_roles_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_global_roles_data_item.py @@ -19,10 +19,9 @@ @_attrs_define class UsersSinglePatchRequestDataRelationshipsGlobalRolesDataItem: """ - Attributes - ---------- - type : Union[Unset, UsersSinglePatchRequestDataRelationshipsGlobalRolesDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, UsersSinglePatchRequestDataRelationshipsGlobalRolesDataItemType]): + id (Union[Unset, str]): Example: MyRoleId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_project_roles.py b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_project_roles.py index 2f2cb578..99d60ed1 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_project_roles.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_project_roles.py @@ -20,9 +20,8 @@ @_attrs_define class UsersSinglePatchRequestDataRelationshipsProjectRoles: """ - Attributes - ---------- - data : Union[Unset, List['UsersSinglePatchRequestDataRelationshipsProjectRolesDataItem']] + Attributes: + data (Union[Unset, List['UsersSinglePatchRequestDataRelationshipsProjectRolesDataItem']]): """ data: Union[ @@ -39,7 +38,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_project_roles_data_item.py b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_project_roles_data_item.py index ffcab0b5..c44989d6 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_project_roles_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_project_roles_data_item.py @@ -19,10 +19,9 @@ @_attrs_define class UsersSinglePatchRequestDataRelationshipsProjectRolesDataItem: """ - Attributes - ---------- - type : Union[Unset, UsersSinglePatchRequestDataRelationshipsProjectRolesDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, UsersSinglePatchRequestDataRelationshipsProjectRolesDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyRoleId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_user_groups.py b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_user_groups.py index cd3407e4..23be4285 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_user_groups.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_user_groups.py @@ -20,9 +20,8 @@ @_attrs_define class UsersSinglePatchRequestDataRelationshipsUserGroups: """ - Attributes - ---------- - data : Union[Unset, List['UsersSinglePatchRequestDataRelationshipsUserGroupsDataItem']] + Attributes: + data (Union[Unset, List['UsersSinglePatchRequestDataRelationshipsUserGroupsDataItem']]): """ data: Union[ @@ -39,7 +38,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_user_groups_data_item.py b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_user_groups_data_item.py index bd3b042a..a8b95b27 100644 --- a/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_user_groups_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/users_single_patch_request_data_relationships_user_groups_data_item.py @@ -19,10 +19,9 @@ @_attrs_define class UsersSinglePatchRequestDataRelationshipsUserGroupsDataItem: """ - Attributes - ---------- - type : Union[Unset, UsersSinglePatchRequestDataRelationshipsUserGroupsDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, UsersSinglePatchRequestDataRelationshipsUserGroupsDataItemType]): + id (Union[Unset, str]): Example: MyUserGroupId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workflow_actions_action_response_body.py b/polarion_rest_api_client/open_api_client/models/workflow_actions_action_response_body.py new file mode 100644 index 00000000..1602fff9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workflow_actions_action_response_body.py @@ -0,0 +1,131 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workflow_actions_action_response_body_data_item import ( + WorkflowActionsActionResponseBodyDataItem, + ) + from ..models.workflow_actions_action_response_body_links import ( + WorkflowActionsActionResponseBodyLinks, + ) + from ..models.workflow_actions_action_response_body_meta import ( + WorkflowActionsActionResponseBodyMeta, + ) + + +T = TypeVar("T", bound="WorkflowActionsActionResponseBody") + + +@_attrs_define +class WorkflowActionsActionResponseBody: + """ + Attributes: + meta (Union[Unset, WorkflowActionsActionResponseBodyMeta]): + data (Union[Unset, List['WorkflowActionsActionResponseBodyDataItem']]): + links (Union[Unset, WorkflowActionsActionResponseBodyLinks]): + """ + + meta: Union[Unset, "WorkflowActionsActionResponseBodyMeta"] = UNSET + data: Union[ + Unset, List["WorkflowActionsActionResponseBodyDataItem"] + ] = UNSET + links: Union[Unset, "WorkflowActionsActionResponseBodyLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workflow_actions_action_response_body_data_item import ( + WorkflowActionsActionResponseBodyDataItem, + ) + from ..models.workflow_actions_action_response_body_links import ( + WorkflowActionsActionResponseBodyLinks, + ) + from ..models.workflow_actions_action_response_body_meta import ( + WorkflowActionsActionResponseBodyMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, WorkflowActionsActionResponseBodyMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkflowActionsActionResponseBodyMeta.from_dict(_meta) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkflowActionsActionResponseBodyDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, WorkflowActionsActionResponseBodyLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = WorkflowActionsActionResponseBodyLinks.from_dict(_links) + + workflow_actions_action_response_body_obj = cls( + meta=meta, + data=data, + links=links, + ) + + workflow_actions_action_response_body_obj.additional_properties = d + return workflow_actions_action_response_body_obj + + @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/polarion_rest_api_client/open_api_client/models/workflow_actions_action_response_body_data_item.py b/polarion_rest_api_client/open_api_client/models/workflow_actions_action_response_body_data_item.py new file mode 100644 index 00000000..dd248e0c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workflow_actions_action_response_body_data_item.py @@ -0,0 +1,161 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkflowActionsActionResponseBodyDataItem") + + +@_attrs_define +class WorkflowActionsActionResponseBodyDataItem: + """ + Attributes: + id (Union[Unset, str]): + available (Union[Unset, bool]): + cleared_fields (Union[Unset, List[str]]): + is_signature_required (Union[Unset, bool]): + is_adding_signature (Union[Unset, bool]): + native_action_id (Union[Unset, str]): + name (Union[Unset, str]): + required_fields (Union[Unset, List[str]]): + target_status (Union[Unset, str]): + unavailable_reason (Union[Unset, str]): + required_roles (Union[Unset, List[str]]): + """ + + id: Union[Unset, str] = UNSET + available: Union[Unset, bool] = UNSET + cleared_fields: Union[Unset, List[str]] = UNSET + is_signature_required: Union[Unset, bool] = UNSET + is_adding_signature: Union[Unset, bool] = UNSET + native_action_id: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + required_fields: Union[Unset, List[str]] = UNSET + target_status: Union[Unset, str] = UNSET + unavailable_reason: Union[Unset, str] = UNSET + required_roles: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + available = self.available + + cleared_fields: Union[Unset, List[str]] = UNSET + if not isinstance(self.cleared_fields, Unset): + cleared_fields = self.cleared_fields + + is_signature_required = self.is_signature_required + + is_adding_signature = self.is_adding_signature + + native_action_id = self.native_action_id + + name = self.name + + required_fields: Union[Unset, List[str]] = UNSET + if not isinstance(self.required_fields, Unset): + required_fields = self.required_fields + + target_status = self.target_status + + unavailable_reason = self.unavailable_reason + + required_roles: Union[Unset, List[str]] = UNSET + if not isinstance(self.required_roles, Unset): + required_roles = self.required_roles + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if available is not UNSET: + field_dict["available"] = available + if cleared_fields is not UNSET: + field_dict["clearedFields"] = cleared_fields + if is_signature_required is not UNSET: + field_dict["isSignatureRequired"] = is_signature_required + if is_adding_signature is not UNSET: + field_dict["isAddingSignature"] = is_adding_signature + if native_action_id is not UNSET: + field_dict["nativeActionId"] = native_action_id + if name is not UNSET: + field_dict["name"] = name + if required_fields is not UNSET: + field_dict["requiredFields"] = required_fields + if target_status is not UNSET: + field_dict["targetStatus"] = target_status + if unavailable_reason is not UNSET: + field_dict["unavailableReason"] = unavailable_reason + if required_roles is not UNSET: + field_dict["requiredRoles"] = required_roles + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + available = d.pop("available", UNSET) + + cleared_fields = cast(List[str], d.pop("clearedFields", UNSET)) + + is_signature_required = d.pop("isSignatureRequired", UNSET) + + is_adding_signature = d.pop("isAddingSignature", UNSET) + + native_action_id = d.pop("nativeActionId", UNSET) + + name = d.pop("name", UNSET) + + required_fields = cast(List[str], d.pop("requiredFields", UNSET)) + + target_status = d.pop("targetStatus", UNSET) + + unavailable_reason = d.pop("unavailableReason", UNSET) + + required_roles = cast(List[str], d.pop("requiredRoles", UNSET)) + + workflow_actions_action_response_body_data_item_obj = cls( + id=id, + available=available, + cleared_fields=cleared_fields, + is_signature_required=is_signature_required, + is_adding_signature=is_adding_signature, + native_action_id=native_action_id, + name=name, + required_fields=required_fields, + target_status=target_status, + unavailable_reason=unavailable_reason, + required_roles=required_roles, + ) + + workflow_actions_action_response_body_data_item_obj.additional_properties = ( + d + ) + return workflow_actions_action_response_body_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workflow_actions_action_response_body_links.py b/polarion_rest_api_client/open_api_client/models/workflow_actions_action_response_body_links.py new file mode 100644 index 00000000..91dd0ce3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workflow_actions_action_response_body_links.py @@ -0,0 +1,106 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkflowActionsActionResponseBodyLinks") + + +@_attrs_define +class WorkflowActionsActionResponseBodyLinks: + """ + Attributes: + first (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/actions/getWorkflowActions?page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/actions/getWorkflowActions?page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/actions/getWorkflowActions?page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/actions/getWorkflowActions?page%5Bnumber%5D=9. + self_ (Union[Unset, str]): Example: server-host-name/application-path/projects/MyProjectId/workitems/MyWorkItem + Id/actions/getWorkflowActions?page%5Bsize%5D=10&page%5Bnumber%5D=5. + """ + + first: Union[Unset, str] = UNSET + prev: Union[Unset, str] = UNSET + next_: Union[Unset, str] = UNSET + last: Union[Unset, str] = UNSET + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + first = self.first + + prev = self.prev + + next_ = self.next_ + + last = self.last + + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if first is not UNSET: + field_dict["first"] = first + if prev is not UNSET: + field_dict["prev"] = prev + if next_ is not UNSET: + field_dict["next"] = next_ + if last is not UNSET: + field_dict["last"] = last + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + first = d.pop("first", UNSET) + + prev = d.pop("prev", UNSET) + + next_ = d.pop("next", UNSET) + + last = d.pop("last", UNSET) + + self_ = d.pop("self", UNSET) + + workflow_actions_action_response_body_links_obj = cls( + first=first, + prev=prev, + next_=next_, + last=last, + self_=self_, + ) + + workflow_actions_action_response_body_links_obj.additional_properties = ( + d + ) + return workflow_actions_action_response_body_links_obj + + @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/polarion_rest_api_client/open_api_client/models/workflow_actions_action_response_body_meta.py b/polarion_rest_api_client/open_api_client/models/workflow_actions_action_response_body_meta.py new file mode 100644 index 00000000..8c3ca8a5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workflow_actions_action_response_body_meta.py @@ -0,0 +1,65 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkflowActionsActionResponseBodyMeta") + + +@_attrs_define +class WorkflowActionsActionResponseBodyMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workflow_actions_action_response_body_meta_obj = cls( + total_count=total_count, + ) + + workflow_actions_action_response_body_meta_obj.additional_properties = ( + d + ) + return workflow_actions_action_response_body_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_delete_request.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_delete_request.py new file mode 100644 index 00000000..8b68f36a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_delete_request.py @@ -0,0 +1,87 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_list_delete_request_data_item import ( + WorkitemApprovalsListDeleteRequestDataItem, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsListDeleteRequest") + + +@_attrs_define +class WorkitemApprovalsListDeleteRequest: + """ + Attributes: + data (Union[Unset, List['WorkitemApprovalsListDeleteRequestDataItem']]): + """ + + data: Union[ + Unset, List["WorkitemApprovalsListDeleteRequestDataItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_list_delete_request_data_item import ( + WorkitemApprovalsListDeleteRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemApprovalsListDeleteRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + workitem_approvals_list_delete_request_obj = cls( + data=data, + ) + + workitem_approvals_list_delete_request_obj.additional_properties = d + return workitem_approvals_list_delete_request_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_delete_request_data_item.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_delete_request_data_item.py new file mode 100644 index 00000000..bf0cb5c3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_delete_request_data_item.py @@ -0,0 +1,84 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitem_approvals_list_delete_request_data_item_type import ( + WorkitemApprovalsListDeleteRequestDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkitemApprovalsListDeleteRequestDataItem") + + +@_attrs_define +class WorkitemApprovalsListDeleteRequestDataItem: + """ + Attributes: + type (Union[Unset, WorkitemApprovalsListDeleteRequestDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyUserId. + """ + + type: Union[Unset, WorkitemApprovalsListDeleteRequestDataItemType] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, WorkitemApprovalsListDeleteRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemApprovalsListDeleteRequestDataItemType(_type) + + id = d.pop("id", UNSET) + + workitem_approvals_list_delete_request_data_item_obj = cls( + type=type, + id=id, + ) + + workitem_approvals_list_delete_request_data_item_obj.additional_properties = ( + d + ) + return workitem_approvals_list_delete_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_delete_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_delete_request_data_item_type.py new file mode 100644 index 00000000..e774c125 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_delete_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemApprovalsListDeleteRequestDataItemType(str, Enum): + WORKITEM_APPROVALS = "workitem_approvals" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response.py new file mode 100644 index 00000000..884c7cc8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response.py @@ -0,0 +1,164 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_list_get_response_data_item import ( + WorkitemApprovalsListGetResponseDataItem, + ) + from ..models.workitem_approvals_list_get_response_included_item import ( + WorkitemApprovalsListGetResponseIncludedItem, + ) + from ..models.workitem_approvals_list_get_response_links import ( + WorkitemApprovalsListGetResponseLinks, + ) + from ..models.workitem_approvals_list_get_response_meta import ( + WorkitemApprovalsListGetResponseMeta, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsListGetResponse") + + +@_attrs_define +class WorkitemApprovalsListGetResponse: + """ + Attributes: + meta (Union[Unset, WorkitemApprovalsListGetResponseMeta]): + data (Union[Unset, List['WorkitemApprovalsListGetResponseDataItem']]): + included (Union[Unset, List['WorkitemApprovalsListGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, WorkitemApprovalsListGetResponseLinks]): + """ + + meta: Union[Unset, "WorkitemApprovalsListGetResponseMeta"] = UNSET + data: Union[ + Unset, List["WorkitemApprovalsListGetResponseDataItem"] + ] = UNSET + included: Union[ + Unset, List["WorkitemApprovalsListGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "WorkitemApprovalsListGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_list_get_response_data_item import ( + WorkitemApprovalsListGetResponseDataItem, + ) + from ..models.workitem_approvals_list_get_response_included_item import ( + WorkitemApprovalsListGetResponseIncludedItem, + ) + from ..models.workitem_approvals_list_get_response_links import ( + WorkitemApprovalsListGetResponseLinks, + ) + from ..models.workitem_approvals_list_get_response_meta import ( + WorkitemApprovalsListGetResponseMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, WorkitemApprovalsListGetResponseMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkitemApprovalsListGetResponseMeta.from_dict(_meta) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemApprovalsListGetResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + WorkitemApprovalsListGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, WorkitemApprovalsListGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = WorkitemApprovalsListGetResponseLinks.from_dict(_links) + + workitem_approvals_list_get_response_obj = cls( + meta=meta, + data=data, + included=included, + links=links, + ) + + workitem_approvals_list_get_response_obj.additional_properties = d + return workitem_approvals_list_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item.py new file mode 100644 index 00000000..4f8116d2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item.py @@ -0,0 +1,205 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitem_approvals_list_get_response_data_item_type import ( + WorkitemApprovalsListGetResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_list_get_response_data_item_attributes import ( + WorkitemApprovalsListGetResponseDataItemAttributes, + ) + from ..models.workitem_approvals_list_get_response_data_item_links import ( + WorkitemApprovalsListGetResponseDataItemLinks, + ) + from ..models.workitem_approvals_list_get_response_data_item_meta import ( + WorkitemApprovalsListGetResponseDataItemMeta, + ) + from ..models.workitem_approvals_list_get_response_data_item_relationships import ( + WorkitemApprovalsListGetResponseDataItemRelationships, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsListGetResponseDataItem") + + +@_attrs_define +class WorkitemApprovalsListGetResponseDataItem: + """ + Attributes: + type (Union[Unset, WorkitemApprovalsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyUserId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, WorkitemApprovalsListGetResponseDataItemAttributes]): + relationships (Union[Unset, WorkitemApprovalsListGetResponseDataItemRelationships]): + meta (Union[Unset, WorkitemApprovalsListGetResponseDataItemMeta]): + links (Union[Unset, WorkitemApprovalsListGetResponseDataItemLinks]): + """ + + type: Union[Unset, WorkitemApprovalsListGetResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "WorkitemApprovalsListGetResponseDataItemAttributes" + ] = UNSET + relationships: Union[ + Unset, "WorkitemApprovalsListGetResponseDataItemRelationships" + ] = UNSET + meta: Union[Unset, "WorkitemApprovalsListGetResponseDataItemMeta"] = UNSET + links: Union[ + Unset, "WorkitemApprovalsListGetResponseDataItemLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_list_get_response_data_item_attributes import ( + WorkitemApprovalsListGetResponseDataItemAttributes, + ) + from ..models.workitem_approvals_list_get_response_data_item_links import ( + WorkitemApprovalsListGetResponseDataItemLinks, + ) + from ..models.workitem_approvals_list_get_response_data_item_meta import ( + WorkitemApprovalsListGetResponseDataItemMeta, + ) + from ..models.workitem_approvals_list_get_response_data_item_relationships import ( + WorkitemApprovalsListGetResponseDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, WorkitemApprovalsListGetResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemApprovalsListGetResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, WorkitemApprovalsListGetResponseDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + WorkitemApprovalsListGetResponseDataItemAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, WorkitemApprovalsListGetResponseDataItemRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = WorkitemApprovalsListGetResponseDataItemRelationships.from_dict( + _relationships + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, WorkitemApprovalsListGetResponseDataItemMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkitemApprovalsListGetResponseDataItemMeta.from_dict( + _meta + ) + + _links = d.pop("links", UNSET) + links: Union[Unset, WorkitemApprovalsListGetResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = WorkitemApprovalsListGetResponseDataItemLinks.from_dict( + _links + ) + + workitem_approvals_list_get_response_data_item_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + workitem_approvals_list_get_response_data_item_obj.additional_properties = ( + d + ) + return workitem_approvals_list_get_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_attributes.py new file mode 100644 index 00000000..030ee492 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_attributes.py @@ -0,0 +1,81 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitem_approvals_list_get_response_data_item_attributes_status import ( + WorkitemApprovalsListGetResponseDataItemAttributesStatus, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkitemApprovalsListGetResponseDataItemAttributes") + + +@_attrs_define +class WorkitemApprovalsListGetResponseDataItemAttributes: + """ + Attributes: + status (Union[Unset, WorkitemApprovalsListGetResponseDataItemAttributesStatus]): Example: waiting. + """ + + status: Union[ + Unset, WorkitemApprovalsListGetResponseDataItemAttributesStatus + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _status = d.pop("status", UNSET) + status: Union[ + Unset, WorkitemApprovalsListGetResponseDataItemAttributesStatus + ] + if isinstance(_status, Unset): + status = UNSET + else: + status = WorkitemApprovalsListGetResponseDataItemAttributesStatus( + _status + ) + + workitem_approvals_list_get_response_data_item_attributes_obj = cls( + status=status, + ) + + workitem_approvals_list_get_response_data_item_attributes_obj.additional_properties = ( + d + ) + return workitem_approvals_list_get_response_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_attributes_status.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_attributes_status.py new file mode 100644 index 00000000..c062fdb7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_attributes_status.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemApprovalsListGetResponseDataItemAttributesStatus(str, Enum): + APPROVED = "approved" + DISAPPROVED = "disapproved" + WAITING = "waiting" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_links.py new file mode 100644 index 00000000..6378b71d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkitemApprovalsListGetResponseDataItemLinks") + + +@_attrs_define +class WorkitemApprovalsListGetResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/approvals/MyUserId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + workitem_approvals_list_get_response_data_item_links_obj = cls( + self_=self_, + ) + + workitem_approvals_list_get_response_data_item_links_obj.additional_properties = ( + d + ) + return workitem_approvals_list_get_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_meta.py new file mode 100644 index 00000000..4521a592 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_meta.py @@ -0,0 +1,89 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_list_get_response_data_item_meta_errors_item import ( + WorkitemApprovalsListGetResponseDataItemMetaErrorsItem, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsListGetResponseDataItemMeta") + + +@_attrs_define +class WorkitemApprovalsListGetResponseDataItemMeta: + """ + Attributes: + errors (Union[Unset, List['WorkitemApprovalsListGetResponseDataItemMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["WorkitemApprovalsListGetResponseDataItemMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_list_get_response_data_item_meta_errors_item import ( + WorkitemApprovalsListGetResponseDataItemMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = WorkitemApprovalsListGetResponseDataItemMetaErrorsItem.from_dict( + errors_item_data + ) + + errors.append(errors_item) + + workitem_approvals_list_get_response_data_item_meta_obj = cls( + errors=errors, + ) + + workitem_approvals_list_get_response_data_item_meta_obj.additional_properties = ( + d + ) + return workitem_approvals_list_get_response_data_item_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_meta_errors_item.py new file mode 100644 index 00000000..cc53de76 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_meta_errors_item.py @@ -0,0 +1,122 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_list_get_response_data_item_meta_errors_item_source import ( + WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSource, + ) + + +T = TypeVar( + "T", bound="WorkitemApprovalsListGetResponseDataItemMetaErrorsItem" +) + + +@_attrs_define +class WorkitemApprovalsListGetResponseDataItemMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_list_get_response_data_item_meta_errors_item_source import ( + WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSource.from_dict( + _source + ) + + workitem_approvals_list_get_response_data_item_meta_errors_item_obj = ( + cls( + status=status, + title=title, + detail=detail, + source=source, + ) + ) + + workitem_approvals_list_get_response_data_item_meta_errors_item_obj.additional_properties = ( + d + ) + return ( + workitem_approvals_list_get_response_data_item_meta_errors_item_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_meta_errors_item_source.py new file mode 100644 index 00000000..8ea69496 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_meta_errors_item_source.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_list_get_response_data_item_meta_errors_item_source_resource import ( + WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", bound="WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSource" +) + + +@_attrs_define +class WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing + the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_list_get_response_data_item_meta_errors_item_source_resource import ( + WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + + workitem_approvals_list_get_response_data_item_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + workitem_approvals_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( + d + ) + return workitem_approvals_list_get_response_data_item_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..0fe293fd --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSourceResource", +) + + +@_attrs_define +class WorkitemApprovalsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + workitem_approvals_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + workitem_approvals_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return workitem_approvals_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_relationships.py new file mode 100644 index 00000000..4d47d21d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_relationships.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_list_get_response_data_item_relationships_user import ( + WorkitemApprovalsListGetResponseDataItemRelationshipsUser, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsListGetResponseDataItemRelationships") + + +@_attrs_define +class WorkitemApprovalsListGetResponseDataItemRelationships: + """ + Attributes: + user (Union[Unset, WorkitemApprovalsListGetResponseDataItemRelationshipsUser]): + """ + + user: Union[ + Unset, "WorkitemApprovalsListGetResponseDataItemRelationshipsUser" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.user, Unset): + user = self.user.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if user is not UNSET: + field_dict["user"] = user + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_list_get_response_data_item_relationships_user import ( + WorkitemApprovalsListGetResponseDataItemRelationshipsUser, + ) + + d = src_dict.copy() + _user = d.pop("user", UNSET) + user: Union[ + Unset, WorkitemApprovalsListGetResponseDataItemRelationshipsUser + ] + if isinstance(_user, Unset): + user = UNSET + else: + user = WorkitemApprovalsListGetResponseDataItemRelationshipsUser.from_dict( + _user + ) + + workitem_approvals_list_get_response_data_item_relationships_obj = cls( + user=user, + ) + + workitem_approvals_list_get_response_data_item_relationships_obj.additional_properties = ( + d + ) + return workitem_approvals_list_get_response_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_relationships_user.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_relationships_user.py new file mode 100644 index 00000000..085e67ed --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_relationships_user.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_list_get_response_data_item_relationships_user_data import ( + WorkitemApprovalsListGetResponseDataItemRelationshipsUserData, + ) + + +T = TypeVar( + "T", bound="WorkitemApprovalsListGetResponseDataItemRelationshipsUser" +) + + +@_attrs_define +class WorkitemApprovalsListGetResponseDataItemRelationshipsUser: + """ + Attributes: + data (Union[Unset, WorkitemApprovalsListGetResponseDataItemRelationshipsUserData]): + """ + + data: Union[ + Unset, "WorkitemApprovalsListGetResponseDataItemRelationshipsUserData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_list_get_response_data_item_relationships_user_data import ( + WorkitemApprovalsListGetResponseDataItemRelationshipsUserData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + WorkitemApprovalsListGetResponseDataItemRelationshipsUserData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = WorkitemApprovalsListGetResponseDataItemRelationshipsUserData.from_dict( + _data + ) + + workitem_approvals_list_get_response_data_item_relationships_user_obj = cls( + data=data, + ) + + workitem_approvals_list_get_response_data_item_relationships_user_obj.additional_properties = ( + d + ) + return workitem_approvals_list_get_response_data_item_relationships_user_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_relationships_user_data.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_relationships_user_data.py new file mode 100644 index 00000000..5b1b08f1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_relationships_user_data.py @@ -0,0 +1,103 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitem_approvals_list_get_response_data_item_relationships_user_data_type import ( + WorkitemApprovalsListGetResponseDataItemRelationshipsUserDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemApprovalsListGetResponseDataItemRelationshipsUserData" +) + + +@_attrs_define +class WorkitemApprovalsListGetResponseDataItemRelationshipsUserData: + """ + Attributes: + type (Union[Unset, WorkitemApprovalsListGetResponseDataItemRelationshipsUserDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + WorkitemApprovalsListGetResponseDataItemRelationshipsUserDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemApprovalsListGetResponseDataItemRelationshipsUserDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemApprovalsListGetResponseDataItemRelationshipsUserDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workitem_approvals_list_get_response_data_item_relationships_user_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workitem_approvals_list_get_response_data_item_relationships_user_data_obj.additional_properties = ( + d + ) + return workitem_approvals_list_get_response_data_item_relationships_user_data_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_relationships_user_data_type.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_relationships_user_data_type.py new file mode 100644 index 00000000..208a8e7a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_relationships_user_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemApprovalsListGetResponseDataItemRelationshipsUserDataType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_type.py new file mode 100644 index 00000000..1d10c4de --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemApprovalsListGetResponseDataItemType(str, Enum): + WORKITEM_APPROVALS = "workitem_approvals" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_included_item.py new file mode 100644 index 00000000..beb5584b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="WorkitemApprovalsListGetResponseIncludedItem") + + +@_attrs_define +class WorkitemApprovalsListGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + workitem_approvals_list_get_response_included_item_obj = cls() + + workitem_approvals_list_get_response_included_item_obj.additional_properties = ( + d + ) + return workitem_approvals_list_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_links.py new file mode 100644 index 00000000..de494947 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_links.py @@ -0,0 +1,106 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkitemApprovalsListGetResponseLinks") + + +@_attrs_define +class WorkitemApprovalsListGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/approvals?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/approvals?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/approvals?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/approvals?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/approvals?page%5Bsize%5D=10&page%5Bnumber%5D=9. + """ + + self_: Union[Unset, str] = UNSET + first: Union[Unset, str] = UNSET + prev: Union[Unset, str] = UNSET + next_: Union[Unset, str] = UNSET + last: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + first = self.first + + prev = self.prev + + next_ = self.next_ + + last = self.last + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if first is not UNSET: + field_dict["first"] = first + if prev is not UNSET: + field_dict["prev"] = prev + if next_ is not UNSET: + field_dict["next"] = next_ + if last is not UNSET: + field_dict["last"] = last + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + first = d.pop("first", UNSET) + + prev = d.pop("prev", UNSET) + + next_ = d.pop("next", UNSET) + + last = d.pop("last", UNSET) + + workitem_approvals_list_get_response_links_obj = cls( + self_=self_, + first=first, + prev=prev, + next_=next_, + last=last, + ) + + workitem_approvals_list_get_response_links_obj.additional_properties = ( + d + ) + return workitem_approvals_list_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_meta.py new file mode 100644 index 00000000..e9aaaeb7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_get_response_meta.py @@ -0,0 +1,63 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkitemApprovalsListGetResponseMeta") + + +@_attrs_define +class WorkitemApprovalsListGetResponseMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workitem_approvals_list_get_response_meta_obj = cls( + total_count=total_count, + ) + + workitem_approvals_list_get_response_meta_obj.additional_properties = d + return workitem_approvals_list_get_response_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request.py new file mode 100644 index 00000000..14dbadf4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request.py @@ -0,0 +1,87 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_list_patch_request_data_item import ( + WorkitemApprovalsListPatchRequestDataItem, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsListPatchRequest") + + +@_attrs_define +class WorkitemApprovalsListPatchRequest: + """ + Attributes: + data (Union[Unset, List['WorkitemApprovalsListPatchRequestDataItem']]): + """ + + data: Union[ + Unset, List["WorkitemApprovalsListPatchRequestDataItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_list_patch_request_data_item import ( + WorkitemApprovalsListPatchRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemApprovalsListPatchRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + workitem_approvals_list_patch_request_obj = cls( + data=data, + ) + + workitem_approvals_list_patch_request_obj.additional_properties = d + return workitem_approvals_list_patch_request_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request_data_item.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request_data_item.py new file mode 100644 index 00000000..da10fb9a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request_data_item.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitem_approvals_list_patch_request_data_item_type import ( + WorkitemApprovalsListPatchRequestDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_list_patch_request_data_item_attributes import ( + WorkitemApprovalsListPatchRequestDataItemAttributes, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsListPatchRequestDataItem") + + +@_attrs_define +class WorkitemApprovalsListPatchRequestDataItem: + """ + Attributes: + type (Union[Unset, WorkitemApprovalsListPatchRequestDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyUserId. + attributes (Union[Unset, WorkitemApprovalsListPatchRequestDataItemAttributes]): + """ + + type: Union[Unset, WorkitemApprovalsListPatchRequestDataItemType] = UNSET + id: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "WorkitemApprovalsListPatchRequestDataItemAttributes" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_list_patch_request_data_item_attributes import ( + WorkitemApprovalsListPatchRequestDataItemAttributes, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, WorkitemApprovalsListPatchRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemApprovalsListPatchRequestDataItemType(_type) + + id = d.pop("id", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, WorkitemApprovalsListPatchRequestDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + WorkitemApprovalsListPatchRequestDataItemAttributes.from_dict( + _attributes + ) + ) + + workitem_approvals_list_patch_request_data_item_obj = cls( + type=type, + id=id, + attributes=attributes, + ) + + workitem_approvals_list_patch_request_data_item_obj.additional_properties = ( + d + ) + return workitem_approvals_list_patch_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request_data_item_attributes.py new file mode 100644 index 00000000..b478d120 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request_data_item_attributes.py @@ -0,0 +1,81 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitem_approvals_list_patch_request_data_item_attributes_status import ( + WorkitemApprovalsListPatchRequestDataItemAttributesStatus, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkitemApprovalsListPatchRequestDataItemAttributes") + + +@_attrs_define +class WorkitemApprovalsListPatchRequestDataItemAttributes: + """ + Attributes: + status (Union[Unset, WorkitemApprovalsListPatchRequestDataItemAttributesStatus]): Example: waiting. + """ + + status: Union[ + Unset, WorkitemApprovalsListPatchRequestDataItemAttributesStatus + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _status = d.pop("status", UNSET) + status: Union[ + Unset, WorkitemApprovalsListPatchRequestDataItemAttributesStatus + ] + if isinstance(_status, Unset): + status = UNSET + else: + status = WorkitemApprovalsListPatchRequestDataItemAttributesStatus( + _status + ) + + workitem_approvals_list_patch_request_data_item_attributes_obj = cls( + status=status, + ) + + workitem_approvals_list_patch_request_data_item_attributes_obj.additional_properties = ( + d + ) + return workitem_approvals_list_patch_request_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request_data_item_attributes_status.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request_data_item_attributes_status.py new file mode 100644 index 00000000..6a4df92c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request_data_item_attributes_status.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemApprovalsListPatchRequestDataItemAttributesStatus(str, Enum): + APPROVED = "approved" + DISAPPROVED = "disapproved" + WAITING = "waiting" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request_data_item_type.py new file mode 100644 index 00000000..bbb787c6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_patch_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemApprovalsListPatchRequestDataItemType(str, Enum): + WORKITEM_APPROVALS = "workitem_approvals" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request.py new file mode 100644 index 00000000..267c5241 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request.py @@ -0,0 +1,87 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_list_post_request_data_item import ( + WorkitemApprovalsListPostRequestDataItem, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsListPostRequest") + + +@_attrs_define +class WorkitemApprovalsListPostRequest: + """ + Attributes: + data (Union[Unset, List['WorkitemApprovalsListPostRequestDataItem']]): + """ + + data: Union[ + Unset, List["WorkitemApprovalsListPostRequestDataItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_list_post_request_data_item import ( + WorkitemApprovalsListPostRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemApprovalsListPostRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + workitem_approvals_list_post_request_obj = cls( + data=data, + ) + + workitem_approvals_list_post_request_obj.additional_properties = d + return workitem_approvals_list_post_request_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item.py new file mode 100644 index 00000000..03ae9ba3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item.py @@ -0,0 +1,137 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitem_approvals_list_post_request_data_item_type import ( + WorkitemApprovalsListPostRequestDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_list_post_request_data_item_attributes import ( + WorkitemApprovalsListPostRequestDataItemAttributes, + ) + from ..models.workitem_approvals_list_post_request_data_item_relationships import ( + WorkitemApprovalsListPostRequestDataItemRelationships, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsListPostRequestDataItem") + + +@_attrs_define +class WorkitemApprovalsListPostRequestDataItem: + """ + Attributes: + type (Union[Unset, WorkitemApprovalsListPostRequestDataItemType]): + attributes (Union[Unset, WorkitemApprovalsListPostRequestDataItemAttributes]): + relationships (Union[Unset, WorkitemApprovalsListPostRequestDataItemRelationships]): + """ + + type: Union[Unset, WorkitemApprovalsListPostRequestDataItemType] = UNSET + attributes: Union[ + Unset, "WorkitemApprovalsListPostRequestDataItemAttributes" + ] = UNSET + relationships: Union[ + Unset, "WorkitemApprovalsListPostRequestDataItemRelationships" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_list_post_request_data_item_attributes import ( + WorkitemApprovalsListPostRequestDataItemAttributes, + ) + from ..models.workitem_approvals_list_post_request_data_item_relationships import ( + WorkitemApprovalsListPostRequestDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, WorkitemApprovalsListPostRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemApprovalsListPostRequestDataItemType(_type) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, WorkitemApprovalsListPostRequestDataItemAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + WorkitemApprovalsListPostRequestDataItemAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, WorkitemApprovalsListPostRequestDataItemRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = WorkitemApprovalsListPostRequestDataItemRelationships.from_dict( + _relationships + ) + + workitem_approvals_list_post_request_data_item_obj = cls( + type=type, + attributes=attributes, + relationships=relationships, + ) + + workitem_approvals_list_post_request_data_item_obj.additional_properties = ( + d + ) + return workitem_approvals_list_post_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_attributes.py new file mode 100644 index 00000000..c8ff8fef --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_attributes.py @@ -0,0 +1,81 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitem_approvals_list_post_request_data_item_attributes_status import ( + WorkitemApprovalsListPostRequestDataItemAttributesStatus, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkitemApprovalsListPostRequestDataItemAttributes") + + +@_attrs_define +class WorkitemApprovalsListPostRequestDataItemAttributes: + """ + Attributes: + status (Union[Unset, WorkitemApprovalsListPostRequestDataItemAttributesStatus]): Example: waiting. + """ + + status: Union[ + Unset, WorkitemApprovalsListPostRequestDataItemAttributesStatus + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _status = d.pop("status", UNSET) + status: Union[ + Unset, WorkitemApprovalsListPostRequestDataItemAttributesStatus + ] + if isinstance(_status, Unset): + status = UNSET + else: + status = WorkitemApprovalsListPostRequestDataItemAttributesStatus( + _status + ) + + workitem_approvals_list_post_request_data_item_attributes_obj = cls( + status=status, + ) + + workitem_approvals_list_post_request_data_item_attributes_obj.additional_properties = ( + d + ) + return workitem_approvals_list_post_request_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_attributes_status.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_attributes_status.py new file mode 100644 index 00000000..9149f64a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_attributes_status.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemApprovalsListPostRequestDataItemAttributesStatus(str, Enum): + APPROVED = "approved" + DISAPPROVED = "disapproved" + WAITING = "waiting" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_relationships.py new file mode 100644 index 00000000..52d55bcc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_relationships.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_list_post_request_data_item_relationships_user import ( + WorkitemApprovalsListPostRequestDataItemRelationshipsUser, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsListPostRequestDataItemRelationships") + + +@_attrs_define +class WorkitemApprovalsListPostRequestDataItemRelationships: + """ + Attributes: + user (Union[Unset, WorkitemApprovalsListPostRequestDataItemRelationshipsUser]): + """ + + user: Union[ + Unset, "WorkitemApprovalsListPostRequestDataItemRelationshipsUser" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.user, Unset): + user = self.user.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if user is not UNSET: + field_dict["user"] = user + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_list_post_request_data_item_relationships_user import ( + WorkitemApprovalsListPostRequestDataItemRelationshipsUser, + ) + + d = src_dict.copy() + _user = d.pop("user", UNSET) + user: Union[ + Unset, WorkitemApprovalsListPostRequestDataItemRelationshipsUser + ] + if isinstance(_user, Unset): + user = UNSET + else: + user = WorkitemApprovalsListPostRequestDataItemRelationshipsUser.from_dict( + _user + ) + + workitem_approvals_list_post_request_data_item_relationships_obj = cls( + user=user, + ) + + workitem_approvals_list_post_request_data_item_relationships_obj.additional_properties = ( + d + ) + return workitem_approvals_list_post_request_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_relationships_user.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_relationships_user.py new file mode 100644 index 00000000..6e964b0d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_relationships_user.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_list_post_request_data_item_relationships_user_data import ( + WorkitemApprovalsListPostRequestDataItemRelationshipsUserData, + ) + + +T = TypeVar( + "T", bound="WorkitemApprovalsListPostRequestDataItemRelationshipsUser" +) + + +@_attrs_define +class WorkitemApprovalsListPostRequestDataItemRelationshipsUser: + """ + Attributes: + data (Union[Unset, WorkitemApprovalsListPostRequestDataItemRelationshipsUserData]): + """ + + data: Union[ + Unset, "WorkitemApprovalsListPostRequestDataItemRelationshipsUserData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_list_post_request_data_item_relationships_user_data import ( + WorkitemApprovalsListPostRequestDataItemRelationshipsUserData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, + WorkitemApprovalsListPostRequestDataItemRelationshipsUserData, + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = WorkitemApprovalsListPostRequestDataItemRelationshipsUserData.from_dict( + _data + ) + + workitem_approvals_list_post_request_data_item_relationships_user_obj = cls( + data=data, + ) + + workitem_approvals_list_post_request_data_item_relationships_user_obj.additional_properties = ( + d + ) + return workitem_approvals_list_post_request_data_item_relationships_user_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_relationships_user_data.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_relationships_user_data.py new file mode 100644 index 00000000..baf5a359 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_relationships_user_data.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitem_approvals_list_post_request_data_item_relationships_user_data_type import ( + WorkitemApprovalsListPostRequestDataItemRelationshipsUserDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemApprovalsListPostRequestDataItemRelationshipsUserData" +) + + +@_attrs_define +class WorkitemApprovalsListPostRequestDataItemRelationshipsUserData: + """ + Attributes: + type (Union[Unset, WorkitemApprovalsListPostRequestDataItemRelationshipsUserDataType]): + id (Union[Unset, str]): Example: MyUserId. + """ + + type: Union[ + Unset, + WorkitemApprovalsListPostRequestDataItemRelationshipsUserDataType, + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemApprovalsListPostRequestDataItemRelationshipsUserDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemApprovalsListPostRequestDataItemRelationshipsUserDataType( + _type + ) + + id = d.pop("id", UNSET) + + workitem_approvals_list_post_request_data_item_relationships_user_data_obj = cls( + type=type, + id=id, + ) + + workitem_approvals_list_post_request_data_item_relationships_user_data_obj.additional_properties = ( + d + ) + return workitem_approvals_list_post_request_data_item_relationships_user_data_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_relationships_user_data_type.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_relationships_user_data_type.py new file mode 100644 index 00000000..c6a85f31 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_relationships_user_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemApprovalsListPostRequestDataItemRelationshipsUserDataType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_type.py new file mode 100644 index 00000000..82664dfe --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemApprovalsListPostRequestDataItemType(str, Enum): + WORKITEM_APPROVALS = "workitem_approvals" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_response.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_response.py new file mode 100644 index 00000000..feb3799f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_response.py @@ -0,0 +1,87 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_list_post_response_data_item import ( + WorkitemApprovalsListPostResponseDataItem, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsListPostResponse") + + +@_attrs_define +class WorkitemApprovalsListPostResponse: + """ + Attributes: + data (Union[Unset, List['WorkitemApprovalsListPostResponseDataItem']]): + """ + + data: Union[ + Unset, List["WorkitemApprovalsListPostResponseDataItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_list_post_response_data_item import ( + WorkitemApprovalsListPostResponseDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemApprovalsListPostResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + workitem_approvals_list_post_response_obj = cls( + data=data, + ) + + workitem_approvals_list_post_response_obj.additional_properties = d + return workitem_approvals_list_post_response_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_response_data_item.py new file mode 100644 index 00000000..2c357bd0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_response_data_item.py @@ -0,0 +1,114 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitem_approvals_list_post_response_data_item_type import ( + WorkitemApprovalsListPostResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_list_post_response_data_item_links import ( + WorkitemApprovalsListPostResponseDataItemLinks, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsListPostResponseDataItem") + + +@_attrs_define +class WorkitemApprovalsListPostResponseDataItem: + """ + Attributes: + type (Union[Unset, WorkitemApprovalsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyUserId. + links (Union[Unset, WorkitemApprovalsListPostResponseDataItemLinks]): + """ + + type: Union[Unset, WorkitemApprovalsListPostResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + links: Union[ + Unset, "WorkitemApprovalsListPostResponseDataItemLinks" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_list_post_response_data_item_links import ( + WorkitemApprovalsListPostResponseDataItemLinks, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, WorkitemApprovalsListPostResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemApprovalsListPostResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[Unset, WorkitemApprovalsListPostResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = WorkitemApprovalsListPostResponseDataItemLinks.from_dict( + _links + ) + + workitem_approvals_list_post_response_data_item_obj = cls( + type=type, + id=id, + links=links, + ) + + workitem_approvals_list_post_response_data_item_obj.additional_properties = ( + d + ) + return workitem_approvals_list_post_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_response_data_item_links.py new file mode 100644 index 00000000..4d789b27 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkitemApprovalsListPostResponseDataItemLinks") + + +@_attrs_define +class WorkitemApprovalsListPostResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/approvals/MyUserId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + workitem_approvals_list_post_response_data_item_links_obj = cls( + self_=self_, + ) + + workitem_approvals_list_post_response_data_item_links_obj.additional_properties = ( + d + ) + return workitem_approvals_list_post_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_response_data_item_type.py new file mode 100644 index 00000000..7e669488 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_list_post_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemApprovalsListPostResponseDataItemType(str, Enum): + WORKITEM_APPROVALS = "workitem_approvals" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response.py new file mode 100644 index 00000000..a1d30ec1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response.py @@ -0,0 +1,135 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_single_get_response_data import ( + WorkitemApprovalsSingleGetResponseData, + ) + from ..models.workitem_approvals_single_get_response_included_item import ( + WorkitemApprovalsSingleGetResponseIncludedItem, + ) + from ..models.workitem_approvals_single_get_response_links import ( + WorkitemApprovalsSingleGetResponseLinks, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsSingleGetResponse") + + +@_attrs_define +class WorkitemApprovalsSingleGetResponse: + """ + Attributes: + data (Union[Unset, WorkitemApprovalsSingleGetResponseData]): + included (Union[Unset, List['WorkitemApprovalsSingleGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, WorkitemApprovalsSingleGetResponseLinks]): + """ + + data: Union[Unset, "WorkitemApprovalsSingleGetResponseData"] = UNSET + included: Union[ + Unset, List["WorkitemApprovalsSingleGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "WorkitemApprovalsSingleGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_single_get_response_data import ( + WorkitemApprovalsSingleGetResponseData, + ) + from ..models.workitem_approvals_single_get_response_included_item import ( + WorkitemApprovalsSingleGetResponseIncludedItem, + ) + from ..models.workitem_approvals_single_get_response_links import ( + WorkitemApprovalsSingleGetResponseLinks, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, WorkitemApprovalsSingleGetResponseData] + if isinstance(_data, Unset): + data = UNSET + else: + data = WorkitemApprovalsSingleGetResponseData.from_dict(_data) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = ( + WorkitemApprovalsSingleGetResponseIncludedItem.from_dict( + included_item_data + ) + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, WorkitemApprovalsSingleGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = WorkitemApprovalsSingleGetResponseLinks.from_dict(_links) + + workitem_approvals_single_get_response_obj = cls( + data=data, + included=included, + links=links, + ) + + workitem_approvals_single_get_response_obj.additional_properties = d + return workitem_approvals_single_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data.py new file mode 100644 index 00000000..d8b7fcfd --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data.py @@ -0,0 +1,203 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitem_approvals_single_get_response_data_type import ( + WorkitemApprovalsSingleGetResponseDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_single_get_response_data_attributes import ( + WorkitemApprovalsSingleGetResponseDataAttributes, + ) + from ..models.workitem_approvals_single_get_response_data_links import ( + WorkitemApprovalsSingleGetResponseDataLinks, + ) + from ..models.workitem_approvals_single_get_response_data_meta import ( + WorkitemApprovalsSingleGetResponseDataMeta, + ) + from ..models.workitem_approvals_single_get_response_data_relationships import ( + WorkitemApprovalsSingleGetResponseDataRelationships, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsSingleGetResponseData") + + +@_attrs_define +class WorkitemApprovalsSingleGetResponseData: + """ + Attributes: + type (Union[Unset, WorkitemApprovalsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyUserId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, WorkitemApprovalsSingleGetResponseDataAttributes]): + relationships (Union[Unset, WorkitemApprovalsSingleGetResponseDataRelationships]): + meta (Union[Unset, WorkitemApprovalsSingleGetResponseDataMeta]): + links (Union[Unset, WorkitemApprovalsSingleGetResponseDataLinks]): + """ + + type: Union[Unset, WorkitemApprovalsSingleGetResponseDataType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "WorkitemApprovalsSingleGetResponseDataAttributes" + ] = UNSET + relationships: Union[ + Unset, "WorkitemApprovalsSingleGetResponseDataRelationships" + ] = UNSET + meta: Union[Unset, "WorkitemApprovalsSingleGetResponseDataMeta"] = UNSET + links: Union[Unset, "WorkitemApprovalsSingleGetResponseDataLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_single_get_response_data_attributes import ( + WorkitemApprovalsSingleGetResponseDataAttributes, + ) + from ..models.workitem_approvals_single_get_response_data_links import ( + WorkitemApprovalsSingleGetResponseDataLinks, + ) + from ..models.workitem_approvals_single_get_response_data_meta import ( + WorkitemApprovalsSingleGetResponseDataMeta, + ) + from ..models.workitem_approvals_single_get_response_data_relationships import ( + WorkitemApprovalsSingleGetResponseDataRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, WorkitemApprovalsSingleGetResponseDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemApprovalsSingleGetResponseDataType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, WorkitemApprovalsSingleGetResponseDataAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + WorkitemApprovalsSingleGetResponseDataAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, WorkitemApprovalsSingleGetResponseDataRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + WorkitemApprovalsSingleGetResponseDataRelationships.from_dict( + _relationships + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, WorkitemApprovalsSingleGetResponseDataMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkitemApprovalsSingleGetResponseDataMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, WorkitemApprovalsSingleGetResponseDataLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = WorkitemApprovalsSingleGetResponseDataLinks.from_dict( + _links + ) + + workitem_approvals_single_get_response_data_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + workitem_approvals_single_get_response_data_obj.additional_properties = ( + d + ) + return workitem_approvals_single_get_response_data_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_attributes.py new file mode 100644 index 00000000..227269b9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_attributes.py @@ -0,0 +1,81 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitem_approvals_single_get_response_data_attributes_status import ( + WorkitemApprovalsSingleGetResponseDataAttributesStatus, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkitemApprovalsSingleGetResponseDataAttributes") + + +@_attrs_define +class WorkitemApprovalsSingleGetResponseDataAttributes: + """ + Attributes: + status (Union[Unset, WorkitemApprovalsSingleGetResponseDataAttributesStatus]): Example: waiting. + """ + + status: Union[ + Unset, WorkitemApprovalsSingleGetResponseDataAttributesStatus + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _status = d.pop("status", UNSET) + status: Union[ + Unset, WorkitemApprovalsSingleGetResponseDataAttributesStatus + ] + if isinstance(_status, Unset): + status = UNSET + else: + status = WorkitemApprovalsSingleGetResponseDataAttributesStatus( + _status + ) + + workitem_approvals_single_get_response_data_attributes_obj = cls( + status=status, + ) + + workitem_approvals_single_get_response_data_attributes_obj.additional_properties = ( + d + ) + return workitem_approvals_single_get_response_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_attributes_status.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_attributes_status.py new file mode 100644 index 00000000..10a50e0e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_attributes_status.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemApprovalsSingleGetResponseDataAttributesStatus(str, Enum): + APPROVED = "approved" + DISAPPROVED = "disapproved" + WAITING = "waiting" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_links.py new file mode 100644 index 00000000..7bb79554 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkitemApprovalsSingleGetResponseDataLinks") + + +@_attrs_define +class WorkitemApprovalsSingleGetResponseDataLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/approvals/MyUserId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + workitem_approvals_single_get_response_data_links_obj = cls( + self_=self_, + ) + + workitem_approvals_single_get_response_data_links_obj.additional_properties = ( + d + ) + return workitem_approvals_single_get_response_data_links_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_meta.py new file mode 100644 index 00000000..7b318d4f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_meta.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_single_get_response_data_meta_errors_item import ( + WorkitemApprovalsSingleGetResponseDataMetaErrorsItem, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsSingleGetResponseDataMeta") + + +@_attrs_define +class WorkitemApprovalsSingleGetResponseDataMeta: + """ + Attributes: + errors (Union[Unset, List['WorkitemApprovalsSingleGetResponseDataMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["WorkitemApprovalsSingleGetResponseDataMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_single_get_response_data_meta_errors_item import ( + WorkitemApprovalsSingleGetResponseDataMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ( + WorkitemApprovalsSingleGetResponseDataMetaErrorsItem.from_dict( + errors_item_data + ) + ) + + errors.append(errors_item) + + workitem_approvals_single_get_response_data_meta_obj = cls( + errors=errors, + ) + + workitem_approvals_single_get_response_data_meta_obj.additional_properties = ( + d + ) + return workitem_approvals_single_get_response_data_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_meta_errors_item.py new file mode 100644 index 00000000..50eac75f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_meta_errors_item.py @@ -0,0 +1,116 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_single_get_response_data_meta_errors_item_source import ( + WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsSingleGetResponseDataMetaErrorsItem") + + +@_attrs_define +class WorkitemApprovalsSingleGetResponseDataMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_single_get_response_data_meta_errors_item_source import ( + WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSource.from_dict( + _source + ) + + workitem_approvals_single_get_response_data_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + workitem_approvals_single_get_response_data_meta_errors_item_obj.additional_properties = ( + d + ) + return workitem_approvals_single_get_response_data_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_meta_errors_item_source.py new file mode 100644 index 00000000..38b2f6b2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_meta_errors_item_source.py @@ -0,0 +1,111 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_single_get_response_data_meta_errors_item_source_resource import ( + WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", bound="WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSource" +) + + +@_attrs_define +class WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing + the error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSourceResource", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_single_get_response_data_meta_errors_item_source_resource import ( + WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + + workitem_approvals_single_get_response_data_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + workitem_approvals_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( + d + ) + return workitem_approvals_single_get_response_data_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..214d96e3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSourceResource", +) + + +@_attrs_define +class WorkitemApprovalsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + workitem_approvals_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + workitem_approvals_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return workitem_approvals_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_relationships.py new file mode 100644 index 00000000..6f08b97c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_relationships.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_single_get_response_data_relationships_user import ( + WorkitemApprovalsSingleGetResponseDataRelationshipsUser, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsSingleGetResponseDataRelationships") + + +@_attrs_define +class WorkitemApprovalsSingleGetResponseDataRelationships: + """ + Attributes: + user (Union[Unset, WorkitemApprovalsSingleGetResponseDataRelationshipsUser]): + """ + + user: Union[ + Unset, "WorkitemApprovalsSingleGetResponseDataRelationshipsUser" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.user, Unset): + user = self.user.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if user is not UNSET: + field_dict["user"] = user + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_single_get_response_data_relationships_user import ( + WorkitemApprovalsSingleGetResponseDataRelationshipsUser, + ) + + d = src_dict.copy() + _user = d.pop("user", UNSET) + user: Union[ + Unset, WorkitemApprovalsSingleGetResponseDataRelationshipsUser + ] + if isinstance(_user, Unset): + user = UNSET + else: + user = WorkitemApprovalsSingleGetResponseDataRelationshipsUser.from_dict( + _user + ) + + workitem_approvals_single_get_response_data_relationships_obj = cls( + user=user, + ) + + workitem_approvals_single_get_response_data_relationships_obj.additional_properties = ( + d + ) + return workitem_approvals_single_get_response_data_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_relationships_user.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_relationships_user.py new file mode 100644 index 00000000..a3847c40 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_relationships_user.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_single_get_response_data_relationships_user_data import ( + WorkitemApprovalsSingleGetResponseDataRelationshipsUserData, + ) + + +T = TypeVar( + "T", bound="WorkitemApprovalsSingleGetResponseDataRelationshipsUser" +) + + +@_attrs_define +class WorkitemApprovalsSingleGetResponseDataRelationshipsUser: + """ + Attributes: + data (Union[Unset, WorkitemApprovalsSingleGetResponseDataRelationshipsUserData]): + """ + + data: Union[ + Unset, "WorkitemApprovalsSingleGetResponseDataRelationshipsUserData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_single_get_response_data_relationships_user_data import ( + WorkitemApprovalsSingleGetResponseDataRelationshipsUserData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, WorkitemApprovalsSingleGetResponseDataRelationshipsUserData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = WorkitemApprovalsSingleGetResponseDataRelationshipsUserData.from_dict( + _data + ) + + workitem_approvals_single_get_response_data_relationships_user_obj = ( + cls( + data=data, + ) + ) + + workitem_approvals_single_get_response_data_relationships_user_obj.additional_properties = ( + d + ) + return ( + workitem_approvals_single_get_response_data_relationships_user_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_relationships_user_data.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_relationships_user_data.py new file mode 100644 index 00000000..958608c5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_relationships_user_data.py @@ -0,0 +1,102 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitem_approvals_single_get_response_data_relationships_user_data_type import ( + WorkitemApprovalsSingleGetResponseDataRelationshipsUserDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemApprovalsSingleGetResponseDataRelationshipsUserData" +) + + +@_attrs_define +class WorkitemApprovalsSingleGetResponseDataRelationshipsUserData: + """ + Attributes: + type (Union[Unset, WorkitemApprovalsSingleGetResponseDataRelationshipsUserDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, WorkitemApprovalsSingleGetResponseDataRelationshipsUserDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemApprovalsSingleGetResponseDataRelationshipsUserDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemApprovalsSingleGetResponseDataRelationshipsUserDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workitem_approvals_single_get_response_data_relationships_user_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workitem_approvals_single_get_response_data_relationships_user_data_obj.additional_properties = ( + d + ) + return workitem_approvals_single_get_response_data_relationships_user_data_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_relationships_user_data_type.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_relationships_user_data_type.py new file mode 100644 index 00000000..4d6ed6cc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_relationships_user_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemApprovalsSingleGetResponseDataRelationshipsUserDataType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_type.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_type.py new file mode 100644 index 00000000..ec441b5c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemApprovalsSingleGetResponseDataType(str, Enum): + WORKITEM_APPROVALS = "workitem_approvals" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_included_item.py new file mode 100644 index 00000000..93e3e002 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="WorkitemApprovalsSingleGetResponseIncludedItem") + + +@_attrs_define +class WorkitemApprovalsSingleGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + workitem_approvals_single_get_response_included_item_obj = cls() + + workitem_approvals_single_get_response_included_item_obj.additional_properties = ( + d + ) + return workitem_approvals_single_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_links.py new file mode 100644 index 00000000..8b5c8b0d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_get_response_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkitemApprovalsSingleGetResponseLinks") + + +@_attrs_define +class WorkitemApprovalsSingleGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/approvals/MyUserId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + workitem_approvals_single_get_response_links_obj = cls( + self_=self_, + ) + + workitem_approvals_single_get_response_links_obj.additional_properties = ( + d + ) + return workitem_approvals_single_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request.py new file mode 100644 index 00000000..2b79d5de --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request.py @@ -0,0 +1,80 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_single_patch_request_data import ( + WorkitemApprovalsSinglePatchRequestData, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsSinglePatchRequest") + + +@_attrs_define +class WorkitemApprovalsSinglePatchRequest: + """ + Attributes: + data (Union[Unset, WorkitemApprovalsSinglePatchRequestData]): + """ + + data: Union[Unset, "WorkitemApprovalsSinglePatchRequestData"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_single_patch_request_data import ( + WorkitemApprovalsSinglePatchRequestData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, WorkitemApprovalsSinglePatchRequestData] + if isinstance(_data, Unset): + data = UNSET + else: + data = WorkitemApprovalsSinglePatchRequestData.from_dict(_data) + + workitem_approvals_single_patch_request_obj = cls( + data=data, + ) + + workitem_approvals_single_patch_request_obj.additional_properties = d + return workitem_approvals_single_patch_request_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request_data.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request_data.py new file mode 100644 index 00000000..9d58ef61 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request_data.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitem_approvals_single_patch_request_data_type import ( + WorkitemApprovalsSinglePatchRequestDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitem_approvals_single_patch_request_data_attributes import ( + WorkitemApprovalsSinglePatchRequestDataAttributes, + ) + + +T = TypeVar("T", bound="WorkitemApprovalsSinglePatchRequestData") + + +@_attrs_define +class WorkitemApprovalsSinglePatchRequestData: + """ + Attributes: + type (Union[Unset, WorkitemApprovalsSinglePatchRequestDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyUserId. + attributes (Union[Unset, WorkitemApprovalsSinglePatchRequestDataAttributes]): + """ + + type: Union[Unset, WorkitemApprovalsSinglePatchRequestDataType] = UNSET + id: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "WorkitemApprovalsSinglePatchRequestDataAttributes" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_approvals_single_patch_request_data_attributes import ( + WorkitemApprovalsSinglePatchRequestDataAttributes, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, WorkitemApprovalsSinglePatchRequestDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemApprovalsSinglePatchRequestDataType(_type) + + id = d.pop("id", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[ + Unset, WorkitemApprovalsSinglePatchRequestDataAttributes + ] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + WorkitemApprovalsSinglePatchRequestDataAttributes.from_dict( + _attributes + ) + ) + + workitem_approvals_single_patch_request_data_obj = cls( + type=type, + id=id, + attributes=attributes, + ) + + workitem_approvals_single_patch_request_data_obj.additional_properties = ( + d + ) + return workitem_approvals_single_patch_request_data_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request_data_attributes.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request_data_attributes.py new file mode 100644 index 00000000..656b672a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request_data_attributes.py @@ -0,0 +1,81 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitem_approvals_single_patch_request_data_attributes_status import ( + WorkitemApprovalsSinglePatchRequestDataAttributesStatus, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkitemApprovalsSinglePatchRequestDataAttributes") + + +@_attrs_define +class WorkitemApprovalsSinglePatchRequestDataAttributes: + """ + Attributes: + status (Union[Unset, WorkitemApprovalsSinglePatchRequestDataAttributesStatus]): Example: waiting. + """ + + status: Union[ + Unset, WorkitemApprovalsSinglePatchRequestDataAttributesStatus + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _status = d.pop("status", UNSET) + status: Union[ + Unset, WorkitemApprovalsSinglePatchRequestDataAttributesStatus + ] + if isinstance(_status, Unset): + status = UNSET + else: + status = WorkitemApprovalsSinglePatchRequestDataAttributesStatus( + _status + ) + + workitem_approvals_single_patch_request_data_attributes_obj = cls( + status=status, + ) + + workitem_approvals_single_patch_request_data_attributes_obj.additional_properties = ( + d + ) + return workitem_approvals_single_patch_request_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request_data_attributes_status.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request_data_attributes_status.py new file mode 100644 index 00000000..5fef8263 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request_data_attributes_status.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemApprovalsSinglePatchRequestDataAttributesStatus(str, Enum): + APPROVED = "approved" + DISAPPROVED = "disapproved" + WAITING = "waiting" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request_data_type.py b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request_data_type.py new file mode 100644 index 00000000..c0c69f1a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_approvals_single_patch_request_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemApprovalsSinglePatchRequestDataType(str, Enum): + WORKITEM_APPROVALS = "workitem_approvals" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response.py index 9481f459..8a409385 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response.py @@ -29,14 +29,13 @@ @_attrs_define class WorkitemAttachmentsListGetResponse: """ - Attributes - ---------- - meta : Union[Unset, WorkitemAttachmentsListGetResponseMeta] - data : Union[Unset, List['WorkitemAttachmentsListGetResponseDataItem']] - included : Union[Unset, List['WorkitemAttachmentsListGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, WorkitemAttachmentsListGetResponseLinks] + Attributes: + meta (Union[Unset, WorkitemAttachmentsListGetResponseMeta]): + data (Union[Unset, List['WorkitemAttachmentsListGetResponseDataItem']]): + included (Union[Unset, List['WorkitemAttachmentsListGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, WorkitemAttachmentsListGetResponseLinks]): """ meta: Union[Unset, "WorkitemAttachmentsListGetResponseMeta"] = UNSET @@ -61,7 +60,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) included: Union[Unset, List[Dict[str, Any]]] = UNSET @@ -69,7 +67,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item.py index de2ab2a9..fc95545a 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item.py @@ -32,15 +32,14 @@ @_attrs_define class WorkitemAttachmentsListGetResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemAttachmentsListGetResponseDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, WorkitemAttachmentsListGetResponseDataItemAttributes] - relationships : Union[Unset, WorkitemAttachmentsListGetResponseDataItemRelationships] - meta : Union[Unset, WorkitemAttachmentsListGetResponseDataItemMeta] - links : Union[Unset, WorkitemAttachmentsListGetResponseDataItemLinks] + Attributes: + type (Union[Unset, WorkitemAttachmentsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyAttachmentId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, WorkitemAttachmentsListGetResponseDataItemAttributes]): + relationships (Union[Unset, WorkitemAttachmentsListGetResponseDataItemRelationships]): + meta (Union[Unset, WorkitemAttachmentsListGetResponseDataItemMeta]): + links (Union[Unset, WorkitemAttachmentsListGetResponseDataItemLinks]): """ type: Union[Unset, WorkitemAttachmentsListGetResponseDataItemType] = UNSET @@ -68,7 +67,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_attributes.py index fea55847..650e5b6c 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_attributes.py @@ -16,13 +16,12 @@ @_attrs_define class WorkitemAttachmentsListGetResponseDataItemAttributes: """ - Attributes - ---------- - file_name : Union[Unset, str] - id : Union[Unset, str] - length : Union[Unset, int] - title : Union[Unset, str] - updated : Union[Unset, datetime.datetime] + Attributes: + file_name (Union[Unset, str]): Example: File Name. + id (Union[Unset, str]): Example: MyAttachmentId. + length (Union[Unset, int]): + title (Union[Unset, str]): Example: Title. + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. """ file_name: Union[Unset, str] = UNSET @@ -36,9 +35,13 @@ class WorkitemAttachmentsListGetResponseDataItemAttributes: def to_dict(self) -> Dict[str, Any]: file_name = self.file_name + id = self.id + length = self.length + title = self.title + updated: Union[Unset, str] = UNSET if not isinstance(self.updated, Unset): updated = self.updated.isoformat() diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_links.py index d6d1a17d..c5132721 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_links.py @@ -14,10 +14,11 @@ @_attrs_define class WorkitemAttachmentsListGetResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - content : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/attachments/MyAttachmentId?revision=1234. + content (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/attachments/MyAttachmentId/content?revision=1234. """ self_: Union[Unset, str] = UNSET @@ -28,6 +29,7 @@ class WorkitemAttachmentsListGetResponseDataItemLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + content = self.content field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_meta.py index 955cdd19..e6b90d44 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_meta.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemAttachmentsListGetResponseDataItemMeta: """ - Attributes - ---------- - errors : Union[Unset, List['WorkitemAttachmentsListGetResponseDataItemMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['WorkitemAttachmentsListGetResponseDataItemMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_meta_errors_item.py index b8aeb4c4..7e31bf0f 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_meta_errors_item.py @@ -22,15 +22,12 @@ @_attrs_define class WorkitemAttachmentsListGetResponseDataItemMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, WorkitemAttachmentsListGetResponseDataItemMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, WorkitemAttachmentsListGetResponseDataItemMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -45,8 +42,11 @@ class WorkitemAttachmentsListGetResponseDataItemMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_meta_errors_item_source.py index c91d9bc0..1e3ee496 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_meta_errors_item_source.py @@ -1,13 +1,19 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.workitem_attachments_list_get_response_data_item_meta_errors_item_source_resource import ( + WorkitemAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + T = TypeVar( "T", bound="WorkitemAttachmentsListGetResponseDataItemMetaErrorsItemSource" ) @@ -16,24 +22,32 @@ @_attrs_define class WorkitemAttachmentsListGetResponseDataItemMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, WorkitemAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource + causing the error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "WorkitemAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource", + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -41,19 +55,38 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_attachments_list_get_response_data_item_meta_errors_item_source_resource import ( + WorkitemAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + WorkitemAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = WorkitemAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + workitem_attachments_list_get_response_data_item_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) workitem_attachments_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..897fe675 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource", +) + + +@_attrs_define +class WorkitemAttachmentsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + workitem_attachments_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + workitem_attachments_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return workitem_attachments_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships.py index 9cd883af..6d4d8a65 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships.py @@ -25,10 +25,9 @@ @_attrs_define class WorkitemAttachmentsListGetResponseDataItemRelationships: """ - Attributes - ---------- - author : Union[Unset, WorkitemAttachmentsListGetResponseDataItemRelationshipsAuthor] - project : Union[Unset, WorkitemAttachmentsListGetResponseDataItemRelationshipsProject] + Attributes: + author (Union[Unset, WorkitemAttachmentsListGetResponseDataItemRelationshipsAuthor]): + project (Union[Unset, WorkitemAttachmentsListGetResponseDataItemRelationshipsProject]): """ author: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships_author.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships_author.py index c0c17599..7bd439c5 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships_author.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships_author.py @@ -22,9 +22,8 @@ @_attrs_define class WorkitemAttachmentsListGetResponseDataItemRelationshipsAuthor: """ - Attributes - ---------- - data : Union[Unset, WorkitemAttachmentsListGetResponseDataItemRelationshipsAuthorData] + Attributes: + data (Union[Unset, WorkitemAttachmentsListGetResponseDataItemRelationshipsAuthorData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships_author_data.py index 3afd19d2..e6f31b41 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships_author_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships_author_data.py @@ -20,11 +20,10 @@ @_attrs_define class WorkitemAttachmentsListGetResponseDataItemRelationshipsAuthorData: """ - Attributes - ---------- - type : Union[Unset, WorkitemAttachmentsListGetResponseDataItemRelationshipsAuthorDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemAttachmentsListGetResponseDataItemRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships_project.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships_project.py index d96ee9e6..b6f5c1cf 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships_project.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships_project.py @@ -22,9 +22,8 @@ @_attrs_define class WorkitemAttachmentsListGetResponseDataItemRelationshipsProject: """ - Attributes - ---------- - data : Union[Unset, WorkitemAttachmentsListGetResponseDataItemRelationshipsProjectData] + Attributes: + data (Union[Unset, WorkitemAttachmentsListGetResponseDataItemRelationshipsProjectData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships_project_data.py index 520d4e98..647ddb84 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships_project_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_data_item_relationships_project_data.py @@ -20,11 +20,10 @@ @_attrs_define class WorkitemAttachmentsListGetResponseDataItemRelationshipsProjectData: """ - Attributes - ---------- - type : Union[Unset, WorkitemAttachmentsListGetResponseDataItemRelationshipsProjectDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemAttachmentsListGetResponseDataItemRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_links.py index 9f932633..44c7275e 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_links.py @@ -14,13 +14,17 @@ @_attrs_define class WorkitemAttachmentsListGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - first : Union[Unset, str] - prev : Union[Unset, str] - next_ : Union[Unset, str] - last : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/attachments?page%5Bsize%5D=10&page%5Bnumber%5D=9. """ self_: Union[Unset, str] = UNSET @@ -34,9 +38,13 @@ class WorkitemAttachmentsListGetResponseLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + first = self.first + prev = self.prev + next_ = self.next_ + last = self.last field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_meta.py index 55830ca4..4947c668 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_get_response_meta.py @@ -14,9 +14,8 @@ @_attrs_define class WorkitemAttachmentsListGetResponseMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_request.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_request.py index 6ac47039..3b0ca228 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_request.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_request.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemAttachmentsListPostRequest: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemAttachmentsListPostRequestDataItem']] + Attributes: + data (Union[Unset, List['WorkitemAttachmentsListPostRequestDataItem']]): """ data: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_request_data_item.py index 1ad5dd92..f7541cb9 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_request_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_request_data_item.py @@ -23,11 +23,10 @@ @_attrs_define class WorkitemAttachmentsListPostRequestDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemAttachmentsListPostRequestDataItemType] - lid : Union[Unset, str] - attributes : Union[Unset, WorkitemAttachmentsListPostRequestDataItemAttributes] + Attributes: + type (Union[Unset, WorkitemAttachmentsListPostRequestDataItemType]): + lid (Union[Unset, str]): + attributes (Union[Unset, WorkitemAttachmentsListPostRequestDataItemAttributes]): """ type: Union[Unset, WorkitemAttachmentsListPostRequestDataItemType] = UNSET @@ -45,6 +44,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value lid = self.lid + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_request_data_item_attributes.py index d5e5d3da..6eec301e 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_request_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_request_data_item_attributes.py @@ -14,10 +14,9 @@ @_attrs_define class WorkitemAttachmentsListPostRequestDataItemAttributes: """ - Attributes - ---------- - file_name : Union[Unset, str] - title : Union[Unset, str] + Attributes: + file_name (Union[Unset, str]): Example: File Name. + title (Union[Unset, str]): Example: Title. """ file_name: Union[Unset, str] = UNSET @@ -28,6 +27,7 @@ class WorkitemAttachmentsListPostRequestDataItemAttributes: def to_dict(self) -> Dict[str, Any]: file_name = self.file_name + title = self.title field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_response.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_response.py index 49c55dfa..009b134a 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_response.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_response.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemAttachmentsListPostResponse: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemAttachmentsListPostResponseDataItem']] + Attributes: + data (Union[Unset, List['WorkitemAttachmentsListPostResponseDataItem']]): """ data: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_response_data_item.py index 6c79b076..ddf5be33 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_response_data_item.py @@ -23,11 +23,10 @@ @_attrs_define class WorkitemAttachmentsListPostResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemAttachmentsListPostResponseDataItemType] - id : Union[Unset, str] - links : Union[Unset, WorkitemAttachmentsListPostResponseDataItemLinks] + Attributes: + type (Union[Unset, WorkitemAttachmentsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyAttachmentId. + links (Union[Unset, WorkitemAttachmentsListPostResponseDataItemLinks]): """ type: Union[Unset, WorkitemAttachmentsListPostResponseDataItemType] = UNSET @@ -45,6 +44,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + links: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_response_data_item_links.py index 78e2cb60..3d076082 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_list_post_response_data_item_links.py @@ -14,10 +14,11 @@ @_attrs_define class WorkitemAttachmentsListPostResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - content : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/attachments/MyAttachmentId?revision=1234. + content (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/attachments/MyAttachmentId/content?revision=1234. """ self_: Union[Unset, str] = UNSET @@ -28,6 +29,7 @@ class WorkitemAttachmentsListPostResponseDataItemLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + content = self.content field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response.py index 916bb42d..7f5640f6 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response.py @@ -26,13 +26,12 @@ @_attrs_define class WorkitemAttachmentsSingleGetResponse: """ - Attributes - ---------- - data : Union[Unset, WorkitemAttachmentsSingleGetResponseData] - included : Union[Unset, List['WorkitemAttachmentsSingleGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, WorkitemAttachmentsSingleGetResponseLinks] + Attributes: + data (Union[Unset, WorkitemAttachmentsSingleGetResponseData]): + included (Union[Unset, List['WorkitemAttachmentsSingleGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, WorkitemAttachmentsSingleGetResponseLinks]): """ data: Union[Unset, "WorkitemAttachmentsSingleGetResponseData"] = UNSET @@ -54,7 +53,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data.py index 90d5e210..05dcf623 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data.py @@ -32,15 +32,14 @@ @_attrs_define class WorkitemAttachmentsSingleGetResponseData: """ - Attributes - ---------- - type : Union[Unset, WorkitemAttachmentsSingleGetResponseDataType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, WorkitemAttachmentsSingleGetResponseDataAttributes] - relationships : Union[Unset, WorkitemAttachmentsSingleGetResponseDataRelationships] - meta : Union[Unset, WorkitemAttachmentsSingleGetResponseDataMeta] - links : Union[Unset, WorkitemAttachmentsSingleGetResponseDataLinks] + Attributes: + type (Union[Unset, WorkitemAttachmentsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyAttachmentId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, WorkitemAttachmentsSingleGetResponseDataAttributes]): + relationships (Union[Unset, WorkitemAttachmentsSingleGetResponseDataRelationships]): + meta (Union[Unset, WorkitemAttachmentsSingleGetResponseDataMeta]): + links (Union[Unset, WorkitemAttachmentsSingleGetResponseDataLinks]): """ type: Union[Unset, WorkitemAttachmentsSingleGetResponseDataType] = UNSET @@ -66,7 +65,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_attributes.py index c6055813..1b9e4286 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_attributes.py @@ -16,13 +16,12 @@ @_attrs_define class WorkitemAttachmentsSingleGetResponseDataAttributes: """ - Attributes - ---------- - file_name : Union[Unset, str] - id : Union[Unset, str] - length : Union[Unset, int] - title : Union[Unset, str] - updated : Union[Unset, datetime.datetime] + Attributes: + file_name (Union[Unset, str]): Example: File Name. + id (Union[Unset, str]): Example: MyAttachmentId. + length (Union[Unset, int]): + title (Union[Unset, str]): Example: Title. + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. """ file_name: Union[Unset, str] = UNSET @@ -36,9 +35,13 @@ class WorkitemAttachmentsSingleGetResponseDataAttributes: def to_dict(self) -> Dict[str, Any]: file_name = self.file_name + id = self.id + length = self.length + title = self.title + updated: Union[Unset, str] = UNSET if not isinstance(self.updated, Unset): updated = self.updated.isoformat() diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_links.py index 590a8f61..8634fa26 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_links.py @@ -14,10 +14,11 @@ @_attrs_define class WorkitemAttachmentsSingleGetResponseDataLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - content : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/attachments/MyAttachmentId?revision=1234. + content (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/attachments/MyAttachmentId/content?revision=1234. """ self_: Union[Unset, str] = UNSET @@ -28,6 +29,7 @@ class WorkitemAttachmentsSingleGetResponseDataLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + content = self.content field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_meta.py index 2b96c09d..45e46696 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_meta.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemAttachmentsSingleGetResponseDataMeta: """ - Attributes - ---------- - errors : Union[Unset, List['WorkitemAttachmentsSingleGetResponseDataMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['WorkitemAttachmentsSingleGetResponseDataMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_meta_errors_item.py index c3fb00e9..ae8b83fc 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_meta_errors_item.py @@ -22,15 +22,12 @@ @_attrs_define class WorkitemAttachmentsSingleGetResponseDataMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, WorkitemAttachmentsSingleGetResponseDataMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, WorkitemAttachmentsSingleGetResponseDataMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -45,8 +42,11 @@ class WorkitemAttachmentsSingleGetResponseDataMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_meta_errors_item_source.py index e373fc09..1710d186 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_meta_errors_item_source.py @@ -1,13 +1,19 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.workitem_attachments_single_get_response_data_meta_errors_item_source_resource import ( + WorkitemAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + T = TypeVar( "T", bound="WorkitemAttachmentsSingleGetResponseDataMetaErrorsItemSource" ) @@ -16,24 +22,32 @@ @_attrs_define class WorkitemAttachmentsSingleGetResponseDataMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, WorkitemAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing + the error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "WorkitemAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource", + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -41,19 +55,38 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_attachments_single_get_response_data_meta_errors_item_source_resource import ( + WorkitemAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + WorkitemAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = WorkitemAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + workitem_attachments_single_get_response_data_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) workitem_attachments_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..f174c6ad --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource", +) + + +@_attrs_define +class WorkitemAttachmentsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + workitem_attachments_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + workitem_attachments_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return workitem_attachments_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships.py index e3098552..a7f9e992 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships.py @@ -23,10 +23,9 @@ @_attrs_define class WorkitemAttachmentsSingleGetResponseDataRelationships: """ - Attributes - ---------- - author : Union[Unset, WorkitemAttachmentsSingleGetResponseDataRelationshipsAuthor] - project : Union[Unset, WorkitemAttachmentsSingleGetResponseDataRelationshipsProject] + Attributes: + author (Union[Unset, WorkitemAttachmentsSingleGetResponseDataRelationshipsAuthor]): + project (Union[Unset, WorkitemAttachmentsSingleGetResponseDataRelationshipsProject]): """ author: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships_author.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships_author.py index c97c545e..80e29082 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships_author.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships_author.py @@ -22,9 +22,8 @@ @_attrs_define class WorkitemAttachmentsSingleGetResponseDataRelationshipsAuthor: """ - Attributes - ---------- - data : Union[Unset, WorkitemAttachmentsSingleGetResponseDataRelationshipsAuthorData] + Attributes: + data (Union[Unset, WorkitemAttachmentsSingleGetResponseDataRelationshipsAuthorData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships_author_data.py index 5fe60f8c..2ab051ed 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships_author_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships_author_data.py @@ -20,11 +20,10 @@ @_attrs_define class WorkitemAttachmentsSingleGetResponseDataRelationshipsAuthorData: """ - Attributes - ---------- - type : Union[Unset, WorkitemAttachmentsSingleGetResponseDataRelationshipsAuthorDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemAttachmentsSingleGetResponseDataRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships_project.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships_project.py index e303ccc7..ced469d1 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships_project.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships_project.py @@ -22,9 +22,8 @@ @_attrs_define class WorkitemAttachmentsSingleGetResponseDataRelationshipsProject: """ - Attributes - ---------- - data : Union[Unset, WorkitemAttachmentsSingleGetResponseDataRelationshipsProjectData] + Attributes: + data (Union[Unset, WorkitemAttachmentsSingleGetResponseDataRelationshipsProjectData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships_project_data.py index 1b525327..9385e861 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships_project_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_data_relationships_project_data.py @@ -20,11 +20,10 @@ @_attrs_define class WorkitemAttachmentsSingleGetResponseDataRelationshipsProjectData: """ - Attributes - ---------- - type : Union[Unset, WorkitemAttachmentsSingleGetResponseDataRelationshipsProjectDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemAttachmentsSingleGetResponseDataRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_links.py index 5f08870d..0f6fdaac 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_get_response_links.py @@ -14,9 +14,9 @@ @_attrs_define class WorkitemAttachmentsSingleGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/attachments/MyAttachmentId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_patch_request.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_patch_request.py index fb4cdc63..5bdd430d 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_patch_request.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_patch_request.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemAttachmentsSinglePatchRequest: """ - Attributes - ---------- - data : Union[Unset, WorkitemAttachmentsSinglePatchRequestData] + Attributes: + data (Union[Unset, WorkitemAttachmentsSinglePatchRequestData]): """ data: Union[Unset, "WorkitemAttachmentsSinglePatchRequestData"] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_patch_request_data.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_patch_request_data.py index 8c81d084..75a5e454 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_patch_request_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_patch_request_data.py @@ -23,11 +23,10 @@ @_attrs_define class WorkitemAttachmentsSinglePatchRequestData: """ - Attributes - ---------- - type : Union[Unset, WorkitemAttachmentsSinglePatchRequestDataType] - id : Union[Unset, str] - attributes : Union[Unset, WorkitemAttachmentsSinglePatchRequestDataAttributes] + Attributes: + type (Union[Unset, WorkitemAttachmentsSinglePatchRequestDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyAttachmentId. + attributes (Union[Unset, WorkitemAttachmentsSinglePatchRequestDataAttributes]): """ type: Union[Unset, WorkitemAttachmentsSinglePatchRequestDataType] = UNSET @@ -45,6 +44,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_patch_request_data_attributes.py b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_patch_request_data_attributes.py index a8dba00f..a4a1b4b1 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_patch_request_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_attachments_single_patch_request_data_attributes.py @@ -14,9 +14,8 @@ @_attrs_define class WorkitemAttachmentsSinglePatchRequestDataAttributes: """ - Attributes - ---------- - title : Union[Unset, str] + Attributes: + title (Union[Unset, str]): Example: Title. """ title: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response.py index 935e124d..128d649b 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response.py @@ -29,14 +29,13 @@ @_attrs_define class WorkitemCommentsListGetResponse: """ - Attributes - ---------- - meta : Union[Unset, WorkitemCommentsListGetResponseMeta] - data : Union[Unset, List['WorkitemCommentsListGetResponseDataItem']] - included : Union[Unset, List['WorkitemCommentsListGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, WorkitemCommentsListGetResponseLinks] + Attributes: + meta (Union[Unset, WorkitemCommentsListGetResponseMeta]): + data (Union[Unset, List['WorkitemCommentsListGetResponseDataItem']]): + included (Union[Unset, List['WorkitemCommentsListGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, WorkitemCommentsListGetResponseLinks]): """ meta: Union[Unset, "WorkitemCommentsListGetResponseMeta"] = UNSET @@ -59,7 +58,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) included: Union[Unset, List[Dict[str, Any]]] = UNSET @@ -67,7 +65,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item.py index 66e025b6..04157e3f 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item.py @@ -32,15 +32,14 @@ @_attrs_define class WorkitemCommentsListGetResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemCommentsListGetResponseDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, WorkitemCommentsListGetResponseDataItemAttributes] - relationships : Union[Unset, WorkitemCommentsListGetResponseDataItemRelationships] - meta : Union[Unset, WorkitemCommentsListGetResponseDataItemMeta] - links : Union[Unset, WorkitemCommentsListGetResponseDataItemLinks] + Attributes: + type (Union[Unset, WorkitemCommentsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, WorkitemCommentsListGetResponseDataItemAttributes]): + relationships (Union[Unset, WorkitemCommentsListGetResponseDataItemRelationships]): + meta (Union[Unset, WorkitemCommentsListGetResponseDataItemMeta]): + links (Union[Unset, WorkitemCommentsListGetResponseDataItemLinks]): """ type: Union[Unset, WorkitemCommentsListGetResponseDataItemType] = UNSET @@ -64,7 +63,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_attributes.py index 392ca469..6679611e 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_attributes.py @@ -22,13 +22,12 @@ @_attrs_define class WorkitemCommentsListGetResponseDataItemAttributes: """ - Attributes - ---------- - created : Union[Unset, datetime.datetime] - id : Union[Unset, str] - resolved : Union[Unset, bool] - text : Union[Unset, WorkitemCommentsListGetResponseDataItemAttributesText] - title : Union[Unset, str] + Attributes: + created (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + id (Union[Unset, str]): Example: MyCommentId. + resolved (Union[Unset, bool]): + text (Union[Unset, WorkitemCommentsListGetResponseDataItemAttributesText]): + title (Union[Unset, str]): Example: Title. """ created: Union[Unset, datetime.datetime] = UNSET @@ -48,7 +47,9 @@ def to_dict(self) -> Dict[str, Any]: created = self.created.isoformat() id = self.id + resolved = self.resolved + text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.text, Unset): text = self.text.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_attributes_text.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_attributes_text.py index 672aa058..6661f176 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_attributes_text.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_attributes_text.py @@ -17,10 +17,9 @@ @_attrs_define class WorkitemCommentsListGetResponseDataItemAttributesText: """ - Attributes - ---------- - type : Union[Unset, WorkitemCommentsListGetResponseDataItemAttributesTextType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemCommentsListGetResponseDataItemAttributesTextType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_links.py index a1624476..54867d31 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_links.py @@ -14,9 +14,9 @@ @_attrs_define class WorkitemCommentsListGetResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/comments/MyCommentId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_meta.py index 4fe1fb5d..30f6b8f7 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_meta.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemCommentsListGetResponseDataItemMeta: """ - Attributes - ---------- - errors : Union[Unset, List['WorkitemCommentsListGetResponseDataItemMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['WorkitemCommentsListGetResponseDataItemMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_meta_errors_item.py index 23093e33..36ea19c3 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class WorkitemCommentsListGetResponseDataItemMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, WorkitemCommentsListGetResponseDataItemMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, WorkitemCommentsListGetResponseDataItemMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class WorkitemCommentsListGetResponseDataItemMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_meta_errors_item_source.py index 888a59c6..7257b227 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_meta_errors_item_source.py @@ -1,13 +1,19 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.workitem_comments_list_get_response_data_item_meta_errors_item_source_resource import ( + WorkitemCommentsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + T = TypeVar( "T", bound="WorkitemCommentsListGetResponseDataItemMetaErrorsItemSource" ) @@ -16,24 +22,32 @@ @_attrs_define class WorkitemCommentsListGetResponseDataItemMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, WorkitemCommentsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing + the error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "WorkitemCommentsListGetResponseDataItemMetaErrorsItemSourceResource", + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -41,19 +55,38 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_comments_list_get_response_data_item_meta_errors_item_source_resource import ( + WorkitemCommentsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + WorkitemCommentsListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = WorkitemCommentsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + workitem_comments_list_get_response_data_item_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) workitem_comments_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..a8577987 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemCommentsListGetResponseDataItemMetaErrorsItemSourceResource", +) + + +@_attrs_define +class WorkitemCommentsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + workitem_comments_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + workitem_comments_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return workitem_comments_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships.py index 3ada8dae..72c9892a 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships.py @@ -29,12 +29,11 @@ @_attrs_define class WorkitemCommentsListGetResponseDataItemRelationships: """ - Attributes - ---------- - author : Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsAuthor] - child_comments : Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsChildComments] - parent_comment : Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsParentComment] - project : Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsProject] + Attributes: + author (Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsAuthor]): + child_comments (Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsChildComments]): + parent_comment (Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsParentComment]): + project (Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsProject]): """ author: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_author.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_author.py index 61507eeb..d2b96d2d 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_author.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_author.py @@ -22,9 +22,8 @@ @_attrs_define class WorkitemCommentsListGetResponseDataItemRelationshipsAuthor: """ - Attributes - ---------- - data : Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsAuthorData] + Attributes: + data (Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsAuthorData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_author_data.py index 2d15048e..fba9cfa2 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_author_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_author_data.py @@ -19,11 +19,10 @@ @_attrs_define class WorkitemCommentsListGetResponseDataItemRelationshipsAuthorData: """ - Attributes - ---------- - type : Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsAuthorDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -42,6 +41,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_child_comments.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_child_comments.py index 9f28490e..7dc4cd78 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_child_comments.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_child_comments.py @@ -26,10 +26,9 @@ @_attrs_define class WorkitemCommentsListGetResponseDataItemRelationshipsChildComments: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemCommentsListGetResponseDataItemRelationshipsChildCommentsDataItem']] - meta : Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsChildCommentsMeta] + Attributes: + data (Union[Unset, List['WorkitemCommentsListGetResponseDataItemRelationshipsChildCommentsDataItem']]): + meta (Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsChildCommentsMeta]): """ data: Union[ @@ -52,7 +51,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_child_comments_data_item.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_child_comments_data_item.py index e5a3423d..52369aec 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_child_comments_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_child_comments_data_item.py @@ -20,11 +20,10 @@ @_attrs_define class WorkitemCommentsListGetResponseDataItemRelationshipsChildCommentsDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsChildCommentsDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsChildCommentsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_child_comments_meta.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_child_comments_meta.py index b3fb741a..ab586b39 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_child_comments_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_child_comments_meta.py @@ -17,9 +17,8 @@ @_attrs_define class WorkitemCommentsListGetResponseDataItemRelationshipsChildCommentsMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_parent_comment.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_parent_comment.py index 0dc1cd02..afae50a5 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_parent_comment.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_parent_comment.py @@ -23,9 +23,8 @@ @_attrs_define class WorkitemCommentsListGetResponseDataItemRelationshipsParentComment: """ - Attributes - ---------- - data : Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsParentCommentData] + Attributes: + data (Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsParentCommentData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_parent_comment_data.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_parent_comment_data.py index 352060fa..b6483cdd 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_parent_comment_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_parent_comment_data.py @@ -20,11 +20,10 @@ @_attrs_define class WorkitemCommentsListGetResponseDataItemRelationshipsParentCommentData: """ - Attributes - ---------- - type : Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsParentCommentDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsParentCommentDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_project.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_project.py index 97f58425..6c25e589 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_project.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_project.py @@ -22,9 +22,8 @@ @_attrs_define class WorkitemCommentsListGetResponseDataItemRelationshipsProject: """ - Attributes - ---------- - data : Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsProjectData] + Attributes: + data (Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsProjectData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_project_data.py index c2b2ef09..771f87b0 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_project_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_data_item_relationships_project_data.py @@ -20,11 +20,10 @@ @_attrs_define class WorkitemCommentsListGetResponseDataItemRelationshipsProjectData: """ - Attributes - ---------- - type : Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsProjectDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemCommentsListGetResponseDataItemRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_links.py index 1917dce1..0ea228fb 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_links.py @@ -14,13 +14,17 @@ @_attrs_define class WorkitemCommentsListGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - first : Union[Unset, str] - prev : Union[Unset, str] - next_ : Union[Unset, str] - last : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/comments?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/comments?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/comments?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/comments?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/comments?page%5Bsize%5D=10&page%5Bnumber%5D=9. """ self_: Union[Unset, str] = UNSET @@ -34,9 +38,13 @@ class WorkitemCommentsListGetResponseLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + first = self.first + prev = self.prev + next_ = self.next_ + last = self.last field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_meta.py index 0f5fbb25..458a4a79 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_get_response_meta.py @@ -14,9 +14,8 @@ @_attrs_define class WorkitemCommentsListGetResponseMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request.py index e3c52b02..e072248a 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemCommentsListPostRequest: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemCommentsListPostRequestDataItem']] + Attributes: + data (Union[Unset, List['WorkitemCommentsListPostRequestDataItem']]): """ data: Union[Unset, List["WorkitemCommentsListPostRequestDataItem"]] = UNSET @@ -36,7 +35,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item.py index 5142d9d4..98c4dd84 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item.py @@ -26,11 +26,10 @@ @_attrs_define class WorkitemCommentsListPostRequestDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemCommentsListPostRequestDataItemType] - attributes : Union[Unset, WorkitemCommentsListPostRequestDataItemAttributes] - relationships : Union[Unset, WorkitemCommentsListPostRequestDataItemRelationships] + Attributes: + type (Union[Unset, WorkitemCommentsListPostRequestDataItemType]): + attributes (Union[Unset, WorkitemCommentsListPostRequestDataItemAttributes]): + relationships (Union[Unset, WorkitemCommentsListPostRequestDataItemRelationships]): """ type: Union[Unset, WorkitemCommentsListPostRequestDataItemType] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_attributes.py index f8c90bf3..6e6751dc 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_attributes.py @@ -20,11 +20,10 @@ @_attrs_define class WorkitemCommentsListPostRequestDataItemAttributes: """ - Attributes - ---------- - resolved : Union[Unset, bool] - text : Union[Unset, WorkitemCommentsListPostRequestDataItemAttributesText] - title : Union[Unset, str] + Attributes: + resolved (Union[Unset, bool]): + text (Union[Unset, WorkitemCommentsListPostRequestDataItemAttributesText]): + title (Union[Unset, str]): Example: Title. """ resolved: Union[Unset, bool] = UNSET @@ -38,6 +37,7 @@ class WorkitemCommentsListPostRequestDataItemAttributes: def to_dict(self) -> Dict[str, Any]: resolved = self.resolved + text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.text, Unset): text = self.text.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_attributes_text.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_attributes_text.py index ba65539e..1c4ce411 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_attributes_text.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_attributes_text.py @@ -17,10 +17,9 @@ @_attrs_define class WorkitemCommentsListPostRequestDataItemAttributesText: """ - Attributes - ---------- - type : Union[Unset, WorkitemCommentsListPostRequestDataItemAttributesTextType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemCommentsListPostRequestDataItemAttributesTextType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships.py index 083f2348..3926242a 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships.py @@ -23,10 +23,9 @@ @_attrs_define class WorkitemCommentsListPostRequestDataItemRelationships: """ - Attributes - ---------- - author : Union[Unset, WorkitemCommentsListPostRequestDataItemRelationshipsAuthor] - parent_comment : Union[Unset, WorkitemCommentsListPostRequestDataItemRelationshipsParentComment] + Attributes: + author (Union[Unset, WorkitemCommentsListPostRequestDataItemRelationshipsAuthor]): + parent_comment (Union[Unset, WorkitemCommentsListPostRequestDataItemRelationshipsParentComment]): """ author: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships_author.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships_author.py index cf6c2aea..be72a318 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships_author.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships_author.py @@ -22,9 +22,8 @@ @_attrs_define class WorkitemCommentsListPostRequestDataItemRelationshipsAuthor: """ - Attributes - ---------- - data : Union[Unset, WorkitemCommentsListPostRequestDataItemRelationshipsAuthorData] + Attributes: + data (Union[Unset, WorkitemCommentsListPostRequestDataItemRelationshipsAuthorData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships_author_data.py index 4c246ec9..4e4b281a 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships_author_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships_author_data.py @@ -19,10 +19,9 @@ @_attrs_define class WorkitemCommentsListPostRequestDataItemRelationshipsAuthorData: """ - Attributes - ---------- - type : Union[Unset, WorkitemCommentsListPostRequestDataItemRelationshipsAuthorDataType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemCommentsListPostRequestDataItemRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships_parent_comment.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships_parent_comment.py index cf3336a4..3cb19b75 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships_parent_comment.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships_parent_comment.py @@ -23,9 +23,8 @@ @_attrs_define class WorkitemCommentsListPostRequestDataItemRelationshipsParentComment: """ - Attributes - ---------- - data : Union[Unset, WorkitemCommentsListPostRequestDataItemRelationshipsParentCommentData] + Attributes: + data (Union[Unset, WorkitemCommentsListPostRequestDataItemRelationshipsParentCommentData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships_parent_comment_data.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships_parent_comment_data.py index d7eb8f0a..356976b3 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships_parent_comment_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_request_data_item_relationships_parent_comment_data.py @@ -20,10 +20,9 @@ @_attrs_define class WorkitemCommentsListPostRequestDataItemRelationshipsParentCommentData: """ - Attributes - ---------- - type : Union[Unset, WorkitemCommentsListPostRequestDataItemRelationshipsParentCommentDataType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemCommentsListPostRequestDataItemRelationshipsParentCommentDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyCommentId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_response.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_response.py index da7dfb67..1af2fd8f 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_response.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_response.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemCommentsListPostResponse: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemCommentsListPostResponseDataItem']] + Attributes: + data (Union[Unset, List['WorkitemCommentsListPostResponseDataItem']]): """ data: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_response_data_item.py index b4fdb622..ba6b0619 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_response_data_item.py @@ -23,11 +23,10 @@ @_attrs_define class WorkitemCommentsListPostResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemCommentsListPostResponseDataItemType] - id : Union[Unset, str] - links : Union[Unset, WorkitemCommentsListPostResponseDataItemLinks] + Attributes: + type (Union[Unset, WorkitemCommentsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyCommentId. + links (Union[Unset, WorkitemCommentsListPostResponseDataItemLinks]): """ type: Union[Unset, WorkitemCommentsListPostResponseDataItemType] = UNSET @@ -45,6 +44,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + links: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_response_data_item_links.py index bcd40a2f..92f1817c 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_list_post_response_data_item_links.py @@ -14,9 +14,9 @@ @_attrs_define class WorkitemCommentsListPostResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/comments/MyCommentId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response.py index 226d8239..1bcf8c43 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response.py @@ -26,13 +26,12 @@ @_attrs_define class WorkitemCommentsSingleGetResponse: """ - Attributes - ---------- - data : Union[Unset, WorkitemCommentsSingleGetResponseData] - included : Union[Unset, List['WorkitemCommentsSingleGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, WorkitemCommentsSingleGetResponseLinks] + Attributes: + data (Union[Unset, WorkitemCommentsSingleGetResponseData]): + included (Union[Unset, List['WorkitemCommentsSingleGetResponseIncludedItem']]): Related entities might be + returned, see Rest API User Guide. + links (Union[Unset, WorkitemCommentsSingleGetResponseLinks]): """ data: Union[Unset, "WorkitemCommentsSingleGetResponseData"] = UNSET @@ -54,7 +53,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data.py index d0b569c5..a623fd2f 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data.py @@ -32,15 +32,14 @@ @_attrs_define class WorkitemCommentsSingleGetResponseData: """ - Attributes - ---------- - type : Union[Unset, WorkitemCommentsSingleGetResponseDataType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, WorkitemCommentsSingleGetResponseDataAttributes] - relationships : Union[Unset, WorkitemCommentsSingleGetResponseDataRelationships] - meta : Union[Unset, WorkitemCommentsSingleGetResponseDataMeta] - links : Union[Unset, WorkitemCommentsSingleGetResponseDataLinks] + Attributes: + type (Union[Unset, WorkitemCommentsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, WorkitemCommentsSingleGetResponseDataAttributes]): + relationships (Union[Unset, WorkitemCommentsSingleGetResponseDataRelationships]): + meta (Union[Unset, WorkitemCommentsSingleGetResponseDataMeta]): + links (Union[Unset, WorkitemCommentsSingleGetResponseDataLinks]): """ type: Union[Unset, WorkitemCommentsSingleGetResponseDataType] = UNSET @@ -64,7 +63,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_attributes.py index 6cbe731a..5505430b 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_attributes.py @@ -22,13 +22,12 @@ @_attrs_define class WorkitemCommentsSingleGetResponseDataAttributes: """ - Attributes - ---------- - created : Union[Unset, datetime.datetime] - id : Union[Unset, str] - resolved : Union[Unset, bool] - text : Union[Unset, WorkitemCommentsSingleGetResponseDataAttributesText] - title : Union[Unset, str] + Attributes: + created (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + id (Union[Unset, str]): Example: MyCommentId. + resolved (Union[Unset, bool]): + text (Union[Unset, WorkitemCommentsSingleGetResponseDataAttributesText]): + title (Union[Unset, str]): Example: Title. """ created: Union[Unset, datetime.datetime] = UNSET @@ -48,7 +47,9 @@ def to_dict(self) -> Dict[str, Any]: created = self.created.isoformat() id = self.id + resolved = self.resolved + text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.text, Unset): text = self.text.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_attributes_text.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_attributes_text.py index 3e1361b9..98373885 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_attributes_text.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_attributes_text.py @@ -17,10 +17,9 @@ @_attrs_define class WorkitemCommentsSingleGetResponseDataAttributesText: """ - Attributes - ---------- - type : Union[Unset, WorkitemCommentsSingleGetResponseDataAttributesTextType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemCommentsSingleGetResponseDataAttributesTextType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_links.py index 37e2e223..01f3fe15 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_links.py @@ -14,9 +14,9 @@ @_attrs_define class WorkitemCommentsSingleGetResponseDataLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/comments/MyCommentId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_meta.py index a494f7ca..d5d7b784 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_meta.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemCommentsSingleGetResponseDataMeta: """ - Attributes - ---------- - errors : Union[Unset, List['WorkitemCommentsSingleGetResponseDataMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['WorkitemCommentsSingleGetResponseDataMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_meta_errors_item.py index ad12d6fb..185493a9 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class WorkitemCommentsSingleGetResponseDataMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, WorkitemCommentsSingleGetResponseDataMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, WorkitemCommentsSingleGetResponseDataMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class WorkitemCommentsSingleGetResponseDataMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_meta_errors_item_source.py index b9d11f93..c1e60661 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_meta_errors_item_source.py @@ -1,13 +1,19 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.workitem_comments_single_get_response_data_meta_errors_item_source_resource import ( + WorkitemCommentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + T = TypeVar( "T", bound="WorkitemCommentsSingleGetResponseDataMetaErrorsItemSource" ) @@ -16,24 +22,32 @@ @_attrs_define class WorkitemCommentsSingleGetResponseDataMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, WorkitemCommentsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the + error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, + "WorkitemCommentsSingleGetResponseDataMetaErrorsItemSourceResource", + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -41,19 +55,38 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitem_comments_single_get_response_data_meta_errors_item_source_resource import ( + WorkitemCommentsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + WorkitemCommentsSingleGetResponseDataMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = WorkitemCommentsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + workitem_comments_single_get_response_data_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) workitem_comments_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..d7dc8ab8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,78 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemCommentsSingleGetResponseDataMetaErrorsItemSourceResource", +) + + +@_attrs_define +class WorkitemCommentsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + workitem_comments_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + workitem_comments_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return workitem_comments_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships.py index 9736a607..192a3126 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships.py @@ -29,12 +29,11 @@ @_attrs_define class WorkitemCommentsSingleGetResponseDataRelationships: """ - Attributes - ---------- - author : Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsAuthor] - child_comments : Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsChildComments] - parent_comment : Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsParentComment] - project : Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsProject] + Attributes: + author (Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsAuthor]): + child_comments (Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsChildComments]): + parent_comment (Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsParentComment]): + project (Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsProject]): """ author: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_author.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_author.py index f3196cd9..9ca5b1a9 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_author.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_author.py @@ -22,9 +22,8 @@ @_attrs_define class WorkitemCommentsSingleGetResponseDataRelationshipsAuthor: """ - Attributes - ---------- - data : Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsAuthorData] + Attributes: + data (Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsAuthorData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_author_data.py index 69ca45a4..be02bfa1 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_author_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_author_data.py @@ -19,11 +19,10 @@ @_attrs_define class WorkitemCommentsSingleGetResponseDataRelationshipsAuthorData: """ - Attributes - ---------- - type : Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsAuthorDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_child_comments.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_child_comments.py index 9c6d7fcc..776bf5b4 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_child_comments.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_child_comments.py @@ -26,10 +26,9 @@ @_attrs_define class WorkitemCommentsSingleGetResponseDataRelationshipsChildComments: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemCommentsSingleGetResponseDataRelationshipsChildCommentsDataItem']] - meta : Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsChildCommentsMeta] + Attributes: + data (Union[Unset, List['WorkitemCommentsSingleGetResponseDataRelationshipsChildCommentsDataItem']]): + meta (Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsChildCommentsMeta]): """ data: Union[ @@ -52,7 +51,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_child_comments_data_item.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_child_comments_data_item.py index 593853b6..57e3c58f 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_child_comments_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_child_comments_data_item.py @@ -20,11 +20,10 @@ @_attrs_define class WorkitemCommentsSingleGetResponseDataRelationshipsChildCommentsDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsChildCommentsDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsChildCommentsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_child_comments_meta.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_child_comments_meta.py index 8a3fc496..27e606f3 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_child_comments_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_child_comments_meta.py @@ -17,9 +17,8 @@ @_attrs_define class WorkitemCommentsSingleGetResponseDataRelationshipsChildCommentsMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_parent_comment.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_parent_comment.py index 7fd1506d..8e8e1c3a 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_parent_comment.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_parent_comment.py @@ -23,9 +23,8 @@ @_attrs_define class WorkitemCommentsSingleGetResponseDataRelationshipsParentComment: """ - Attributes - ---------- - data : Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsParentCommentData] + Attributes: + data (Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsParentCommentData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_parent_comment_data.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_parent_comment_data.py index 02d91a8f..f12b693c 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_parent_comment_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_parent_comment_data.py @@ -20,11 +20,10 @@ @_attrs_define class WorkitemCommentsSingleGetResponseDataRelationshipsParentCommentData: """ - Attributes - ---------- - type : Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsParentCommentDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsParentCommentDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_project.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_project.py index d3fda800..827a9186 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_project.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_project.py @@ -22,9 +22,8 @@ @_attrs_define class WorkitemCommentsSingleGetResponseDataRelationshipsProject: """ - Attributes - ---------- - data : Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsProjectData] + Attributes: + data (Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsProjectData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_project_data.py index 58e00fa5..4e20f615 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_project_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_data_relationships_project_data.py @@ -19,11 +19,10 @@ @_attrs_define class WorkitemCommentsSingleGetResponseDataRelationshipsProjectData: """ - Attributes - ---------- - type : Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsProjectDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemCommentsSingleGetResponseDataRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -42,6 +41,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_links.py index b906e00b..01500867 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_get_response_links.py @@ -14,9 +14,9 @@ @_attrs_define class WorkitemCommentsSingleGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/comments/MyCommentId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_patch_request.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_patch_request.py index e02a0ad1..33e3aef8 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_patch_request.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_patch_request.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemCommentsSinglePatchRequest: """ - Attributes - ---------- - data : Union[Unset, WorkitemCommentsSinglePatchRequestData] + Attributes: + data (Union[Unset, WorkitemCommentsSinglePatchRequestData]): """ data: Union[Unset, "WorkitemCommentsSinglePatchRequestData"] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_patch_request_data.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_patch_request_data.py index 47d1fb6a..02be827c 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_patch_request_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_patch_request_data.py @@ -23,11 +23,10 @@ @_attrs_define class WorkitemCommentsSinglePatchRequestData: """ - Attributes - ---------- - type : Union[Unset, WorkitemCommentsSinglePatchRequestDataType] - id : Union[Unset, str] - attributes : Union[Unset, WorkitemCommentsSinglePatchRequestDataAttributes] + Attributes: + type (Union[Unset, WorkitemCommentsSinglePatchRequestDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyCommentId. + attributes (Union[Unset, WorkitemCommentsSinglePatchRequestDataAttributes]): """ type: Union[Unset, WorkitemCommentsSinglePatchRequestDataType] = UNSET @@ -45,6 +44,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_patch_request_data_attributes.py b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_patch_request_data_attributes.py index 4b500f5e..b519ca81 100644 --- a/polarion_rest_api_client/open_api_client/models/workitem_comments_single_patch_request_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/workitem_comments_single_patch_request_data_attributes.py @@ -14,9 +14,8 @@ @_attrs_define class WorkitemCommentsSinglePatchRequestDataAttributes: """ - Attributes - ---------- - resolved : Union[Unset, bool] + Attributes: + resolved (Union[Unset, bool]): """ resolved: Union[Unset, bool] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_delete_request.py b/polarion_rest_api_client/open_api_client/models/workitems_list_delete_request.py index f5af495e..07916815 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_delete_request.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_delete_request.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemsListDeleteRequest: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsListDeleteRequestDataItem']] + Attributes: + data (Union[Unset, List['WorkitemsListDeleteRequestDataItem']]): """ data: Union[Unset, List["WorkitemsListDeleteRequestDataItem"]] = UNSET @@ -36,7 +35,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_delete_request_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_delete_request_data_item.py index be677499..02b9c06e 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_delete_request_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_delete_request_data_item.py @@ -17,10 +17,9 @@ @_attrs_define class WorkitemsListDeleteRequestDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListDeleteRequestDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsListDeleteRequestDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. """ type: Union[Unset, WorkitemsListDeleteRequestDataItemType] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response.py index e5e5902b..d9aebc3b 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response.py @@ -29,14 +29,13 @@ @_attrs_define class WorkitemsListGetResponse: """ - Attributes - ---------- - meta : Union[Unset, WorkitemsListGetResponseMeta] - data : Union[Unset, List['WorkitemsListGetResponseDataItem']] - included : Union[Unset, List['WorkitemsListGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, WorkitemsListGetResponseLinks] + Attributes: + meta (Union[Unset, WorkitemsListGetResponseMeta]): + data (Union[Unset, List['WorkitemsListGetResponseDataItem']]): + included (Union[Unset, List['WorkitemsListGetResponseIncludedItem']]): Related entities might be returned, see + Rest API + User Guide. + links (Union[Unset, WorkitemsListGetResponseLinks]): """ meta: Union[Unset, "WorkitemsListGetResponseMeta"] = UNSET @@ -59,7 +58,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) included: Union[Unset, List[Dict[str, Any]]] = UNSET @@ -67,7 +65,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item.py index c38e87e3..b295465e 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item.py @@ -32,15 +32,14 @@ @_attrs_define class WorkitemsListGetResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListGetResponseDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, WorkitemsListGetResponseDataItemAttributes] - relationships : Union[Unset, WorkitemsListGetResponseDataItemRelationships] - meta : Union[Unset, WorkitemsListGetResponseDataItemMeta] - links : Union[Unset, WorkitemsListGetResponseDataItemLinks] + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, WorkitemsListGetResponseDataItemAttributes]): + relationships (Union[Unset, WorkitemsListGetResponseDataItemRelationships]): + meta (Union[Unset, WorkitemsListGetResponseDataItemMeta]): + links (Union[Unset, WorkitemsListGetResponseDataItemLinks]): """ type: Union[Unset, WorkitemsListGetResponseDataItemType] = UNSET @@ -64,7 +63,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_attributes.py index 36b58c58..63223cab 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_attributes.py @@ -25,27 +25,26 @@ @_attrs_define class WorkitemsListGetResponseDataItemAttributes: """ - Attributes - ---------- - created : Union[Unset, datetime.datetime] - description : Union[Unset, WorkitemsListGetResponseDataItemAttributesDescription] - due_date : Union[Unset, datetime.date] - hyperlinks : Union[Unset, List['WorkitemsListGetResponseDataItemAttributesHyperlinksItem']] - id : Union[Unset, str] - initial_estimate : Union[Unset, str] - outline_number : Union[Unset, str] - planned_end : Union[Unset, datetime.datetime] - planned_start : Union[Unset, datetime.datetime] - priority : Union[Unset, str] - remaining_estimate : Union[Unset, str] - resolution : Union[Unset, str] - resolved_on : Union[Unset, datetime.datetime] - severity : Union[Unset, str] - status : Union[Unset, str] - time_spent : Union[Unset, str] - title : Union[Unset, str] - type : Union[Unset, str] - updated : Union[Unset, datetime.datetime] + Attributes: + created (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + description (Union[Unset, WorkitemsListGetResponseDataItemAttributesDescription]): + due_date (Union[Unset, datetime.date]): Example: 1970-01-01. + hyperlinks (Union[Unset, List['WorkitemsListGetResponseDataItemAttributesHyperlinksItem']]): + id (Union[Unset, str]): Example: MyWorkItemId. + initial_estimate (Union[Unset, str]): Example: 5 1/2d. + outline_number (Union[Unset, str]): Example: 1.11. + planned_end (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + planned_start (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + priority (Union[Unset, str]): Example: 90.0. + remaining_estimate (Union[Unset, str]): Example: 5 1/2d. + resolution (Union[Unset, str]): Example: done. + resolved_on (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + severity (Union[Unset, str]): Example: blocker. + status (Union[Unset, str]): Example: open. + time_spent (Union[Unset, str]): Example: 5 1/2d. + title (Union[Unset, str]): Example: Title. + type (Union[Unset, str]): Example: task. + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. """ created: Union[Unset, datetime.datetime] = UNSET @@ -93,12 +92,14 @@ def to_dict(self) -> Dict[str, Any]: hyperlinks = [] for hyperlinks_item_data in self.hyperlinks: hyperlinks_item = hyperlinks_item_data.to_dict() - hyperlinks.append(hyperlinks_item) id = self.id + initial_estimate = self.initial_estimate + outline_number = self.outline_number + planned_end: Union[Unset, str] = UNSET if not isinstance(self.planned_end, Unset): planned_end = self.planned_end.isoformat() @@ -108,17 +109,25 @@ def to_dict(self) -> Dict[str, Any]: planned_start = self.planned_start.isoformat() priority = self.priority + remaining_estimate = self.remaining_estimate + resolution = self.resolution + resolved_on: Union[Unset, str] = UNSET if not isinstance(self.resolved_on, Unset): resolved_on = self.resolved_on.isoformat() severity = self.severity + status = self.status + time_spent = self.time_spent + title = self.title + type = self.type + updated: Union[Unset, str] = UNSET if not isinstance(self.updated, Unset): updated = self.updated.isoformat() diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_attributes_description.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_attributes_description.py index 3b9635bc..68ba8793 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_attributes_description.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_attributes_description.py @@ -17,10 +17,9 @@ @_attrs_define class WorkitemsListGetResponseDataItemAttributesDescription: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListGetResponseDataItemAttributesDescriptionType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemAttributesDescriptionType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_attributes_hyperlinks_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_attributes_hyperlinks_item.py index 14fea69a..7332169e 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_attributes_hyperlinks_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_attributes_hyperlinks_item.py @@ -16,10 +16,9 @@ @_attrs_define class WorkitemsListGetResponseDataItemAttributesHyperlinksItem: """ - Attributes - ---------- - role : Union[Unset, str] - uri : Union[Unset, str] + Attributes: + role (Union[Unset, str]): Example: ref_ext. + uri (Union[Unset, str]): Example: https://polarion.plm.automation.siemens.com. """ role: Union[Unset, str] = UNSET @@ -30,6 +29,7 @@ class WorkitemsListGetResponseDataItemAttributesHyperlinksItem: def to_dict(self) -> Dict[str, Any]: role = self.role + uri = self.uri field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_links.py index 8f6b8beb..b103a6d7 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_links.py @@ -14,10 +14,11 @@ @_attrs_define class WorkitemsListGetResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - portal : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId?revision=1234. + portal (Union[Unset, str]): Example: server-host-name/application- + path/polarion/redirect/project/MyProjectId/workitem?id=MyWorkItemId&revision=1234. """ self_: Union[Unset, str] = UNSET @@ -28,6 +29,7 @@ class WorkitemsListGetResponseDataItemLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + portal = self.portal field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_meta.py index 69110d04..b9f0cf20 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_meta.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemsListGetResponseDataItemMeta: """ - Attributes - ---------- - errors : Union[Unset, List['WorkitemsListGetResponseDataItemMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['WorkitemsListGetResponseDataItemMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_meta_errors_item.py index 8bfc3335..d84cb0a6 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class WorkitemsListGetResponseDataItemMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, WorkitemsListGetResponseDataItemMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, WorkitemsListGetResponseDataItemMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class WorkitemsListGetResponseDataItemMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_meta_errors_item_source.py index 46f436e1..f40be5a7 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_meta_errors_item_source.py @@ -1,37 +1,50 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.workitems_list_get_response_data_item_meta_errors_item_source_resource import ( + WorkitemsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + T = TypeVar("T", bound="WorkitemsListGetResponseDataItemMetaErrorsItemSource") @_attrs_define class WorkitemsListGetResponseDataItemMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, WorkitemsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing the + error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "WorkitemsListGetResponseDataItemMetaErrorsItemSourceResource" + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -39,20 +52,38 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_get_response_data_item_meta_errors_item_source_resource import ( + WorkitemsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, WorkitemsListGetResponseDataItemMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = WorkitemsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + workitems_list_get_response_data_item_meta_errors_item_source_obj = ( cls( pointer=pointer, parameter=parameter, + resource=resource, ) ) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..75a353d5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsListGetResponseDataItemMetaErrorsItemSourceResource" +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + workitems_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + workitems_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships.py index f98f0861..e00ab873 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships.py @@ -9,6 +9,9 @@ from ..types import UNSET, Unset if TYPE_CHECKING: + from ..models.workitems_list_get_response_data_item_relationships_approvals import ( + WorkitemsListGetResponseDataItemRelationshipsApprovals, + ) from ..models.workitems_list_get_response_data_item_relationships_assignee import ( WorkitemsListGetResponseDataItemRelationshipsAssignee, ) @@ -18,12 +21,24 @@ from ..models.workitems_list_get_response_data_item_relationships_author import ( WorkitemsListGetResponseDataItemRelationshipsAuthor, ) + from ..models.workitems_list_get_response_data_item_relationships_backlinked_work_items import ( + WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItems, + ) from ..models.workitems_list_get_response_data_item_relationships_categories import ( WorkitemsListGetResponseDataItemRelationshipsCategories, ) from ..models.workitems_list_get_response_data_item_relationships_comments import ( WorkitemsListGetResponseDataItemRelationshipsComments, ) + from ..models.workitems_list_get_response_data_item_relationships_externally_linked_work_items import ( + WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItems, + ) + from ..models.workitems_list_get_response_data_item_relationships_linked_oslc_resources import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResources, + ) + from ..models.workitems_list_get_response_data_item_relationships_linked_revisions import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedRevisions, + ) from ..models.workitems_list_get_response_data_item_relationships_linked_work_items import ( WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItems, ) @@ -36,9 +51,18 @@ from ..models.workitems_list_get_response_data_item_relationships_project import ( WorkitemsListGetResponseDataItemRelationshipsProject, ) + from ..models.workitems_list_get_response_data_item_relationships_test_steps import ( + WorkitemsListGetResponseDataItemRelationshipsTestSteps, + ) + from ..models.workitems_list_get_response_data_item_relationships_votes import ( + WorkitemsListGetResponseDataItemRelationshipsVotes, + ) from ..models.workitems_list_get_response_data_item_relationships_watches import ( WorkitemsListGetResponseDataItemRelationshipsWatches, ) + from ..models.workitems_list_get_response_data_item_relationships_work_records import ( + WorkitemsListGetResponseDataItemRelationshipsWorkRecords, + ) T = TypeVar("T", bound="WorkitemsListGetResponseDataItemRelationships") @@ -47,20 +71,31 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationships: """ - Attributes - ---------- - assignee : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAssignee] - attachments : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAttachments] - author : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAuthor] - categories : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsCategories] - comments : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsComments] - linked_work_items : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItems] - module : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsModule] - planned_in : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsPlannedIn] - project : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsProject] - watches : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsWatches] + Attributes: + approvals (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsApprovals]): + assignee (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAssignee]): + attachments (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAttachments]): + author (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAuthor]): + backlinked_work_items (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItems]): + categories (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsCategories]): + comments (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsComments]): + externally_linked_work_items (Union[Unset, + WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItems]): + linked_oslc_resources (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResources]): + linked_revisions (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsLinkedRevisions]): + linked_work_items (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItems]): + module (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsModule]): + planned_in (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsPlannedIn]): + project (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsProject]): + test_steps (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsTestSteps]): + votes (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsVotes]): + watches (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsWatches]): + work_records (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsWorkRecords]): """ + approvals: Union[ + Unset, "WorkitemsListGetResponseDataItemRelationshipsApprovals" + ] = UNSET assignee: Union[ Unset, "WorkitemsListGetResponseDataItemRelationshipsAssignee" ] = UNSET @@ -70,12 +105,27 @@ class WorkitemsListGetResponseDataItemRelationships: author: Union[ Unset, "WorkitemsListGetResponseDataItemRelationshipsAuthor" ] = UNSET + backlinked_work_items: Union[ + Unset, + "WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItems", + ] = UNSET categories: Union[ Unset, "WorkitemsListGetResponseDataItemRelationshipsCategories" ] = UNSET comments: Union[ Unset, "WorkitemsListGetResponseDataItemRelationshipsComments" ] = UNSET + externally_linked_work_items: Union[ + Unset, + "WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItems", + ] = UNSET + linked_oslc_resources: Union[ + Unset, + "WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResources", + ] = UNSET + linked_revisions: Union[ + Unset, "WorkitemsListGetResponseDataItemRelationshipsLinkedRevisions" + ] = UNSET linked_work_items: Union[ Unset, "WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItems" ] = UNSET @@ -88,14 +138,27 @@ class WorkitemsListGetResponseDataItemRelationships: project: Union[ Unset, "WorkitemsListGetResponseDataItemRelationshipsProject" ] = UNSET + test_steps: Union[ + Unset, "WorkitemsListGetResponseDataItemRelationshipsTestSteps" + ] = UNSET + votes: Union[ + Unset, "WorkitemsListGetResponseDataItemRelationshipsVotes" + ] = UNSET watches: Union[ Unset, "WorkitemsListGetResponseDataItemRelationshipsWatches" ] = UNSET + work_records: Union[ + Unset, "WorkitemsListGetResponseDataItemRelationshipsWorkRecords" + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: + approvals: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.approvals, Unset): + approvals = self.approvals.to_dict() + assignee: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.assignee, Unset): assignee = self.assignee.to_dict() @@ -108,6 +171,10 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.author, Unset): author = self.author.to_dict() + backlinked_work_items: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.backlinked_work_items, Unset): + backlinked_work_items = self.backlinked_work_items.to_dict() + categories: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.categories, Unset): categories = self.categories.to_dict() @@ -116,6 +183,20 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.comments, Unset): comments = self.comments.to_dict() + externally_linked_work_items: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.externally_linked_work_items, Unset): + externally_linked_work_items = ( + self.externally_linked_work_items.to_dict() + ) + + linked_oslc_resources: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.linked_oslc_resources, Unset): + linked_oslc_resources = self.linked_oslc_resources.to_dict() + + linked_revisions: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.linked_revisions, Unset): + linked_revisions = self.linked_revisions.to_dict() + linked_work_items: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.linked_work_items, Unset): linked_work_items = self.linked_work_items.to_dict() @@ -132,23 +213,47 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.project, Unset): project = self.project.to_dict() + test_steps: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.test_steps, Unset): + test_steps = self.test_steps.to_dict() + + votes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.votes, Unset): + votes = self.votes.to_dict() + watches: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.watches, Unset): watches = self.watches.to_dict() + work_records: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.work_records, Unset): + work_records = self.work_records.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) + if approvals is not UNSET: + field_dict["approvals"] = approvals if assignee is not UNSET: field_dict["assignee"] = assignee if attachments is not UNSET: field_dict["attachments"] = attachments if author is not UNSET: field_dict["author"] = author + if backlinked_work_items is not UNSET: + field_dict["backlinkedWorkItems"] = backlinked_work_items if categories is not UNSET: field_dict["categories"] = categories if comments is not UNSET: field_dict["comments"] = comments + if externally_linked_work_items is not UNSET: + field_dict[ + "externallyLinkedWorkItems" + ] = externally_linked_work_items + if linked_oslc_resources is not UNSET: + field_dict["linkedOslcResources"] = linked_oslc_resources + if linked_revisions is not UNSET: + field_dict["linkedRevisions"] = linked_revisions if linked_work_items is not UNSET: field_dict["linkedWorkItems"] = linked_work_items if module is not UNSET: @@ -157,13 +262,22 @@ def to_dict(self) -> Dict[str, Any]: field_dict["plannedIn"] = planned_in if project is not UNSET: field_dict["project"] = project + if test_steps is not UNSET: + field_dict["testSteps"] = test_steps + if votes is not UNSET: + field_dict["votes"] = votes if watches is not UNSET: field_dict["watches"] = watches + if work_records is not UNSET: + field_dict["workRecords"] = work_records return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_get_response_data_item_relationships_approvals import ( + WorkitemsListGetResponseDataItemRelationshipsApprovals, + ) from ..models.workitems_list_get_response_data_item_relationships_assignee import ( WorkitemsListGetResponseDataItemRelationshipsAssignee, ) @@ -173,12 +287,24 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.workitems_list_get_response_data_item_relationships_author import ( WorkitemsListGetResponseDataItemRelationshipsAuthor, ) + from ..models.workitems_list_get_response_data_item_relationships_backlinked_work_items import ( + WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItems, + ) from ..models.workitems_list_get_response_data_item_relationships_categories import ( WorkitemsListGetResponseDataItemRelationshipsCategories, ) from ..models.workitems_list_get_response_data_item_relationships_comments import ( WorkitemsListGetResponseDataItemRelationshipsComments, ) + from ..models.workitems_list_get_response_data_item_relationships_externally_linked_work_items import ( + WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItems, + ) + from ..models.workitems_list_get_response_data_item_relationships_linked_oslc_resources import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResources, + ) + from ..models.workitems_list_get_response_data_item_relationships_linked_revisions import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedRevisions, + ) from ..models.workitems_list_get_response_data_item_relationships_linked_work_items import ( WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItems, ) @@ -191,11 +317,31 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.workitems_list_get_response_data_item_relationships_project import ( WorkitemsListGetResponseDataItemRelationshipsProject, ) + from ..models.workitems_list_get_response_data_item_relationships_test_steps import ( + WorkitemsListGetResponseDataItemRelationshipsTestSteps, + ) + from ..models.workitems_list_get_response_data_item_relationships_votes import ( + WorkitemsListGetResponseDataItemRelationshipsVotes, + ) from ..models.workitems_list_get_response_data_item_relationships_watches import ( WorkitemsListGetResponseDataItemRelationshipsWatches, ) + from ..models.workitems_list_get_response_data_item_relationships_work_records import ( + WorkitemsListGetResponseDataItemRelationshipsWorkRecords, + ) d = src_dict.copy() + _approvals = d.pop("approvals", UNSET) + approvals: Union[ + Unset, WorkitemsListGetResponseDataItemRelationshipsApprovals + ] + if isinstance(_approvals, Unset): + approvals = UNSET + else: + approvals = WorkitemsListGetResponseDataItemRelationshipsApprovals.from_dict( + _approvals + ) + _assignee = d.pop("assignee", UNSET) assignee: Union[ Unset, WorkitemsListGetResponseDataItemRelationshipsAssignee @@ -231,6 +377,18 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: ) ) + _backlinked_work_items = d.pop("backlinkedWorkItems", UNSET) + backlinked_work_items: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItems, + ] + if isinstance(_backlinked_work_items, Unset): + backlinked_work_items = UNSET + else: + backlinked_work_items = WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItems.from_dict( + _backlinked_work_items + ) + _categories = d.pop("categories", UNSET) categories: Union[ Unset, WorkitemsListGetResponseDataItemRelationshipsCategories @@ -253,6 +411,43 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: _comments ) + _externally_linked_work_items = d.pop( + "externallyLinkedWorkItems", UNSET + ) + externally_linked_work_items: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItems, + ] + if isinstance(_externally_linked_work_items, Unset): + externally_linked_work_items = UNSET + else: + externally_linked_work_items = WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItems.from_dict( + _externally_linked_work_items + ) + + _linked_oslc_resources = d.pop("linkedOslcResources", UNSET) + linked_oslc_resources: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResources, + ] + if isinstance(_linked_oslc_resources, Unset): + linked_oslc_resources = UNSET + else: + linked_oslc_resources = WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResources.from_dict( + _linked_oslc_resources + ) + + _linked_revisions = d.pop("linkedRevisions", UNSET) + linked_revisions: Union[ + Unset, WorkitemsListGetResponseDataItemRelationshipsLinkedRevisions + ] + if isinstance(_linked_revisions, Unset): + linked_revisions = UNSET + else: + linked_revisions = WorkitemsListGetResponseDataItemRelationshipsLinkedRevisions.from_dict( + _linked_revisions + ) + _linked_work_items = d.pop("linkedWorkItems", UNSET) linked_work_items: Union[ Unset, WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItems @@ -301,6 +496,28 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: ) ) + _test_steps = d.pop("testSteps", UNSET) + test_steps: Union[ + Unset, WorkitemsListGetResponseDataItemRelationshipsTestSteps + ] + if isinstance(_test_steps, Unset): + test_steps = UNSET + else: + test_steps = WorkitemsListGetResponseDataItemRelationshipsTestSteps.from_dict( + _test_steps + ) + + _votes = d.pop("votes", UNSET) + votes: Union[Unset, WorkitemsListGetResponseDataItemRelationshipsVotes] + if isinstance(_votes, Unset): + votes = UNSET + else: + votes = ( + WorkitemsListGetResponseDataItemRelationshipsVotes.from_dict( + _votes + ) + ) + _watches = d.pop("watches", UNSET) watches: Union[ Unset, WorkitemsListGetResponseDataItemRelationshipsWatches @@ -314,17 +531,36 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: ) ) + _work_records = d.pop("workRecords", UNSET) + work_records: Union[ + Unset, WorkitemsListGetResponseDataItemRelationshipsWorkRecords + ] + if isinstance(_work_records, Unset): + work_records = UNSET + else: + work_records = WorkitemsListGetResponseDataItemRelationshipsWorkRecords.from_dict( + _work_records + ) + workitems_list_get_response_data_item_relationships_obj = cls( + approvals=approvals, assignee=assignee, attachments=attachments, author=author, + backlinked_work_items=backlinked_work_items, categories=categories, comments=comments, + externally_linked_work_items=externally_linked_work_items, + linked_oslc_resources=linked_oslc_resources, + linked_revisions=linked_revisions, linked_work_items=linked_work_items, module=module, planned_in=planned_in, project=project, + test_steps=test_steps, + votes=votes, watches=watches, + work_records=work_records, ) workitems_list_get_response_data_item_relationships_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_approvals.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_approvals.py new file mode 100644 index 00000000..92b93989 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_approvals.py @@ -0,0 +1,124 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_list_get_response_data_item_relationships_approvals_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsApprovalsDataItem, + ) + from ..models.workitems_list_get_response_data_item_relationships_approvals_meta import ( + WorkitemsListGetResponseDataItemRelationshipsApprovalsMeta, + ) + + +T = TypeVar( + "T", bound="WorkitemsListGetResponseDataItemRelationshipsApprovals" +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsApprovals: + """ + Attributes: + data (Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsApprovalsDataItem']]): + meta (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsApprovalsMeta]): + """ + + data: Union[ + Unset, + List["WorkitemsListGetResponseDataItemRelationshipsApprovalsDataItem"], + ] = UNSET + meta: Union[ + Unset, "WorkitemsListGetResponseDataItemRelationshipsApprovalsMeta" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_get_response_data_item_relationships_approvals_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsApprovalsDataItem, + ) + from ..models.workitems_list_get_response_data_item_relationships_approvals_meta import ( + WorkitemsListGetResponseDataItemRelationshipsApprovalsMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsListGetResponseDataItemRelationshipsApprovalsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, WorkitemsListGetResponseDataItemRelationshipsApprovalsMeta + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkitemsListGetResponseDataItemRelationshipsApprovalsMeta.from_dict( + _meta + ) + + workitems_list_get_response_data_item_relationships_approvals_obj = ( + cls( + data=data, + meta=meta, + ) + ) + + workitems_list_get_response_data_item_relationships_approvals_obj.additional_properties = ( + d + ) + return ( + workitems_list_get_response_data_item_relationships_approvals_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_approvals_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_approvals_data_item.py new file mode 100644 index 00000000..be5dfff3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_approvals_data_item.py @@ -0,0 +1,103 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_list_get_response_data_item_relationships_approvals_data_item_type import ( + WorkitemsListGetResponseDataItemRelationshipsApprovalsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsListGetResponseDataItemRelationshipsApprovalsDataItem" +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsApprovalsDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsApprovalsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyWorkRecordId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsApprovalsDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsApprovalsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsListGetResponseDataItemRelationshipsApprovalsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workitems_list_get_response_data_item_relationships_approvals_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workitems_list_get_response_data_item_relationships_approvals_data_item_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_approvals_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_approvals_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_approvals_data_item_type.py new file mode 100644 index 00000000..65c28431 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_approvals_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsListGetResponseDataItemRelationshipsApprovalsDataItemType( + str, Enum +): + WORKRECORDS = "workrecords" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_approvals_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_approvals_meta.py new file mode 100644 index 00000000..b0e54506 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_approvals_meta.py @@ -0,0 +1,67 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsListGetResponseDataItemRelationshipsApprovalsMeta" +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsApprovalsMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workitems_list_get_response_data_item_relationships_approvals_meta_obj = cls( + total_count=total_count, + ) + + workitems_list_get_response_data_item_relationships_approvals_meta_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_approvals_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_assignee.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_assignee.py index eae8face..1cc9bc06 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_assignee.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_assignee.py @@ -23,10 +23,9 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsAssignee: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsAssigneeDataItem']] - meta : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAssigneeMeta] + Attributes: + data (Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsAssigneeDataItem']]): + meta (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAssigneeMeta]): """ data: Union[ @@ -46,7 +45,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_assignee_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_assignee_data_item.py index 449167b1..50406b14 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_assignee_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_assignee_data_item.py @@ -19,11 +19,10 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsAssigneeDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAssigneeDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAssigneeDataItemType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -42,6 +41,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_assignee_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_assignee_meta.py index 6981921f..8dfdae26 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_assignee_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_assignee_meta.py @@ -16,9 +16,8 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsAssigneeMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_attachments.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_attachments.py index 14a8c2dc..546ca514 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_attachments.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_attachments.py @@ -28,11 +28,10 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsAttachments: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsAttachmentsDataItem']] - meta : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAttachmentsMeta] - links : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAttachmentsLinks] + Attributes: + data (Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsAttachmentsDataItem']]): + meta (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAttachmentsMeta]): + links (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAttachmentsLinks]): """ data: Union[ @@ -57,7 +56,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_attachments_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_attachments_data_item.py index 62cda8bc..0cf83e67 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_attachments_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_attachments_data_item.py @@ -20,11 +20,10 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsAttachmentsDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAttachmentsDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAttachmentsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyAttachmentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_attachments_links.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_attachments_links.py index d579ff27..ddc4c8c9 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_attachments_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_attachments_links.py @@ -16,9 +16,9 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsAttachmentsLinks: """ - Attributes - ---------- - related : Union[Unset, str] + Attributes: + related (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/attachments?revision=1234. """ related: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_attachments_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_attachments_meta.py index 9cacc9a6..8c475d27 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_attachments_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_attachments_meta.py @@ -16,9 +16,8 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsAttachmentsMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_author.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_author.py index 7295e310..2e30b2ce 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_author.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_author.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsAuthor: """ - Attributes - ---------- - data : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAuthorData] + Attributes: + data (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAuthorData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_author_data.py index d8145b5d..6595c05c 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_author_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_author_data.py @@ -19,11 +19,10 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsAuthorData: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAuthorDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_backlinked_work_items.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_backlinked_work_items.py new file mode 100644 index 00000000..bcf80daf --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_backlinked_work_items.py @@ -0,0 +1,125 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_list_get_response_data_item_relationships_backlinked_work_items_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsDataItem, + ) + from ..models.workitems_list_get_response_data_item_relationships_backlinked_work_items_meta import ( + WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsMeta, + ) + + +T = TypeVar( + "T", + bound="WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItems", +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItems: + """ + Attributes: + data (Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsDataItem']]): + meta (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsMeta]): + """ + + data: Union[ + Unset, + List[ + "WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsDataItem" + ], + ] = UNSET + meta: Union[ + Unset, + "WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsMeta", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_get_response_data_item_relationships_backlinked_work_items_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsDataItem, + ) + from ..models.workitems_list_get_response_data_item_relationships_backlinked_work_items_meta import ( + WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsMeta, + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsMeta.from_dict( + _meta + ) + + workitems_list_get_response_data_item_relationships_backlinked_work_items_obj = cls( + data=data, + meta=meta, + ) + + workitems_list_get_response_data_item_relationships_backlinked_work_items_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_backlinked_work_items_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_backlinked_work_items_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_backlinked_work_items_data_item.py new file mode 100644 index 00000000..08b24ea1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_backlinked_work_items_data_item.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_list_get_response_data_item_relationships_backlinked_work_items_data_item_type import ( + WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsDataItem", +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/parent/MyProjectId/MyLinkedWorkItemId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workitems_list_get_response_data_item_relationships_backlinked_work_items_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workitems_list_get_response_data_item_relationships_backlinked_work_items_data_item_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_backlinked_work_items_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_backlinked_work_items_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_backlinked_work_items_data_item_type.py new file mode 100644 index 00000000..6aed96d3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_backlinked_work_items_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsDataItemType( + str, Enum +): + LINKEDWORKITEMS = "linkedworkitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_backlinked_work_items_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_backlinked_work_items_meta.py new file mode 100644 index 00000000..bf49ad4f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_backlinked_work_items_meta.py @@ -0,0 +1,68 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsMeta", +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsBacklinkedWorkItemsMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workitems_list_get_response_data_item_relationships_backlinked_work_items_meta_obj = cls( + total_count=total_count, + ) + + workitems_list_get_response_data_item_relationships_backlinked_work_items_meta_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_backlinked_work_items_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_categories.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_categories.py index 28a64658..6a1bc36d 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_categories.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_categories.py @@ -25,10 +25,9 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsCategories: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsCategoriesDataItem']] - meta : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsCategoriesMeta] + Attributes: + data (Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsCategoriesDataItem']]): + meta (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsCategoriesMeta]): """ data: Union[ @@ -50,7 +49,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_categories_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_categories_data_item.py index 92c891de..bc98c7fd 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_categories_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_categories_data_item.py @@ -20,11 +20,10 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsCategoriesDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsCategoriesDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsCategoriesDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyCategoryId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_categories_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_categories_meta.py index 82fe50cc..e13c29d8 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_categories_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_categories_meta.py @@ -16,9 +16,8 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsCategoriesMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_comments.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_comments.py index c1773f72..999116ee 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_comments.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_comments.py @@ -26,11 +26,10 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsComments: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsCommentsDataItem']] - meta : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsCommentsMeta] - links : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsCommentsLinks] + Attributes: + data (Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsCommentsDataItem']]): + meta (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsCommentsMeta]): + links (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsCommentsLinks]): """ data: Union[ @@ -53,7 +52,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_comments_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_comments_data_item.py index 76b2163c..d768cfd8 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_comments_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_comments_data_item.py @@ -19,11 +19,10 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsCommentsDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsCommentsDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsCommentsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -42,6 +41,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_comments_links.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_comments_links.py index 96fb37b6..b95372ee 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_comments_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_comments_links.py @@ -16,9 +16,9 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsCommentsLinks: """ - Attributes - ---------- - related : Union[Unset, str] + Attributes: + related (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/comments?revision=1234. """ related: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_comments_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_comments_meta.py index c6bdef1f..1da80f96 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_comments_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_comments_meta.py @@ -16,9 +16,8 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsCommentsMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_externally_linked_work_items.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_externally_linked_work_items.py new file mode 100644 index 00000000..95ec27a8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_externally_linked_work_items.py @@ -0,0 +1,125 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_list_get_response_data_item_relationships_externally_linked_work_items_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsDataItem, + ) + from ..models.workitems_list_get_response_data_item_relationships_externally_linked_work_items_meta import ( + WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsMeta, + ) + + +T = TypeVar( + "T", + bound="WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItems", +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItems: + """ + Attributes: + data (Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsDataItem']]): + meta (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsMeta]): + """ + + data: Union[ + Unset, + List[ + "WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsDataItem" + ], + ] = UNSET + meta: Union[ + Unset, + "WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsMeta", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_get_response_data_item_relationships_externally_linked_work_items_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsDataItem, + ) + from ..models.workitems_list_get_response_data_item_relationships_externally_linked_work_items_meta import ( + WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsMeta, + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsMeta.from_dict( + _meta + ) + + workitems_list_get_response_data_item_relationships_externally_linked_work_items_obj = cls( + data=data, + meta=meta, + ) + + workitems_list_get_response_data_item_relationships_externally_linked_work_items_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_externally_linked_work_items_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_externally_linked_work_items_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_externally_linked_work_items_data_item.py new file mode 100644 index 00000000..7766fede --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_externally_linked_work_items_data_item.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_list_get_response_data_item_relationships_externally_linked_work_items_data_item_type import ( + WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsDataItem", +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/parent/hostname/MyProjectId/MyLinkedWorkItemId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workitems_list_get_response_data_item_relationships_externally_linked_work_items_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workitems_list_get_response_data_item_relationships_externally_linked_work_items_data_item_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_externally_linked_work_items_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_externally_linked_work_items_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_externally_linked_work_items_data_item_type.py new file mode 100644 index 00000000..3af1089e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_externally_linked_work_items_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsDataItemType( + str, Enum +): + EXTERNALLYLINKEDWORKITEMS = "externallylinkedworkitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_externally_linked_work_items_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_externally_linked_work_items_meta.py new file mode 100644 index 00000000..77d878bf --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_externally_linked_work_items_meta.py @@ -0,0 +1,68 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsMeta", +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsExternallyLinkedWorkItemsMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workitems_list_get_response_data_item_relationships_externally_linked_work_items_meta_obj = cls( + total_count=total_count, + ) + + workitems_list_get_response_data_item_relationships_externally_linked_work_items_meta_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_externally_linked_work_items_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_oslc_resources.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_oslc_resources.py new file mode 100644 index 00000000..efe97e7d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_oslc_resources.py @@ -0,0 +1,125 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_list_get_response_data_item_relationships_linked_oslc_resources_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesDataItem, + ) + from ..models.workitems_list_get_response_data_item_relationships_linked_oslc_resources_meta import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesMeta, + ) + + +T = TypeVar( + "T", + bound="WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResources", +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResources: + """ + Attributes: + data (Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesDataItem']]): + meta (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesMeta]): + """ + + data: Union[ + Unset, + List[ + "WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesDataItem" + ], + ] = UNSET + meta: Union[ + Unset, + "WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesMeta", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_get_response_data_item_relationships_linked_oslc_resources_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesDataItem, + ) + from ..models.workitems_list_get_response_data_item_relationships_linked_oslc_resources_meta import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesMeta, + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesMeta.from_dict( + _meta + ) + + workitems_list_get_response_data_item_relationships_linked_oslc_resources_obj = cls( + data=data, + meta=meta, + ) + + workitems_list_get_response_data_item_relationships_linked_oslc_resources_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_linked_oslc_resources_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_oslc_resources_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_oslc_resources_data_item.py new file mode 100644 index 00000000..36411b0f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_oslc_resources_data_item.py @@ -0,0 +1,106 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_list_get_response_data_item_relationships_linked_oslc_resources_data_item_type import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesDataItem", +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/http://server-host- + name/ns/cm#relatedChangeRequest/http://server-host-name/application- + path/oslc/services/projects/MyProjectId/workitems/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workitems_list_get_response_data_item_relationships_linked_oslc_resources_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workitems_list_get_response_data_item_relationships_linked_oslc_resources_data_item_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_linked_oslc_resources_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_oslc_resources_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_oslc_resources_data_item_type.py new file mode 100644 index 00000000..03eba382 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_oslc_resources_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesDataItemType( + str, Enum +): + LINKEDOSLCRESOURCES = "linkedoslcresources" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_oslc_resources_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_oslc_resources_meta.py new file mode 100644 index 00000000..4d8fa56f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_oslc_resources_meta.py @@ -0,0 +1,68 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesMeta", +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsLinkedOslcResourcesMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workitems_list_get_response_data_item_relationships_linked_oslc_resources_meta_obj = cls( + total_count=total_count, + ) + + workitems_list_get_response_data_item_relationships_linked_oslc_resources_meta_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_linked_oslc_resources_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_revisions.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_revisions.py new file mode 100644 index 00000000..86fa4933 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_revisions.py @@ -0,0 +1,124 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_list_get_response_data_item_relationships_linked_revisions_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsDataItem, + ) + from ..models.workitems_list_get_response_data_item_relationships_linked_revisions_meta import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsMeta, + ) + + +T = TypeVar( + "T", bound="WorkitemsListGetResponseDataItemRelationshipsLinkedRevisions" +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsLinkedRevisions: + """ + Attributes: + data (Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsDataItem']]): + meta (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsMeta]): + """ + + data: Union[ + Unset, + List[ + "WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsDataItem" + ], + ] = UNSET + meta: Union[ + Unset, + "WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsMeta", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_get_response_data_item_relationships_linked_revisions_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsDataItem, + ) + from ..models.workitems_list_get_response_data_item_relationships_linked_revisions_meta import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsMeta, + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsMeta.from_dict( + _meta + ) + + workitems_list_get_response_data_item_relationships_linked_revisions_obj = cls( + data=data, + meta=meta, + ) + + workitems_list_get_response_data_item_relationships_linked_revisions_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_linked_revisions_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_revisions_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_revisions_data_item.py new file mode 100644 index 00000000..99916b26 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_revisions_data_item.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_list_get_response_data_item_relationships_linked_revisions_data_item_type import ( + WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsDataItem", +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsDataItemType]): + id (Union[Unset, str]): Example: default/1234. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workitems_list_get_response_data_item_relationships_linked_revisions_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workitems_list_get_response_data_item_relationships_linked_revisions_data_item_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_linked_revisions_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_revisions_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_revisions_data_item_type.py new file mode 100644 index 00000000..22b08281 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_revisions_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsDataItemType( + str, Enum +): + REVISIONS = "revisions" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_revisions_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_revisions_meta.py new file mode 100644 index 00000000..9a560ca4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_revisions_meta.py @@ -0,0 +1,68 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsMeta", +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsLinkedRevisionsMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workitems_list_get_response_data_item_relationships_linked_revisions_meta_obj = cls( + total_count=total_count, + ) + + workitems_list_get_response_data_item_relationships_linked_revisions_meta_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_linked_revisions_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_work_items.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_work_items.py index 8a927b50..d65f05dd 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_work_items.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_work_items.py @@ -28,11 +28,10 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItems: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItemsDataItem']] - meta : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItemsMeta] - links : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItemsLinks] + Attributes: + data (Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItemsDataItem']]): + meta (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItemsMeta]): + links (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItemsLinks]): """ data: Union[ @@ -59,7 +58,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_work_items_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_work_items_data_item.py index c507f942..b4a5b7e0 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_work_items_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_work_items_data_item.py @@ -20,11 +20,10 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItemsDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItemsDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItemsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/parent/MyProjectId/MyLinkedWorkItemId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_work_items_links.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_work_items_links.py index 9fdcb6eb..9e1a2318 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_work_items_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_work_items_links.py @@ -17,9 +17,9 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItemsLinks: """ - Attributes - ---------- - related : Union[Unset, str] + Attributes: + related (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/linkedworkitems?revision=1234. """ related: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_work_items_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_work_items_meta.py index c702c6d0..7317f1b8 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_work_items_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_linked_work_items_meta.py @@ -17,9 +17,8 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsLinkedWorkItemsMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_module.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_module.py index 3102f29d..c8b9c38c 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_module.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_module.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsModule: """ - Attributes - ---------- - data : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsModuleData] + Attributes: + data (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsModuleData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_module_data.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_module_data.py index 9623fd00..a211d379 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_module_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_module_data.py @@ -19,11 +19,10 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsModuleData: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsModuleDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsModuleDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_planned_in.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_planned_in.py index 29f23bb3..77f3a17f 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_planned_in.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_planned_in.py @@ -25,10 +25,9 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsPlannedIn: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsPlannedInDataItem']] - meta : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsPlannedInMeta] + Attributes: + data (Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsPlannedInDataItem']]): + meta (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsPlannedInMeta]): """ data: Union[ @@ -48,7 +47,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_planned_in_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_planned_in_data_item.py index 0e87bc4c..55f12b6d 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_planned_in_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_planned_in_data_item.py @@ -19,11 +19,10 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsPlannedInDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsPlannedInDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsPlannedInDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyPlanId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -42,6 +41,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_planned_in_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_planned_in_meta.py index e738d55a..1cb2c60a 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_planned_in_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_planned_in_meta.py @@ -16,9 +16,8 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsPlannedInMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_project.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_project.py index b92e7836..f5ed7be3 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_project.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_project.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsProject: """ - Attributes - ---------- - data : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsProjectData] + Attributes: + data (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsProjectData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_project_data.py index 93355d5e..64db8239 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_project_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_project_data.py @@ -19,11 +19,10 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsProjectData: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsProjectDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_test_steps.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_test_steps.py new file mode 100644 index 00000000..dfc64db1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_test_steps.py @@ -0,0 +1,124 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_list_get_response_data_item_relationships_test_steps_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsTestStepsDataItem, + ) + from ..models.workitems_list_get_response_data_item_relationships_test_steps_meta import ( + WorkitemsListGetResponseDataItemRelationshipsTestStepsMeta, + ) + + +T = TypeVar( + "T", bound="WorkitemsListGetResponseDataItemRelationshipsTestSteps" +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsTestSteps: + """ + Attributes: + data (Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsTestStepsDataItem']]): + meta (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsTestStepsMeta]): + """ + + data: Union[ + Unset, + List["WorkitemsListGetResponseDataItemRelationshipsTestStepsDataItem"], + ] = UNSET + meta: Union[ + Unset, "WorkitemsListGetResponseDataItemRelationshipsTestStepsMeta" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_get_response_data_item_relationships_test_steps_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsTestStepsDataItem, + ) + from ..models.workitems_list_get_response_data_item_relationships_test_steps_meta import ( + WorkitemsListGetResponseDataItemRelationshipsTestStepsMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsListGetResponseDataItemRelationshipsTestStepsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, WorkitemsListGetResponseDataItemRelationshipsTestStepsMeta + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkitemsListGetResponseDataItemRelationshipsTestStepsMeta.from_dict( + _meta + ) + + workitems_list_get_response_data_item_relationships_test_steps_obj = ( + cls( + data=data, + meta=meta, + ) + ) + + workitems_list_get_response_data_item_relationships_test_steps_obj.additional_properties = ( + d + ) + return ( + workitems_list_get_response_data_item_relationships_test_steps_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_test_steps_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_test_steps_data_item.py new file mode 100644 index 00000000..a5a7e096 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_test_steps_data_item.py @@ -0,0 +1,103 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_list_get_response_data_item_relationships_test_steps_data_item_type import ( + WorkitemsListGetResponseDataItemRelationshipsTestStepsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsListGetResponseDataItemRelationshipsTestStepsDataItem" +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsTestStepsDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsTestStepsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyTestStepIndex. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsTestStepsDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsTestStepsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsListGetResponseDataItemRelationshipsTestStepsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workitems_list_get_response_data_item_relationships_test_steps_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workitems_list_get_response_data_item_relationships_test_steps_data_item_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_test_steps_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_test_steps_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_test_steps_data_item_type.py new file mode 100644 index 00000000..84fa9e21 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_test_steps_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsListGetResponseDataItemRelationshipsTestStepsDataItemType( + str, Enum +): + TESTSTEPS = "teststeps" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_test_steps_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_test_steps_meta.py new file mode 100644 index 00000000..9128565e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_test_steps_meta.py @@ -0,0 +1,67 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsListGetResponseDataItemRelationshipsTestStepsMeta" +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsTestStepsMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workitems_list_get_response_data_item_relationships_test_steps_meta_obj = cls( + total_count=total_count, + ) + + workitems_list_get_response_data_item_relationships_test_steps_meta_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_test_steps_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_votes.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_votes.py new file mode 100644 index 00000000..9be58a97 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_votes.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_list_get_response_data_item_relationships_votes_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsVotesDataItem, + ) + from ..models.workitems_list_get_response_data_item_relationships_votes_meta import ( + WorkitemsListGetResponseDataItemRelationshipsVotesMeta, + ) + + +T = TypeVar("T", bound="WorkitemsListGetResponseDataItemRelationshipsVotes") + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsVotes: + """ + Attributes: + data (Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsVotesDataItem']]): + meta (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsVotesMeta]): + """ + + data: Union[ + Unset, + List["WorkitemsListGetResponseDataItemRelationshipsVotesDataItem"], + ] = UNSET + meta: Union[ + Unset, "WorkitemsListGetResponseDataItemRelationshipsVotesMeta" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_get_response_data_item_relationships_votes_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsVotesDataItem, + ) + from ..models.workitems_list_get_response_data_item_relationships_votes_meta import ( + WorkitemsListGetResponseDataItemRelationshipsVotesMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsListGetResponseDataItemRelationshipsVotesDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, WorkitemsListGetResponseDataItemRelationshipsVotesMeta + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkitemsListGetResponseDataItemRelationshipsVotesMeta.from_dict( + _meta + ) + + workitems_list_get_response_data_item_relationships_votes_obj = cls( + data=data, + meta=meta, + ) + + workitems_list_get_response_data_item_relationships_votes_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_votes_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_votes_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_votes_data_item.py new file mode 100644 index 00000000..df9eee88 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_votes_data_item.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_list_get_response_data_item_relationships_votes_data_item_type import ( + WorkitemsListGetResponseDataItemRelationshipsVotesDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsListGetResponseDataItemRelationshipsVotesDataItem" +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsVotesDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsVotesDataItemType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, WorkitemsListGetResponseDataItemRelationshipsVotesDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsVotesDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + WorkitemsListGetResponseDataItemRelationshipsVotesDataItemType( + _type + ) + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workitems_list_get_response_data_item_relationships_votes_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workitems_list_get_response_data_item_relationships_votes_data_item_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_votes_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_votes_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_votes_data_item_type.py new file mode 100644 index 00000000..f46fc53d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_votes_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsListGetResponseDataItemRelationshipsVotesDataItemType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_votes_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_votes_meta.py new file mode 100644 index 00000000..3c7444f0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_votes_meta.py @@ -0,0 +1,71 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsListGetResponseDataItemRelationshipsVotesMeta" +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsVotesMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workitems_list_get_response_data_item_relationships_votes_meta_obj = ( + cls( + total_count=total_count, + ) + ) + + workitems_list_get_response_data_item_relationships_votes_meta_obj.additional_properties = ( + d + ) + return ( + workitems_list_get_response_data_item_relationships_votes_meta_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_watches.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_watches.py index e159ff4f..1b0f25e9 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_watches.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_watches.py @@ -23,10 +23,9 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsWatches: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsWatchesDataItem']] - meta : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsWatchesMeta] + Attributes: + data (Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsWatchesDataItem']]): + meta (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsWatchesMeta]): """ data: Union[ @@ -46,7 +45,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_watches_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_watches_data_item.py index b8edb58e..d3fe7151 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_watches_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_watches_data_item.py @@ -19,11 +19,10 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsWatchesDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListGetResponseDataItemRelationshipsWatchesDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsWatchesDataItemType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_watches_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_watches_meta.py index 09fc1323..26e5f970 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_watches_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_watches_meta.py @@ -16,9 +16,8 @@ @_attrs_define class WorkitemsListGetResponseDataItemRelationshipsWatchesMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_work_records.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_work_records.py new file mode 100644 index 00000000..3afcee40 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_work_records.py @@ -0,0 +1,122 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_list_get_response_data_item_relationships_work_records_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsWorkRecordsDataItem, + ) + from ..models.workitems_list_get_response_data_item_relationships_work_records_meta import ( + WorkitemsListGetResponseDataItemRelationshipsWorkRecordsMeta, + ) + + +T = TypeVar( + "T", bound="WorkitemsListGetResponseDataItemRelationshipsWorkRecords" +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsWorkRecords: + """ + Attributes: + data (Union[Unset, List['WorkitemsListGetResponseDataItemRelationshipsWorkRecordsDataItem']]): + meta (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsWorkRecordsMeta]): + """ + + data: Union[ + Unset, + List[ + "WorkitemsListGetResponseDataItemRelationshipsWorkRecordsDataItem" + ], + ] = UNSET + meta: Union[ + Unset, "WorkitemsListGetResponseDataItemRelationshipsWorkRecordsMeta" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_get_response_data_item_relationships_work_records_data_item import ( + WorkitemsListGetResponseDataItemRelationshipsWorkRecordsDataItem, + ) + from ..models.workitems_list_get_response_data_item_relationships_work_records_meta import ( + WorkitemsListGetResponseDataItemRelationshipsWorkRecordsMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsListGetResponseDataItemRelationshipsWorkRecordsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, WorkitemsListGetResponseDataItemRelationshipsWorkRecordsMeta + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkitemsListGetResponseDataItemRelationshipsWorkRecordsMeta.from_dict( + _meta + ) + + workitems_list_get_response_data_item_relationships_work_records_obj = cls( + data=data, + meta=meta, + ) + + workitems_list_get_response_data_item_relationships_work_records_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_work_records_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_work_records_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_work_records_data_item.py new file mode 100644 index 00000000..aeacf1e7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_work_records_data_item.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_list_get_response_data_item_relationships_work_records_data_item_type import ( + WorkitemsListGetResponseDataItemRelationshipsWorkRecordsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsListGetResponseDataItemRelationshipsWorkRecordsDataItem", +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsWorkRecordsDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsListGetResponseDataItemRelationshipsWorkRecordsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyWorkRecordId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsWorkRecordsDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsListGetResponseDataItemRelationshipsWorkRecordsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsListGetResponseDataItemRelationshipsWorkRecordsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workitems_list_get_response_data_item_relationships_work_records_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workitems_list_get_response_data_item_relationships_work_records_data_item_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_work_records_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_work_records_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_work_records_data_item_type.py new file mode 100644 index 00000000..0827b924 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_work_records_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsListGetResponseDataItemRelationshipsWorkRecordsDataItemType( + str, Enum +): + WORKRECORDS = "workrecords" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_work_records_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_work_records_meta.py new file mode 100644 index 00000000..a40ea2e8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_data_item_relationships_work_records_meta.py @@ -0,0 +1,67 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsListGetResponseDataItemRelationshipsWorkRecordsMeta" +) + + +@_attrs_define +class WorkitemsListGetResponseDataItemRelationshipsWorkRecordsMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workitems_list_get_response_data_item_relationships_work_records_meta_obj = cls( + total_count=total_count, + ) + + workitems_list_get_response_data_item_relationships_work_records_meta_obj.additional_properties = ( + d + ) + return workitems_list_get_response_data_item_relationships_work_records_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_links.py index 4b414cfc..857a7469 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_links.py @@ -14,14 +14,19 @@ @_attrs_define class WorkitemsListGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - first : Union[Unset, str] - prev : Union[Unset, str] - next_ : Union[Unset, str] - last : Union[Unset, str] - portal : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems?page%5Bsize%5D=10&page%5Bnumber%5D=9. + portal (Union[Unset, str]): Example: server-host-name/application- + path/polarion/redirect/project/MyProjectId/workitems. """ self_: Union[Unset, str] = UNSET @@ -36,10 +41,15 @@ class WorkitemsListGetResponseLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + first = self.first + prev = self.prev + next_ = self.next_ + last = self.last + portal = self.portal field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_meta.py index fcc2e8f5..f12fc3c9 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_get_response_meta.py @@ -14,9 +14,8 @@ @_attrs_define class WorkitemsListGetResponseMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request.py new file mode 100644 index 00000000..80c0b83a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_list_patch_request_data_item import ( + WorkitemsListPatchRequestDataItem, + ) + + +T = TypeVar("T", bound="WorkitemsListPatchRequest") + + +@_attrs_define +class WorkitemsListPatchRequest: + """ + Attributes: + data (Union[Unset, List['WorkitemsListPatchRequestDataItem']]): + """ + + data: Union[Unset, List["WorkitemsListPatchRequestDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_patch_request_data_item import ( + WorkitemsListPatchRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsListPatchRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + workitems_list_patch_request_obj = cls( + data=data, + ) + + workitems_list_patch_request_obj.additional_properties = d + return workitems_list_patch_request_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item.py new file mode 100644 index 00000000..7de01ee4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item.py @@ -0,0 +1,142 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_list_patch_request_data_item_type import ( + WorkitemsListPatchRequestDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_list_patch_request_data_item_attributes import ( + WorkitemsListPatchRequestDataItemAttributes, + ) + from ..models.workitems_list_patch_request_data_item_relationships import ( + WorkitemsListPatchRequestDataItemRelationships, + ) + + +T = TypeVar("T", bound="WorkitemsListPatchRequestDataItem") + + +@_attrs_define +class WorkitemsListPatchRequestDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsListPatchRequestDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + attributes (Union[Unset, WorkitemsListPatchRequestDataItemAttributes]): + relationships (Union[Unset, WorkitemsListPatchRequestDataItemRelationships]): + """ + + type: Union[Unset, WorkitemsListPatchRequestDataItemType] = UNSET + id: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "WorkitemsListPatchRequestDataItemAttributes" + ] = UNSET + relationships: Union[ + Unset, "WorkitemsListPatchRequestDataItemRelationships" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_patch_request_data_item_attributes import ( + WorkitemsListPatchRequestDataItemAttributes, + ) + from ..models.workitems_list_patch_request_data_item_relationships import ( + WorkitemsListPatchRequestDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, WorkitemsListPatchRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsListPatchRequestDataItemType(_type) + + id = d.pop("id", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, WorkitemsListPatchRequestDataItemAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = WorkitemsListPatchRequestDataItemAttributes.from_dict( + _attributes + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, WorkitemsListPatchRequestDataItemRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + WorkitemsListPatchRequestDataItemRelationships.from_dict( + _relationships + ) + ) + + workitems_list_patch_request_data_item_obj = cls( + type=type, + id=id, + attributes=attributes, + relationships=relationships, + ) + + workitems_list_patch_request_data_item_obj.additional_properties = d + return workitems_list_patch_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_attributes.py new file mode 100644 index 00000000..ee3a7b3c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_attributes.py @@ -0,0 +1,224 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_list_patch_request_data_item_attributes_description import ( + WorkitemsListPatchRequestDataItemAttributesDescription, + ) + from ..models.workitems_list_patch_request_data_item_attributes_hyperlinks_item import ( + WorkitemsListPatchRequestDataItemAttributesHyperlinksItem, + ) + + +T = TypeVar("T", bound="WorkitemsListPatchRequestDataItemAttributes") + + +@_attrs_define +class WorkitemsListPatchRequestDataItemAttributes: + """ + Attributes: + description (Union[Unset, WorkitemsListPatchRequestDataItemAttributesDescription]): + due_date (Union[Unset, datetime.date]): Example: 1970-01-01. + hyperlinks (Union[Unset, List['WorkitemsListPatchRequestDataItemAttributesHyperlinksItem']]): + initial_estimate (Union[Unset, str]): Example: 5 1/2d. + priority (Union[Unset, str]): Example: 90.0. + remaining_estimate (Union[Unset, str]): Example: 5 1/2d. + resolution (Union[Unset, str]): Example: done. + resolved_on (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + severity (Union[Unset, str]): Example: blocker. + status (Union[Unset, str]): Example: open. + time_spent (Union[Unset, str]): Example: 5 1/2d. + title (Union[Unset, str]): Example: Title. + """ + + description: Union[ + Unset, "WorkitemsListPatchRequestDataItemAttributesDescription" + ] = UNSET + due_date: Union[Unset, datetime.date] = UNSET + hyperlinks: Union[ + Unset, + List["WorkitemsListPatchRequestDataItemAttributesHyperlinksItem"], + ] = UNSET + initial_estimate: Union[Unset, str] = UNSET + priority: Union[Unset, str] = UNSET + remaining_estimate: Union[Unset, str] = UNSET + resolution: Union[Unset, str] = UNSET + resolved_on: Union[Unset, datetime.datetime] = UNSET + severity: Union[Unset, str] = UNSET + status: Union[Unset, str] = UNSET + time_spent: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + description: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.description, Unset): + description = self.description.to_dict() + + due_date: Union[Unset, str] = UNSET + if not isinstance(self.due_date, Unset): + due_date = self.due_date.isoformat() + + hyperlinks: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.hyperlinks, Unset): + hyperlinks = [] + for hyperlinks_item_data in self.hyperlinks: + hyperlinks_item = hyperlinks_item_data.to_dict() + hyperlinks.append(hyperlinks_item) + + initial_estimate = self.initial_estimate + + priority = self.priority + + remaining_estimate = self.remaining_estimate + + resolution = self.resolution + + resolved_on: Union[Unset, str] = UNSET + if not isinstance(self.resolved_on, Unset): + resolved_on = self.resolved_on.isoformat() + + severity = self.severity + + status = self.status + + time_spent = self.time_spent + + title = self.title + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if description is not UNSET: + field_dict["description"] = description + if due_date is not UNSET: + field_dict["dueDate"] = due_date + if hyperlinks is not UNSET: + field_dict["hyperlinks"] = hyperlinks + if initial_estimate is not UNSET: + field_dict["initialEstimate"] = initial_estimate + if priority is not UNSET: + field_dict["priority"] = priority + if remaining_estimate is not UNSET: + field_dict["remainingEstimate"] = remaining_estimate + if resolution is not UNSET: + field_dict["resolution"] = resolution + if resolved_on is not UNSET: + field_dict["resolvedOn"] = resolved_on + if severity is not UNSET: + field_dict["severity"] = severity + if status is not UNSET: + field_dict["status"] = status + if time_spent is not UNSET: + field_dict["timeSpent"] = time_spent + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_patch_request_data_item_attributes_description import ( + WorkitemsListPatchRequestDataItemAttributesDescription, + ) + from ..models.workitems_list_patch_request_data_item_attributes_hyperlinks_item import ( + WorkitemsListPatchRequestDataItemAttributesHyperlinksItem, + ) + + d = src_dict.copy() + _description = d.pop("description", UNSET) + description: Union[ + Unset, WorkitemsListPatchRequestDataItemAttributesDescription + ] + if isinstance(_description, Unset): + description = UNSET + else: + description = WorkitemsListPatchRequestDataItemAttributesDescription.from_dict( + _description + ) + + _due_date = d.pop("dueDate", UNSET) + due_date: Union[Unset, datetime.date] + if isinstance(_due_date, Unset): + due_date = UNSET + else: + due_date = isoparse(_due_date).date() + + hyperlinks = [] + _hyperlinks = d.pop("hyperlinks", UNSET) + for hyperlinks_item_data in _hyperlinks or []: + hyperlinks_item = WorkitemsListPatchRequestDataItemAttributesHyperlinksItem.from_dict( + hyperlinks_item_data + ) + + hyperlinks.append(hyperlinks_item) + + initial_estimate = d.pop("initialEstimate", UNSET) + + priority = d.pop("priority", UNSET) + + remaining_estimate = d.pop("remainingEstimate", UNSET) + + resolution = d.pop("resolution", UNSET) + + _resolved_on = d.pop("resolvedOn", UNSET) + resolved_on: Union[Unset, datetime.datetime] + if isinstance(_resolved_on, Unset): + resolved_on = UNSET + else: + resolved_on = isoparse(_resolved_on) + + severity = d.pop("severity", UNSET) + + status = d.pop("status", UNSET) + + time_spent = d.pop("timeSpent", UNSET) + + title = d.pop("title", UNSET) + + workitems_list_patch_request_data_item_attributes_obj = cls( + description=description, + due_date=due_date, + hyperlinks=hyperlinks, + initial_estimate=initial_estimate, + priority=priority, + remaining_estimate=remaining_estimate, + resolution=resolution, + resolved_on=resolved_on, + severity=severity, + status=status, + time_spent=time_spent, + title=title, + ) + + workitems_list_patch_request_data_item_attributes_obj.additional_properties = ( + d + ) + return workitems_list_patch_request_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_attributes_description.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_attributes_description.py new file mode 100644 index 00000000..4ae76349 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_attributes_description.py @@ -0,0 +1,96 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_list_patch_request_data_item_attributes_description_type import ( + WorkitemsListPatchRequestDataItemAttributesDescriptionType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsListPatchRequestDataItemAttributesDescription" +) + + +@_attrs_define +class WorkitemsListPatchRequestDataItemAttributesDescription: + """ + Attributes: + type (Union[Unset, WorkitemsListPatchRequestDataItemAttributesDescriptionType]): + value (Union[Unset, str]): Example: My text value. + """ + + type: Union[ + Unset, WorkitemsListPatchRequestDataItemAttributesDescriptionType + ] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, WorkitemsListPatchRequestDataItemAttributesDescriptionType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsListPatchRequestDataItemAttributesDescriptionType( + _type + ) + + value = d.pop("value", UNSET) + + workitems_list_patch_request_data_item_attributes_description_obj = ( + cls( + type=type, + value=value, + ) + ) + + workitems_list_patch_request_data_item_attributes_description_obj.additional_properties = ( + d + ) + return ( + workitems_list_patch_request_data_item_attributes_description_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_attributes_description_type.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_attributes_description_type.py new file mode 100644 index 00000000..e3eef341 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_attributes_description_type.py @@ -0,0 +1,12 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsListPatchRequestDataItemAttributesDescriptionType(str, Enum): + TEXTHTML = "text/html" + TEXTPLAIN = "text/plain" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_attributes_hyperlinks_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_attributes_hyperlinks_item.py new file mode 100644 index 00000000..70f29ec1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_attributes_hyperlinks_item.py @@ -0,0 +1,76 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsListPatchRequestDataItemAttributesHyperlinksItem" +) + + +@_attrs_define +class WorkitemsListPatchRequestDataItemAttributesHyperlinksItem: + """ + Attributes: + role (Union[Unset, str]): Example: ref_ext. + uri (Union[Unset, str]): Example: https://polarion.plm.automation.siemens.com. + """ + + role: Union[Unset, str] = UNSET + uri: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + role = self.role + + uri = self.uri + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if role is not UNSET: + field_dict["role"] = role + if uri is not UNSET: + field_dict["uri"] = uri + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + role = d.pop("role", UNSET) + + uri = d.pop("uri", UNSET) + + workitems_list_patch_request_data_item_attributes_hyperlinks_item_obj = cls( + role=role, + uri=uri, + ) + + workitems_list_patch_request_data_item_attributes_hyperlinks_item_obj.additional_properties = ( + d + ) + return workitems_list_patch_request_data_item_attributes_hyperlinks_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships.py new file mode 100644 index 00000000..994ae921 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships.py @@ -0,0 +1,203 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_list_patch_request_data_item_relationships_assignee import ( + WorkitemsListPatchRequestDataItemRelationshipsAssignee, + ) + from ..models.workitems_list_patch_request_data_item_relationships_categories import ( + WorkitemsListPatchRequestDataItemRelationshipsCategories, + ) + from ..models.workitems_list_patch_request_data_item_relationships_linked_revisions import ( + WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisions, + ) + from ..models.workitems_list_patch_request_data_item_relationships_votes import ( + WorkitemsListPatchRequestDataItemRelationshipsVotes, + ) + from ..models.workitems_list_patch_request_data_item_relationships_watches import ( + WorkitemsListPatchRequestDataItemRelationshipsWatches, + ) + + +T = TypeVar("T", bound="WorkitemsListPatchRequestDataItemRelationships") + + +@_attrs_define +class WorkitemsListPatchRequestDataItemRelationships: + """ + Attributes: + assignee (Union[Unset, WorkitemsListPatchRequestDataItemRelationshipsAssignee]): + categories (Union[Unset, WorkitemsListPatchRequestDataItemRelationshipsCategories]): + linked_revisions (Union[Unset, WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisions]): + votes (Union[Unset, WorkitemsListPatchRequestDataItemRelationshipsVotes]): + watches (Union[Unset, WorkitemsListPatchRequestDataItemRelationshipsWatches]): + """ + + assignee: Union[ + Unset, "WorkitemsListPatchRequestDataItemRelationshipsAssignee" + ] = UNSET + categories: Union[ + Unset, "WorkitemsListPatchRequestDataItemRelationshipsCategories" + ] = UNSET + linked_revisions: Union[ + Unset, "WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisions" + ] = UNSET + votes: Union[ + Unset, "WorkitemsListPatchRequestDataItemRelationshipsVotes" + ] = UNSET + watches: Union[ + Unset, "WorkitemsListPatchRequestDataItemRelationshipsWatches" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + assignee: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.assignee, Unset): + assignee = self.assignee.to_dict() + + categories: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.categories, Unset): + categories = self.categories.to_dict() + + linked_revisions: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.linked_revisions, Unset): + linked_revisions = self.linked_revisions.to_dict() + + votes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.votes, Unset): + votes = self.votes.to_dict() + + watches: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.watches, Unset): + watches = self.watches.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if assignee is not UNSET: + field_dict["assignee"] = assignee + if categories is not UNSET: + field_dict["categories"] = categories + if linked_revisions is not UNSET: + field_dict["linkedRevisions"] = linked_revisions + if votes is not UNSET: + field_dict["votes"] = votes + if watches is not UNSET: + field_dict["watches"] = watches + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_patch_request_data_item_relationships_assignee import ( + WorkitemsListPatchRequestDataItemRelationshipsAssignee, + ) + from ..models.workitems_list_patch_request_data_item_relationships_categories import ( + WorkitemsListPatchRequestDataItemRelationshipsCategories, + ) + from ..models.workitems_list_patch_request_data_item_relationships_linked_revisions import ( + WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisions, + ) + from ..models.workitems_list_patch_request_data_item_relationships_votes import ( + WorkitemsListPatchRequestDataItemRelationshipsVotes, + ) + from ..models.workitems_list_patch_request_data_item_relationships_watches import ( + WorkitemsListPatchRequestDataItemRelationshipsWatches, + ) + + d = src_dict.copy() + _assignee = d.pop("assignee", UNSET) + assignee: Union[ + Unset, WorkitemsListPatchRequestDataItemRelationshipsAssignee + ] + if isinstance(_assignee, Unset): + assignee = UNSET + else: + assignee = WorkitemsListPatchRequestDataItemRelationshipsAssignee.from_dict( + _assignee + ) + + _categories = d.pop("categories", UNSET) + categories: Union[ + Unset, WorkitemsListPatchRequestDataItemRelationshipsCategories + ] + if isinstance(_categories, Unset): + categories = UNSET + else: + categories = WorkitemsListPatchRequestDataItemRelationshipsCategories.from_dict( + _categories + ) + + _linked_revisions = d.pop("linkedRevisions", UNSET) + linked_revisions: Union[ + Unset, + WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisions, + ] + if isinstance(_linked_revisions, Unset): + linked_revisions = UNSET + else: + linked_revisions = WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisions.from_dict( + _linked_revisions + ) + + _votes = d.pop("votes", UNSET) + votes: Union[ + Unset, WorkitemsListPatchRequestDataItemRelationshipsVotes + ] + if isinstance(_votes, Unset): + votes = UNSET + else: + votes = ( + WorkitemsListPatchRequestDataItemRelationshipsVotes.from_dict( + _votes + ) + ) + + _watches = d.pop("watches", UNSET) + watches: Union[ + Unset, WorkitemsListPatchRequestDataItemRelationshipsWatches + ] + if isinstance(_watches, Unset): + watches = UNSET + else: + watches = WorkitemsListPatchRequestDataItemRelationshipsWatches.from_dict( + _watches + ) + + workitems_list_patch_request_data_item_relationships_obj = cls( + assignee=assignee, + categories=categories, + linked_revisions=linked_revisions, + votes=votes, + watches=watches, + ) + + workitems_list_patch_request_data_item_relationships_obj.additional_properties = ( + d + ) + return workitems_list_patch_request_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_assignee.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_assignee.py new file mode 100644 index 00000000..9ec81730 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_assignee.py @@ -0,0 +1,96 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_list_patch_request_data_item_relationships_assignee_data_item import ( + WorkitemsListPatchRequestDataItemRelationshipsAssigneeDataItem, + ) + + +T = TypeVar( + "T", bound="WorkitemsListPatchRequestDataItemRelationshipsAssignee" +) + + +@_attrs_define +class WorkitemsListPatchRequestDataItemRelationshipsAssignee: + """ + Attributes: + data (Union[Unset, List['WorkitemsListPatchRequestDataItemRelationshipsAssigneeDataItem']]): + """ + + data: Union[ + Unset, + List["WorkitemsListPatchRequestDataItemRelationshipsAssigneeDataItem"], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_patch_request_data_item_relationships_assignee_data_item import ( + WorkitemsListPatchRequestDataItemRelationshipsAssigneeDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsListPatchRequestDataItemRelationshipsAssigneeDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + workitems_list_patch_request_data_item_relationships_assignee_obj = ( + cls( + data=data, + ) + ) + + workitems_list_patch_request_data_item_relationships_assignee_obj.additional_properties = ( + d + ) + return ( + workitems_list_patch_request_data_item_relationships_assignee_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_assignee_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_assignee_data_item.py new file mode 100644 index 00000000..4b4040f2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_assignee_data_item.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_list_patch_request_data_item_relationships_assignee_data_item_type import ( + WorkitemsListPatchRequestDataItemRelationshipsAssigneeDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsListPatchRequestDataItemRelationshipsAssigneeDataItem" +) + + +@_attrs_define +class WorkitemsListPatchRequestDataItemRelationshipsAssigneeDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsListPatchRequestDataItemRelationshipsAssigneeDataItemType]): + id (Union[Unset, str]): Example: MyUserId. + """ + + type: Union[ + Unset, + WorkitemsListPatchRequestDataItemRelationshipsAssigneeDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsListPatchRequestDataItemRelationshipsAssigneeDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsListPatchRequestDataItemRelationshipsAssigneeDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + workitems_list_patch_request_data_item_relationships_assignee_data_item_obj = cls( + type=type, + id=id, + ) + + workitems_list_patch_request_data_item_relationships_assignee_data_item_obj.additional_properties = ( + d + ) + return workitems_list_patch_request_data_item_relationships_assignee_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_assignee_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_assignee_data_item_type.py new file mode 100644 index 00000000..821c8374 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_assignee_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsListPatchRequestDataItemRelationshipsAssigneeDataItemType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_categories.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_categories.py new file mode 100644 index 00000000..df62ddb9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_categories.py @@ -0,0 +1,98 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_list_patch_request_data_item_relationships_categories_data_item import ( + WorkitemsListPatchRequestDataItemRelationshipsCategoriesDataItem, + ) + + +T = TypeVar( + "T", bound="WorkitemsListPatchRequestDataItemRelationshipsCategories" +) + + +@_attrs_define +class WorkitemsListPatchRequestDataItemRelationshipsCategories: + """ + Attributes: + data (Union[Unset, List['WorkitemsListPatchRequestDataItemRelationshipsCategoriesDataItem']]): + """ + + data: Union[ + Unset, + List[ + "WorkitemsListPatchRequestDataItemRelationshipsCategoriesDataItem" + ], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_patch_request_data_item_relationships_categories_data_item import ( + WorkitemsListPatchRequestDataItemRelationshipsCategoriesDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsListPatchRequestDataItemRelationshipsCategoriesDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + workitems_list_patch_request_data_item_relationships_categories_obj = ( + cls( + data=data, + ) + ) + + workitems_list_patch_request_data_item_relationships_categories_obj.additional_properties = ( + d + ) + return ( + workitems_list_patch_request_data_item_relationships_categories_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_categories_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_categories_data_item.py new file mode 100644 index 00000000..4a342eed --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_categories_data_item.py @@ -0,0 +1,95 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_list_patch_request_data_item_relationships_categories_data_item_type import ( + WorkitemsListPatchRequestDataItemRelationshipsCategoriesDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsListPatchRequestDataItemRelationshipsCategoriesDataItem", +) + + +@_attrs_define +class WorkitemsListPatchRequestDataItemRelationshipsCategoriesDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsListPatchRequestDataItemRelationshipsCategoriesDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyCategoryId. + """ + + type: Union[ + Unset, + WorkitemsListPatchRequestDataItemRelationshipsCategoriesDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsListPatchRequestDataItemRelationshipsCategoriesDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsListPatchRequestDataItemRelationshipsCategoriesDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + workitems_list_patch_request_data_item_relationships_categories_data_item_obj = cls( + type=type, + id=id, + ) + + workitems_list_patch_request_data_item_relationships_categories_data_item_obj.additional_properties = ( + d + ) + return workitems_list_patch_request_data_item_relationships_categories_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_categories_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_categories_data_item_type.py new file mode 100644 index 00000000..2dfa30a3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_categories_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsListPatchRequestDataItemRelationshipsCategoriesDataItemType( + str, Enum +): + CATEGORIES = "categories" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_linked_revisions.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_linked_revisions.py new file mode 100644 index 00000000..d5e67b23 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_linked_revisions.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_list_patch_request_data_item_relationships_linked_revisions_data_item import ( + WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisionsDataItem, + ) + + +T = TypeVar( + "T", bound="WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisions" +) + + +@_attrs_define +class WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisions: + """ + Attributes: + data (Union[Unset, List['WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisionsDataItem']]): + """ + + data: Union[ + Unset, + List[ + "WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisionsDataItem" + ], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_patch_request_data_item_relationships_linked_revisions_data_item import ( + WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisionsDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisionsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + workitems_list_patch_request_data_item_relationships_linked_revisions_obj = cls( + data=data, + ) + + workitems_list_patch_request_data_item_relationships_linked_revisions_obj.additional_properties = ( + d + ) + return workitems_list_patch_request_data_item_relationships_linked_revisions_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_linked_revisions_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_linked_revisions_data_item.py new file mode 100644 index 00000000..0f02ee19 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_linked_revisions_data_item.py @@ -0,0 +1,95 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_list_patch_request_data_item_relationships_linked_revisions_data_item_type import ( + WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisionsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisionsDataItem", +) + + +@_attrs_define +class WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisionsDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisionsDataItemType]): + id (Union[Unset, str]): Example: default/1234. + """ + + type: Union[ + Unset, + WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisionsDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisionsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisionsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + workitems_list_patch_request_data_item_relationships_linked_revisions_data_item_obj = cls( + type=type, + id=id, + ) + + workitems_list_patch_request_data_item_relationships_linked_revisions_data_item_obj.additional_properties = ( + d + ) + return workitems_list_patch_request_data_item_relationships_linked_revisions_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_linked_revisions_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_linked_revisions_data_item_type.py new file mode 100644 index 00000000..9c5f8e9c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_linked_revisions_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsListPatchRequestDataItemRelationshipsLinkedRevisionsDataItemType( + str, Enum +): + REVISIONS = "revisions" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_votes.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_votes.py new file mode 100644 index 00000000..f40bf452 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_votes.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_list_patch_request_data_item_relationships_votes_data_item import ( + WorkitemsListPatchRequestDataItemRelationshipsVotesDataItem, + ) + + +T = TypeVar("T", bound="WorkitemsListPatchRequestDataItemRelationshipsVotes") + + +@_attrs_define +class WorkitemsListPatchRequestDataItemRelationshipsVotes: + """ + Attributes: + data (Union[Unset, List['WorkitemsListPatchRequestDataItemRelationshipsVotesDataItem']]): + """ + + data: Union[ + Unset, + List["WorkitemsListPatchRequestDataItemRelationshipsVotesDataItem"], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_patch_request_data_item_relationships_votes_data_item import ( + WorkitemsListPatchRequestDataItemRelationshipsVotesDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsListPatchRequestDataItemRelationshipsVotesDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + workitems_list_patch_request_data_item_relationships_votes_obj = cls( + data=data, + ) + + workitems_list_patch_request_data_item_relationships_votes_obj.additional_properties = ( + d + ) + return workitems_list_patch_request_data_item_relationships_votes_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_votes_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_votes_data_item.py new file mode 100644 index 00000000..f51854a9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_votes_data_item.py @@ -0,0 +1,93 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_list_patch_request_data_item_relationships_votes_data_item_type import ( + WorkitemsListPatchRequestDataItemRelationshipsVotesDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsListPatchRequestDataItemRelationshipsVotesDataItem" +) + + +@_attrs_define +class WorkitemsListPatchRequestDataItemRelationshipsVotesDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsListPatchRequestDataItemRelationshipsVotesDataItemType]): + id (Union[Unset, str]): Example: MyUserId. + """ + + type: Union[ + Unset, WorkitemsListPatchRequestDataItemRelationshipsVotesDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsListPatchRequestDataItemRelationshipsVotesDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsListPatchRequestDataItemRelationshipsVotesDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + workitems_list_patch_request_data_item_relationships_votes_data_item_obj = cls( + type=type, + id=id, + ) + + workitems_list_patch_request_data_item_relationships_votes_data_item_obj.additional_properties = ( + d + ) + return workitems_list_patch_request_data_item_relationships_votes_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_votes_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_votes_data_item_type.py new file mode 100644 index 00000000..b6b6b0ce --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_votes_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsListPatchRequestDataItemRelationshipsVotesDataItemType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_watches.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_watches.py new file mode 100644 index 00000000..2d9934e5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_watches.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_list_patch_request_data_item_relationships_watches_data_item import ( + WorkitemsListPatchRequestDataItemRelationshipsWatchesDataItem, + ) + + +T = TypeVar("T", bound="WorkitemsListPatchRequestDataItemRelationshipsWatches") + + +@_attrs_define +class WorkitemsListPatchRequestDataItemRelationshipsWatches: + """ + Attributes: + data (Union[Unset, List['WorkitemsListPatchRequestDataItemRelationshipsWatchesDataItem']]): + """ + + data: Union[ + Unset, + List["WorkitemsListPatchRequestDataItemRelationshipsWatchesDataItem"], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_patch_request_data_item_relationships_watches_data_item import ( + WorkitemsListPatchRequestDataItemRelationshipsWatchesDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsListPatchRequestDataItemRelationshipsWatchesDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + workitems_list_patch_request_data_item_relationships_watches_obj = cls( + data=data, + ) + + workitems_list_patch_request_data_item_relationships_watches_obj.additional_properties = ( + d + ) + return workitems_list_patch_request_data_item_relationships_watches_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_watches_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_watches_data_item.py new file mode 100644 index 00000000..e5cfadb8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_watches_data_item.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_list_patch_request_data_item_relationships_watches_data_item_type import ( + WorkitemsListPatchRequestDataItemRelationshipsWatchesDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsListPatchRequestDataItemRelationshipsWatchesDataItem" +) + + +@_attrs_define +class WorkitemsListPatchRequestDataItemRelationshipsWatchesDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsListPatchRequestDataItemRelationshipsWatchesDataItemType]): + id (Union[Unset, str]): Example: MyUserId. + """ + + type: Union[ + Unset, + WorkitemsListPatchRequestDataItemRelationshipsWatchesDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsListPatchRequestDataItemRelationshipsWatchesDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsListPatchRequestDataItemRelationshipsWatchesDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + workitems_list_patch_request_data_item_relationships_watches_data_item_obj = cls( + type=type, + id=id, + ) + + workitems_list_patch_request_data_item_relationships_watches_data_item_obj.additional_properties = ( + d + ) + return workitems_list_patch_request_data_item_relationships_watches_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_watches_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_watches_data_item_type.py new file mode 100644 index 00000000..d491e9b7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_relationships_watches_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsListPatchRequestDataItemRelationshipsWatchesDataItemType( + str, Enum +): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_type.py new file mode 100644 index 00000000..edebe642 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_patch_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsListPatchRequestDataItemType(str, Enum): + WORKITEMS = "workitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request.py index 02ad33a0..8d7c2a17 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemsListPostRequest: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsListPostRequestDataItem']] + Attributes: + data (Union[Unset, List['WorkitemsListPostRequestDataItem']]): """ data: Union[Unset, List["WorkitemsListPostRequestDataItem"]] = UNSET @@ -36,7 +35,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item.py index 35c63ac8..487c75e3 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item.py @@ -26,11 +26,10 @@ @_attrs_define class WorkitemsListPostRequestDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListPostRequestDataItemType] - attributes : Union[Unset, WorkitemsListPostRequestDataItemAttributes] - relationships : Union[Unset, WorkitemsListPostRequestDataItemRelationships] + Attributes: + type (Union[Unset, WorkitemsListPostRequestDataItemType]): + attributes (Union[Unset, WorkitemsListPostRequestDataItemAttributes]): + relationships (Union[Unset, WorkitemsListPostRequestDataItemRelationships]): """ type: Union[Unset, WorkitemsListPostRequestDataItemType] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_attributes.py index 7044d1a8..3c1117ef 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_attributes.py @@ -25,21 +25,20 @@ @_attrs_define class WorkitemsListPostRequestDataItemAttributes: """ - Attributes - ---------- - type : str - description : Union[Unset, WorkitemsListPostRequestDataItemAttributesDescription] - due_date : Union[Unset, datetime.date] - hyperlinks : Union[Unset, List['WorkitemsListPostRequestDataItemAttributesHyperlinksItem']] - initial_estimate : Union[Unset, str] - priority : Union[Unset, str] - remaining_estimate : Union[Unset, str] - resolution : Union[Unset, str] - resolved_on : Union[Unset, datetime.datetime] - severity : Union[Unset, str] - status : Union[Unset, str] - time_spent : Union[Unset, str] - title : Union[Unset, str] + Attributes: + type (str): Example: task. + description (Union[Unset, WorkitemsListPostRequestDataItemAttributesDescription]): + due_date (Union[Unset, datetime.date]): Example: 1970-01-01. + hyperlinks (Union[Unset, List['WorkitemsListPostRequestDataItemAttributesHyperlinksItem']]): + initial_estimate (Union[Unset, str]): Example: 5 1/2d. + priority (Union[Unset, str]): Example: 90.0. + remaining_estimate (Union[Unset, str]): Example: 5 1/2d. + resolution (Union[Unset, str]): Example: done. + resolved_on (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + severity (Union[Unset, str]): Example: blocker. + status (Union[Unset, str]): Example: open. + time_spent (Union[Unset, str]): Example: 5 1/2d. + title (Union[Unset, str]): Example: Title. """ type: str @@ -65,6 +64,7 @@ class WorkitemsListPostRequestDataItemAttributes: def to_dict(self) -> Dict[str, Any]: type = self.type + description: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.description, Unset): description = self.description.to_dict() @@ -78,20 +78,26 @@ def to_dict(self) -> Dict[str, Any]: hyperlinks = [] for hyperlinks_item_data in self.hyperlinks: hyperlinks_item = hyperlinks_item_data.to_dict() - hyperlinks.append(hyperlinks_item) initial_estimate = self.initial_estimate + priority = self.priority + remaining_estimate = self.remaining_estimate + resolution = self.resolution + resolved_on: Union[Unset, str] = UNSET if not isinstance(self.resolved_on, Unset): resolved_on = self.resolved_on.isoformat() severity = self.severity + status = self.status + time_spent = self.time_spent + title = self.title field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_attributes_description.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_attributes_description.py index f54210b4..e8641a85 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_attributes_description.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_attributes_description.py @@ -17,10 +17,9 @@ @_attrs_define class WorkitemsListPostRequestDataItemAttributesDescription: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListPostRequestDataItemAttributesDescriptionType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsListPostRequestDataItemAttributesDescriptionType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_attributes_hyperlinks_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_attributes_hyperlinks_item.py index b1a2cb01..c286ff45 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_attributes_hyperlinks_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_attributes_hyperlinks_item.py @@ -16,10 +16,9 @@ @_attrs_define class WorkitemsListPostRequestDataItemAttributesHyperlinksItem: """ - Attributes - ---------- - role : Union[Unset, str] - uri : Union[Unset, str] + Attributes: + role (Union[Unset, str]): Example: ref_ext. + uri (Union[Unset, str]): Example: https://polarion.plm.automation.siemens.com. """ role: Union[Unset, str] = UNSET @@ -30,6 +29,7 @@ class WorkitemsListPostRequestDataItemAttributesHyperlinksItem: def to_dict(self) -> Dict[str, Any]: role = self.role + uri = self.uri field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships.py index eab5a9a3..3e48c0ff 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships.py @@ -18,6 +18,9 @@ from ..models.workitems_list_post_request_data_item_relationships_categories import ( WorkitemsListPostRequestDataItemRelationshipsCategories, ) + from ..models.workitems_list_post_request_data_item_relationships_linked_revisions import ( + WorkitemsListPostRequestDataItemRelationshipsLinkedRevisions, + ) from ..models.workitems_list_post_request_data_item_relationships_module import ( WorkitemsListPostRequestDataItemRelationshipsModule, ) @@ -29,12 +32,12 @@ @_attrs_define class WorkitemsListPostRequestDataItemRelationships: """ - Attributes - ---------- - assignee : Union[Unset, WorkitemsListPostRequestDataItemRelationshipsAssignee] - author : Union[Unset, WorkitemsListPostRequestDataItemRelationshipsAuthor] - categories : Union[Unset, WorkitemsListPostRequestDataItemRelationshipsCategories] - module : Union[Unset, WorkitemsListPostRequestDataItemRelationshipsModule] + Attributes: + assignee (Union[Unset, WorkitemsListPostRequestDataItemRelationshipsAssignee]): + author (Union[Unset, WorkitemsListPostRequestDataItemRelationshipsAuthor]): + categories (Union[Unset, WorkitemsListPostRequestDataItemRelationshipsCategories]): + linked_revisions (Union[Unset, WorkitemsListPostRequestDataItemRelationshipsLinkedRevisions]): + module (Union[Unset, WorkitemsListPostRequestDataItemRelationshipsModule]): """ assignee: Union[ @@ -46,6 +49,9 @@ class WorkitemsListPostRequestDataItemRelationships: categories: Union[ Unset, "WorkitemsListPostRequestDataItemRelationshipsCategories" ] = UNSET + linked_revisions: Union[ + Unset, "WorkitemsListPostRequestDataItemRelationshipsLinkedRevisions" + ] = UNSET module: Union[ Unset, "WorkitemsListPostRequestDataItemRelationshipsModule" ] = UNSET @@ -66,6 +72,10 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.categories, Unset): categories = self.categories.to_dict() + linked_revisions: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.linked_revisions, Unset): + linked_revisions = self.linked_revisions.to_dict() + module: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.module, Unset): module = self.module.to_dict() @@ -79,6 +89,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["author"] = author if categories is not UNSET: field_dict["categories"] = categories + if linked_revisions is not UNSET: + field_dict["linkedRevisions"] = linked_revisions if module is not UNSET: field_dict["module"] = module @@ -95,6 +107,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.workitems_list_post_request_data_item_relationships_categories import ( WorkitemsListPostRequestDataItemRelationshipsCategories, ) + from ..models.workitems_list_post_request_data_item_relationships_linked_revisions import ( + WorkitemsListPostRequestDataItemRelationshipsLinkedRevisions, + ) from ..models.workitems_list_post_request_data_item_relationships_module import ( WorkitemsListPostRequestDataItemRelationshipsModule, ) @@ -135,6 +150,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: _categories ) + _linked_revisions = d.pop("linkedRevisions", UNSET) + linked_revisions: Union[ + Unset, WorkitemsListPostRequestDataItemRelationshipsLinkedRevisions + ] + if isinstance(_linked_revisions, Unset): + linked_revisions = UNSET + else: + linked_revisions = WorkitemsListPostRequestDataItemRelationshipsLinkedRevisions.from_dict( + _linked_revisions + ) + _module = d.pop("module", UNSET) module: Union[ Unset, WorkitemsListPostRequestDataItemRelationshipsModule @@ -152,6 +178,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: assignee=assignee, author=author, categories=categories, + linked_revisions=linked_revisions, module=module, ) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_assignee.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_assignee.py index 12a4de23..fec619e6 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_assignee.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_assignee.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemsListPostRequestDataItemRelationshipsAssignee: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsListPostRequestDataItemRelationshipsAssigneeDataItem']] + Attributes: + data (Union[Unset, List['WorkitemsListPostRequestDataItemRelationshipsAssigneeDataItem']]): """ data: Union[ @@ -39,7 +38,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_assignee_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_assignee_data_item.py index 20bd4468..14a03355 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_assignee_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_assignee_data_item.py @@ -19,10 +19,9 @@ @_attrs_define class WorkitemsListPostRequestDataItemRelationshipsAssigneeDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListPostRequestDataItemRelationshipsAssigneeDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsListPostRequestDataItemRelationshipsAssigneeDataItemType]): + id (Union[Unset, str]): Example: MyUserId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_author.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_author.py index 183764f8..90c14b1e 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_author.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_author.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemsListPostRequestDataItemRelationshipsAuthor: """ - Attributes - ---------- - data : Union[Unset, WorkitemsListPostRequestDataItemRelationshipsAuthorData] + Attributes: + data (Union[Unset, WorkitemsListPostRequestDataItemRelationshipsAuthorData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_author_data.py index 6d133dcf..f6bb774d 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_author_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_author_data.py @@ -19,10 +19,9 @@ @_attrs_define class WorkitemsListPostRequestDataItemRelationshipsAuthorData: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListPostRequestDataItemRelationshipsAuthorDataType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsListPostRequestDataItemRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_categories.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_categories.py index 4833f97b..9290ee34 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_categories.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_categories.py @@ -22,9 +22,8 @@ @_attrs_define class WorkitemsListPostRequestDataItemRelationshipsCategories: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsListPostRequestDataItemRelationshipsCategoriesDataItem']] + Attributes: + data (Union[Unset, List['WorkitemsListPostRequestDataItemRelationshipsCategoriesDataItem']]): """ data: Union[ @@ -43,7 +42,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_categories_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_categories_data_item.py index b1998e67..6b86ac86 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_categories_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_categories_data_item.py @@ -20,10 +20,9 @@ @_attrs_define class WorkitemsListPostRequestDataItemRelationshipsCategoriesDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListPostRequestDataItemRelationshipsCategoriesDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsListPostRequestDataItemRelationshipsCategoriesDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyCategoryId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_linked_revisions.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_linked_revisions.py new file mode 100644 index 00000000..a4ecc7d7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_linked_revisions.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_list_post_request_data_item_relationships_linked_revisions_data_item import ( + WorkitemsListPostRequestDataItemRelationshipsLinkedRevisionsDataItem, + ) + + +T = TypeVar( + "T", bound="WorkitemsListPostRequestDataItemRelationshipsLinkedRevisions" +) + + +@_attrs_define +class WorkitemsListPostRequestDataItemRelationshipsLinkedRevisions: + """ + Attributes: + data (Union[Unset, List['WorkitemsListPostRequestDataItemRelationshipsLinkedRevisionsDataItem']]): + """ + + data: Union[ + Unset, + List[ + "WorkitemsListPostRequestDataItemRelationshipsLinkedRevisionsDataItem" + ], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_list_post_request_data_item_relationships_linked_revisions_data_item import ( + WorkitemsListPostRequestDataItemRelationshipsLinkedRevisionsDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsListPostRequestDataItemRelationshipsLinkedRevisionsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + workitems_list_post_request_data_item_relationships_linked_revisions_obj = cls( + data=data, + ) + + workitems_list_post_request_data_item_relationships_linked_revisions_obj.additional_properties = ( + d + ) + return workitems_list_post_request_data_item_relationships_linked_revisions_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_linked_revisions_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_linked_revisions_data_item.py new file mode 100644 index 00000000..f37a2507 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_linked_revisions_data_item.py @@ -0,0 +1,95 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_list_post_request_data_item_relationships_linked_revisions_data_item_type import ( + WorkitemsListPostRequestDataItemRelationshipsLinkedRevisionsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsListPostRequestDataItemRelationshipsLinkedRevisionsDataItem", +) + + +@_attrs_define +class WorkitemsListPostRequestDataItemRelationshipsLinkedRevisionsDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsListPostRequestDataItemRelationshipsLinkedRevisionsDataItemType]): + id (Union[Unset, str]): Example: default/1234. + """ + + type: Union[ + Unset, + WorkitemsListPostRequestDataItemRelationshipsLinkedRevisionsDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsListPostRequestDataItemRelationshipsLinkedRevisionsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsListPostRequestDataItemRelationshipsLinkedRevisionsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + workitems_list_post_request_data_item_relationships_linked_revisions_data_item_obj = cls( + type=type, + id=id, + ) + + workitems_list_post_request_data_item_relationships_linked_revisions_data_item_obj.additional_properties = ( + d + ) + return workitems_list_post_request_data_item_relationships_linked_revisions_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_linked_revisions_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_linked_revisions_data_item_type.py new file mode 100644 index 00000000..09ee39e9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_linked_revisions_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsListPostRequestDataItemRelationshipsLinkedRevisionsDataItemType( + str, Enum +): + REVISIONS = "revisions" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_module.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_module.py index 33274ec3..f6a9cfe3 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_module.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_module.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemsListPostRequestDataItemRelationshipsModule: """ - Attributes - ---------- - data : Union[Unset, WorkitemsListPostRequestDataItemRelationshipsModuleData] + Attributes: + data (Union[Unset, WorkitemsListPostRequestDataItemRelationshipsModuleData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_module_data.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_module_data.py index 7c1cf9c9..61b94c0c 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_module_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_request_data_item_relationships_module_data.py @@ -19,10 +19,9 @@ @_attrs_define class WorkitemsListPostRequestDataItemRelationshipsModuleData: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListPostRequestDataItemRelationshipsModuleDataType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsListPostRequestDataItemRelationshipsModuleDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_post_response.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_response.py index 95cff09c..893bf7e5 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_post_response.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_response.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemsListPostResponse: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsListPostResponseDataItem']] + Attributes: + data (Union[Unset, List['WorkitemsListPostResponseDataItem']]): """ data: Union[Unset, List["WorkitemsListPostResponseDataItem"]] = UNSET @@ -36,7 +35,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_response_data_item.py index 0794b364..dffeb917 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_post_response_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_response_data_item.py @@ -23,11 +23,10 @@ @_attrs_define class WorkitemsListPostResponseDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsListPostResponseDataItemType] - id : Union[Unset, str] - links : Union[Unset, WorkitemsListPostResponseDataItemLinks] + Attributes: + type (Union[Unset, WorkitemsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + links (Union[Unset, WorkitemsListPostResponseDataItemLinks]): """ type: Union[Unset, WorkitemsListPostResponseDataItemType] = UNSET @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + links: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitems_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/workitems_list_post_response_data_item_links.py index 2690398c..a41cdd55 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_list_post_response_data_item_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_list_post_response_data_item_links.py @@ -14,10 +14,11 @@ @_attrs_define class WorkitemsListPostResponseDataItemLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - portal : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId?revision=1234. + portal (Union[Unset, str]): Example: server-host-name/application- + path/polarion/redirect/project/MyProjectId/workitem?id=MyWorkItemId&revision=1234. """ self_: Union[Unset, str] = UNSET @@ -28,6 +29,7 @@ class WorkitemsListPostResponseDataItemLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + portal = self.portal field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response.py index 1ddf4cbd..1b323031 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response.py @@ -26,13 +26,12 @@ @_attrs_define class WorkitemsSingleGetResponse: """ - Attributes - ---------- - data : Union[Unset, WorkitemsSingleGetResponseData] - included : Union[Unset, List['WorkitemsSingleGetResponseIncludedItem']] - Related entities might be returned, see Rest API User Guide. - links : Union[Unset, WorkitemsSingleGetResponseLinks] + Attributes: + data (Union[Unset, WorkitemsSingleGetResponseData]): + included (Union[Unset, List['WorkitemsSingleGetResponseIncludedItem']]): Related entities might be returned, see + Rest API + User Guide. + links (Union[Unset, WorkitemsSingleGetResponseLinks]): """ data: Union[Unset, "WorkitemsSingleGetResponseData"] = UNSET @@ -54,7 +53,6 @@ def to_dict(self) -> Dict[str, Any]: included = [] for included_item_data in self.included: included_item = included_item_data.to_dict() - included.append(included_item) links: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data.py index d9f0381f..72a0401a 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data.py @@ -32,15 +32,14 @@ @_attrs_define class WorkitemsSingleGetResponseData: """ - Attributes - ---------- - type : Union[Unset, WorkitemsSingleGetResponseDataType] - id : Union[Unset, str] - revision : Union[Unset, str] - attributes : Union[Unset, WorkitemsSingleGetResponseDataAttributes] - relationships : Union[Unset, WorkitemsSingleGetResponseDataRelationships] - meta : Union[Unset, WorkitemsSingleGetResponseDataMeta] - links : Union[Unset, WorkitemsSingleGetResponseDataLinks] + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, WorkitemsSingleGetResponseDataAttributes]): + relationships (Union[Unset, WorkitemsSingleGetResponseDataRelationships]): + meta (Union[Unset, WorkitemsSingleGetResponseDataMeta]): + links (Union[Unset, WorkitemsSingleGetResponseDataLinks]): """ type: Union[Unset, WorkitemsSingleGetResponseDataType] = UNSET @@ -64,7 +63,9 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_attributes.py index 16b76abf..ae423a37 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_attributes.py @@ -25,27 +25,26 @@ @_attrs_define class WorkitemsSingleGetResponseDataAttributes: """ - Attributes - ---------- - created : Union[Unset, datetime.datetime] - description : Union[Unset, WorkitemsSingleGetResponseDataAttributesDescription] - due_date : Union[Unset, datetime.date] - hyperlinks : Union[Unset, List['WorkitemsSingleGetResponseDataAttributesHyperlinksItem']] - id : Union[Unset, str] - initial_estimate : Union[Unset, str] - outline_number : Union[Unset, str] - planned_end : Union[Unset, datetime.datetime] - planned_start : Union[Unset, datetime.datetime] - priority : Union[Unset, str] - remaining_estimate : Union[Unset, str] - resolution : Union[Unset, str] - resolved_on : Union[Unset, datetime.datetime] - severity : Union[Unset, str] - status : Union[Unset, str] - time_spent : Union[Unset, str] - title : Union[Unset, str] - type : Union[Unset, str] - updated : Union[Unset, datetime.datetime] + Attributes: + created (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + description (Union[Unset, WorkitemsSingleGetResponseDataAttributesDescription]): + due_date (Union[Unset, datetime.date]): Example: 1970-01-01. + hyperlinks (Union[Unset, List['WorkitemsSingleGetResponseDataAttributesHyperlinksItem']]): + id (Union[Unset, str]): Example: MyWorkItemId. + initial_estimate (Union[Unset, str]): Example: 5 1/2d. + outline_number (Union[Unset, str]): Example: 1.11. + planned_end (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + planned_start (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + priority (Union[Unset, str]): Example: 90.0. + remaining_estimate (Union[Unset, str]): Example: 5 1/2d. + resolution (Union[Unset, str]): Example: done. + resolved_on (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + severity (Union[Unset, str]): Example: blocker. + status (Union[Unset, str]): Example: open. + time_spent (Union[Unset, str]): Example: 5 1/2d. + title (Union[Unset, str]): Example: Title. + type (Union[Unset, str]): Example: task. + updated (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. """ created: Union[Unset, datetime.datetime] = UNSET @@ -93,12 +92,14 @@ def to_dict(self) -> Dict[str, Any]: hyperlinks = [] for hyperlinks_item_data in self.hyperlinks: hyperlinks_item = hyperlinks_item_data.to_dict() - hyperlinks.append(hyperlinks_item) id = self.id + initial_estimate = self.initial_estimate + outline_number = self.outline_number + planned_end: Union[Unset, str] = UNSET if not isinstance(self.planned_end, Unset): planned_end = self.planned_end.isoformat() @@ -108,17 +109,25 @@ def to_dict(self) -> Dict[str, Any]: planned_start = self.planned_start.isoformat() priority = self.priority + remaining_estimate = self.remaining_estimate + resolution = self.resolution + resolved_on: Union[Unset, str] = UNSET if not isinstance(self.resolved_on, Unset): resolved_on = self.resolved_on.isoformat() severity = self.severity + status = self.status + time_spent = self.time_spent + title = self.title + type = self.type + updated: Union[Unset, str] = UNSET if not isinstance(self.updated, Unset): updated = self.updated.isoformat() diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_attributes_description.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_attributes_description.py index b1536df5..e054e4dc 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_attributes_description.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_attributes_description.py @@ -17,10 +17,9 @@ @_attrs_define class WorkitemsSingleGetResponseDataAttributesDescription: """ - Attributes - ---------- - type : Union[Unset, WorkitemsSingleGetResponseDataAttributesDescriptionType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataAttributesDescriptionType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_attributes_hyperlinks_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_attributes_hyperlinks_item.py index 637e0fb5..7a678280 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_attributes_hyperlinks_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_attributes_hyperlinks_item.py @@ -16,10 +16,9 @@ @_attrs_define class WorkitemsSingleGetResponseDataAttributesHyperlinksItem: """ - Attributes - ---------- - role : Union[Unset, str] - uri : Union[Unset, str] + Attributes: + role (Union[Unset, str]): Example: ref_ext. + uri (Union[Unset, str]): Example: https://polarion.plm.automation.siemens.com. """ role: Union[Unset, str] = UNSET @@ -30,6 +29,7 @@ class WorkitemsSingleGetResponseDataAttributesHyperlinksItem: def to_dict(self) -> Dict[str, Any]: role = self.role + uri = self.uri field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_links.py index 24fdf61f..beb239b3 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_links.py @@ -14,10 +14,11 @@ @_attrs_define class WorkitemsSingleGetResponseDataLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] - portal : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId?revision=1234. + portal (Union[Unset, str]): Example: server-host-name/application- + path/polarion/redirect/project/MyProjectId/workitem?id=MyWorkItemId&revision=1234. """ self_: Union[Unset, str] = UNSET @@ -28,6 +29,7 @@ class WorkitemsSingleGetResponseDataLinks: def to_dict(self) -> Dict[str, Any]: self_ = self.self_ + portal = self.portal field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_meta.py index 4d42bcb9..9c58b421 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_meta.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemsSingleGetResponseDataMeta: """ - Attributes - ---------- - errors : Union[Unset, List['WorkitemsSingleGetResponseDataMetaErrorsItem']] + Attributes: + errors (Union[Unset, List['WorkitemsSingleGetResponseDataMetaErrorsItem']]): """ errors: Union[ @@ -38,7 +37,6 @@ def to_dict(self) -> Dict[str, Any]: errors = [] for errors_item_data in self.errors: errors_item = errors_item_data.to_dict() - errors.append(errors_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_meta_errors_item.py index 7a6809dd..bc0ef178 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_meta_errors_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_meta_errors_item.py @@ -20,15 +20,12 @@ @_attrs_define class WorkitemsSingleGetResponseDataMetaErrorsItem: """ - Attributes - ---------- - status : Union[Unset, str] - HTTP status code applicable to this problem. - title : Union[Unset, str] - Short, human-readable summary of the problem. - detail : Union[Unset, str] - Human-readable explanation specific to this occurrence of the problem. - source : Union[Unset, WorkitemsSingleGetResponseDataMetaErrorsItemSource] + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, WorkitemsSingleGetResponseDataMetaErrorsItemSource]): """ status: Union[Unset, str] = UNSET @@ -43,8 +40,11 @@ class WorkitemsSingleGetResponseDataMetaErrorsItem: def to_dict(self) -> Dict[str, Any]: status = self.status + title = self.title + detail = self.detail + source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): source = self.source.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_meta_errors_item_source.py index f3add239..0a54c981 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_meta_errors_item_source.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_meta_errors_item_source.py @@ -1,37 +1,49 @@ # Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.workitems_single_get_response_data_meta_errors_item_source_resource import ( + WorkitemsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + T = TypeVar("T", bound="WorkitemsSingleGetResponseDataMetaErrorsItemSource") @_attrs_define class WorkitemsSingleGetResponseDataMetaErrorsItemSource: """ - Attributes - ---------- - pointer : Union[Unset, str] - JSON Pointer to the associated entity in the request document. - parameter : Union[Unset, str] - String indicating which URI query parameter caused the error. + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, WorkitemsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the error. """ pointer: Union[Unset, str] = UNSET parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "WorkitemsSingleGetResponseDataMetaErrorsItemSourceResource" + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: pointer = self.pointer + parameter = self.parameter + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -39,19 +51,37 @@ def to_dict(self) -> Dict[str, Any]: field_dict["pointer"] = pointer if parameter is not UNSET: field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_single_get_response_data_meta_errors_item_source_resource import ( + WorkitemsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + d = src_dict.copy() pointer = d.pop("pointer", UNSET) parameter = d.pop("parameter", UNSET) + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, WorkitemsSingleGetResponseDataMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = WorkitemsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + workitems_single_get_response_data_meta_errors_item_source_obj = cls( pointer=pointer, parameter=parameter, + resource=resource, ) workitems_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..767c3b28 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsSingleGetResponseDataMetaErrorsItemSourceResource" +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + workitems_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + workitems_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships.py index 84b90804..c01bb46b 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships.py @@ -9,6 +9,9 @@ from ..types import UNSET, Unset if TYPE_CHECKING: + from ..models.workitems_single_get_response_data_relationships_approvals import ( + WorkitemsSingleGetResponseDataRelationshipsApprovals, + ) from ..models.workitems_single_get_response_data_relationships_assignee import ( WorkitemsSingleGetResponseDataRelationshipsAssignee, ) @@ -18,12 +21,24 @@ from ..models.workitems_single_get_response_data_relationships_author import ( WorkitemsSingleGetResponseDataRelationshipsAuthor, ) + from ..models.workitems_single_get_response_data_relationships_backlinked_work_items import ( + WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItems, + ) from ..models.workitems_single_get_response_data_relationships_categories import ( WorkitemsSingleGetResponseDataRelationshipsCategories, ) from ..models.workitems_single_get_response_data_relationships_comments import ( WorkitemsSingleGetResponseDataRelationshipsComments, ) + from ..models.workitems_single_get_response_data_relationships_externally_linked_work_items import ( + WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItems, + ) + from ..models.workitems_single_get_response_data_relationships_linked_oslc_resources import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResources, + ) + from ..models.workitems_single_get_response_data_relationships_linked_revisions import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedRevisions, + ) from ..models.workitems_single_get_response_data_relationships_linked_work_items import ( WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItems, ) @@ -36,9 +51,18 @@ from ..models.workitems_single_get_response_data_relationships_project import ( WorkitemsSingleGetResponseDataRelationshipsProject, ) + from ..models.workitems_single_get_response_data_relationships_test_steps import ( + WorkitemsSingleGetResponseDataRelationshipsTestSteps, + ) + from ..models.workitems_single_get_response_data_relationships_votes import ( + WorkitemsSingleGetResponseDataRelationshipsVotes, + ) from ..models.workitems_single_get_response_data_relationships_watches import ( WorkitemsSingleGetResponseDataRelationshipsWatches, ) + from ..models.workitems_single_get_response_data_relationships_work_records import ( + WorkitemsSingleGetResponseDataRelationshipsWorkRecords, + ) T = TypeVar("T", bound="WorkitemsSingleGetResponseDataRelationships") @@ -47,20 +71,31 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationships: """ - Attributes - ---------- - assignee : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAssignee] - attachments : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAttachments] - author : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAuthor] - categories : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsCategories] - comments : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsComments] - linked_work_items : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItems] - module : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsModule] - planned_in : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsPlannedIn] - project : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsProject] - watches : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsWatches] + Attributes: + approvals (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsApprovals]): + assignee (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAssignee]): + attachments (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAttachments]): + author (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAuthor]): + backlinked_work_items (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItems]): + categories (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsCategories]): + comments (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsComments]): + externally_linked_work_items (Union[Unset, + WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItems]): + linked_oslc_resources (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResources]): + linked_revisions (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsLinkedRevisions]): + linked_work_items (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItems]): + module (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsModule]): + planned_in (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsPlannedIn]): + project (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsProject]): + test_steps (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsTestSteps]): + votes (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsVotes]): + watches (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsWatches]): + work_records (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsWorkRecords]): """ + approvals: Union[ + Unset, "WorkitemsSingleGetResponseDataRelationshipsApprovals" + ] = UNSET assignee: Union[ Unset, "WorkitemsSingleGetResponseDataRelationshipsAssignee" ] = UNSET @@ -70,12 +105,25 @@ class WorkitemsSingleGetResponseDataRelationships: author: Union[ Unset, "WorkitemsSingleGetResponseDataRelationshipsAuthor" ] = UNSET + backlinked_work_items: Union[ + Unset, "WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItems" + ] = UNSET categories: Union[ Unset, "WorkitemsSingleGetResponseDataRelationshipsCategories" ] = UNSET comments: Union[ Unset, "WorkitemsSingleGetResponseDataRelationshipsComments" ] = UNSET + externally_linked_work_items: Union[ + Unset, + "WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItems", + ] = UNSET + linked_oslc_resources: Union[ + Unset, "WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResources" + ] = UNSET + linked_revisions: Union[ + Unset, "WorkitemsSingleGetResponseDataRelationshipsLinkedRevisions" + ] = UNSET linked_work_items: Union[ Unset, "WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItems" ] = UNSET @@ -88,14 +136,27 @@ class WorkitemsSingleGetResponseDataRelationships: project: Union[ Unset, "WorkitemsSingleGetResponseDataRelationshipsProject" ] = UNSET + test_steps: Union[ + Unset, "WorkitemsSingleGetResponseDataRelationshipsTestSteps" + ] = UNSET + votes: Union[ + Unset, "WorkitemsSingleGetResponseDataRelationshipsVotes" + ] = UNSET watches: Union[ Unset, "WorkitemsSingleGetResponseDataRelationshipsWatches" ] = UNSET + work_records: Union[ + Unset, "WorkitemsSingleGetResponseDataRelationshipsWorkRecords" + ] = UNSET additional_properties: Dict[str, Any] = _attrs_field( init=False, factory=dict ) def to_dict(self) -> Dict[str, Any]: + approvals: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.approvals, Unset): + approvals = self.approvals.to_dict() + assignee: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.assignee, Unset): assignee = self.assignee.to_dict() @@ -108,6 +169,10 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.author, Unset): author = self.author.to_dict() + backlinked_work_items: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.backlinked_work_items, Unset): + backlinked_work_items = self.backlinked_work_items.to_dict() + categories: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.categories, Unset): categories = self.categories.to_dict() @@ -116,6 +181,20 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.comments, Unset): comments = self.comments.to_dict() + externally_linked_work_items: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.externally_linked_work_items, Unset): + externally_linked_work_items = ( + self.externally_linked_work_items.to_dict() + ) + + linked_oslc_resources: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.linked_oslc_resources, Unset): + linked_oslc_resources = self.linked_oslc_resources.to_dict() + + linked_revisions: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.linked_revisions, Unset): + linked_revisions = self.linked_revisions.to_dict() + linked_work_items: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.linked_work_items, Unset): linked_work_items = self.linked_work_items.to_dict() @@ -132,23 +211,47 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.project, Unset): project = self.project.to_dict() + test_steps: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.test_steps, Unset): + test_steps = self.test_steps.to_dict() + + votes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.votes, Unset): + votes = self.votes.to_dict() + watches: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.watches, Unset): watches = self.watches.to_dict() + work_records: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.work_records, Unset): + work_records = self.work_records.to_dict() + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) + if approvals is not UNSET: + field_dict["approvals"] = approvals if assignee is not UNSET: field_dict["assignee"] = assignee if attachments is not UNSET: field_dict["attachments"] = attachments if author is not UNSET: field_dict["author"] = author + if backlinked_work_items is not UNSET: + field_dict["backlinkedWorkItems"] = backlinked_work_items if categories is not UNSET: field_dict["categories"] = categories if comments is not UNSET: field_dict["comments"] = comments + if externally_linked_work_items is not UNSET: + field_dict[ + "externallyLinkedWorkItems" + ] = externally_linked_work_items + if linked_oslc_resources is not UNSET: + field_dict["linkedOslcResources"] = linked_oslc_resources + if linked_revisions is not UNSET: + field_dict["linkedRevisions"] = linked_revisions if linked_work_items is not UNSET: field_dict["linkedWorkItems"] = linked_work_items if module is not UNSET: @@ -157,13 +260,22 @@ def to_dict(self) -> Dict[str, Any]: field_dict["plannedIn"] = planned_in if project is not UNSET: field_dict["project"] = project + if test_steps is not UNSET: + field_dict["testSteps"] = test_steps + if votes is not UNSET: + field_dict["votes"] = votes if watches is not UNSET: field_dict["watches"] = watches + if work_records is not UNSET: + field_dict["workRecords"] = work_records return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_single_get_response_data_relationships_approvals import ( + WorkitemsSingleGetResponseDataRelationshipsApprovals, + ) from ..models.workitems_single_get_response_data_relationships_assignee import ( WorkitemsSingleGetResponseDataRelationshipsAssignee, ) @@ -173,12 +285,24 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.workitems_single_get_response_data_relationships_author import ( WorkitemsSingleGetResponseDataRelationshipsAuthor, ) + from ..models.workitems_single_get_response_data_relationships_backlinked_work_items import ( + WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItems, + ) from ..models.workitems_single_get_response_data_relationships_categories import ( WorkitemsSingleGetResponseDataRelationshipsCategories, ) from ..models.workitems_single_get_response_data_relationships_comments import ( WorkitemsSingleGetResponseDataRelationshipsComments, ) + from ..models.workitems_single_get_response_data_relationships_externally_linked_work_items import ( + WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItems, + ) + from ..models.workitems_single_get_response_data_relationships_linked_oslc_resources import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResources, + ) + from ..models.workitems_single_get_response_data_relationships_linked_revisions import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedRevisions, + ) from ..models.workitems_single_get_response_data_relationships_linked_work_items import ( WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItems, ) @@ -191,11 +315,33 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.workitems_single_get_response_data_relationships_project import ( WorkitemsSingleGetResponseDataRelationshipsProject, ) + from ..models.workitems_single_get_response_data_relationships_test_steps import ( + WorkitemsSingleGetResponseDataRelationshipsTestSteps, + ) + from ..models.workitems_single_get_response_data_relationships_votes import ( + WorkitemsSingleGetResponseDataRelationshipsVotes, + ) from ..models.workitems_single_get_response_data_relationships_watches import ( WorkitemsSingleGetResponseDataRelationshipsWatches, ) + from ..models.workitems_single_get_response_data_relationships_work_records import ( + WorkitemsSingleGetResponseDataRelationshipsWorkRecords, + ) d = src_dict.copy() + _approvals = d.pop("approvals", UNSET) + approvals: Union[ + Unset, WorkitemsSingleGetResponseDataRelationshipsApprovals + ] + if isinstance(_approvals, Unset): + approvals = UNSET + else: + approvals = ( + WorkitemsSingleGetResponseDataRelationshipsApprovals.from_dict( + _approvals + ) + ) + _assignee = d.pop("assignee", UNSET) assignee: Union[ Unset, WorkitemsSingleGetResponseDataRelationshipsAssignee @@ -231,6 +377,18 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: ) ) + _backlinked_work_items = d.pop("backlinkedWorkItems", UNSET) + backlinked_work_items: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItems, + ] + if isinstance(_backlinked_work_items, Unset): + backlinked_work_items = UNSET + else: + backlinked_work_items = WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItems.from_dict( + _backlinked_work_items + ) + _categories = d.pop("categories", UNSET) categories: Union[ Unset, WorkitemsSingleGetResponseDataRelationshipsCategories @@ -255,6 +413,43 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: ) ) + _externally_linked_work_items = d.pop( + "externallyLinkedWorkItems", UNSET + ) + externally_linked_work_items: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItems, + ] + if isinstance(_externally_linked_work_items, Unset): + externally_linked_work_items = UNSET + else: + externally_linked_work_items = WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItems.from_dict( + _externally_linked_work_items + ) + + _linked_oslc_resources = d.pop("linkedOslcResources", UNSET) + linked_oslc_resources: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResources, + ] + if isinstance(_linked_oslc_resources, Unset): + linked_oslc_resources = UNSET + else: + linked_oslc_resources = WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResources.from_dict( + _linked_oslc_resources + ) + + _linked_revisions = d.pop("linkedRevisions", UNSET) + linked_revisions: Union[ + Unset, WorkitemsSingleGetResponseDataRelationshipsLinkedRevisions + ] + if isinstance(_linked_revisions, Unset): + linked_revisions = UNSET + else: + linked_revisions = WorkitemsSingleGetResponseDataRelationshipsLinkedRevisions.from_dict( + _linked_revisions + ) + _linked_work_items = d.pop("linkedWorkItems", UNSET) linked_work_items: Union[ Unset, WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItems @@ -303,6 +498,28 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: ) ) + _test_steps = d.pop("testSteps", UNSET) + test_steps: Union[ + Unset, WorkitemsSingleGetResponseDataRelationshipsTestSteps + ] + if isinstance(_test_steps, Unset): + test_steps = UNSET + else: + test_steps = ( + WorkitemsSingleGetResponseDataRelationshipsTestSteps.from_dict( + _test_steps + ) + ) + + _votes = d.pop("votes", UNSET) + votes: Union[Unset, WorkitemsSingleGetResponseDataRelationshipsVotes] + if isinstance(_votes, Unset): + votes = UNSET + else: + votes = WorkitemsSingleGetResponseDataRelationshipsVotes.from_dict( + _votes + ) + _watches = d.pop("watches", UNSET) watches: Union[ Unset, WorkitemsSingleGetResponseDataRelationshipsWatches @@ -316,17 +533,36 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: ) ) + _work_records = d.pop("workRecords", UNSET) + work_records: Union[ + Unset, WorkitemsSingleGetResponseDataRelationshipsWorkRecords + ] + if isinstance(_work_records, Unset): + work_records = UNSET + else: + work_records = WorkitemsSingleGetResponseDataRelationshipsWorkRecords.from_dict( + _work_records + ) + workitems_single_get_response_data_relationships_obj = cls( + approvals=approvals, assignee=assignee, attachments=attachments, author=author, + backlinked_work_items=backlinked_work_items, categories=categories, comments=comments, + externally_linked_work_items=externally_linked_work_items, + linked_oslc_resources=linked_oslc_resources, + linked_revisions=linked_revisions, linked_work_items=linked_work_items, module=module, planned_in=planned_in, project=project, + test_steps=test_steps, + votes=votes, watches=watches, + work_records=work_records, ) workitems_single_get_response_data_relationships_obj.additional_properties = ( diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_approvals.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_approvals.py new file mode 100644 index 00000000..1d026504 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_approvals.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_single_get_response_data_relationships_approvals_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsApprovalsDataItem, + ) + from ..models.workitems_single_get_response_data_relationships_approvals_meta import ( + WorkitemsSingleGetResponseDataRelationshipsApprovalsMeta, + ) + + +T = TypeVar("T", bound="WorkitemsSingleGetResponseDataRelationshipsApprovals") + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsApprovals: + """ + Attributes: + data (Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsApprovalsDataItem']]): + meta (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsApprovalsMeta]): + """ + + data: Union[ + Unset, + List["WorkitemsSingleGetResponseDataRelationshipsApprovalsDataItem"], + ] = UNSET + meta: Union[ + Unset, "WorkitemsSingleGetResponseDataRelationshipsApprovalsMeta" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_single_get_response_data_relationships_approvals_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsApprovalsDataItem, + ) + from ..models.workitems_single_get_response_data_relationships_approvals_meta import ( + WorkitemsSingleGetResponseDataRelationshipsApprovalsMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsSingleGetResponseDataRelationshipsApprovalsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, WorkitemsSingleGetResponseDataRelationshipsApprovalsMeta + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkitemsSingleGetResponseDataRelationshipsApprovalsMeta.from_dict( + _meta + ) + + workitems_single_get_response_data_relationships_approvals_obj = cls( + data=data, + meta=meta, + ) + + workitems_single_get_response_data_relationships_approvals_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_approvals_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_approvals_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_approvals_data_item.py new file mode 100644 index 00000000..829b47e6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_approvals_data_item.py @@ -0,0 +1,102 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_single_get_response_data_relationships_approvals_data_item_type import ( + WorkitemsSingleGetResponseDataRelationshipsApprovalsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsSingleGetResponseDataRelationshipsApprovalsDataItem" +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsApprovalsDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsApprovalsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyWorkRecordId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, WorkitemsSingleGetResponseDataRelationshipsApprovalsDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsApprovalsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsSingleGetResponseDataRelationshipsApprovalsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workitems_single_get_response_data_relationships_approvals_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workitems_single_get_response_data_relationships_approvals_data_item_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_approvals_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_approvals_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_approvals_data_item_type.py new file mode 100644 index 00000000..4534eccd --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_approvals_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsSingleGetResponseDataRelationshipsApprovalsDataItemType( + str, Enum +): + WORKRECORDS = "workrecords" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_approvals_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_approvals_meta.py new file mode 100644 index 00000000..53a6648c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_approvals_meta.py @@ -0,0 +1,71 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsSingleGetResponseDataRelationshipsApprovalsMeta" +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsApprovalsMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workitems_single_get_response_data_relationships_approvals_meta_obj = ( + cls( + total_count=total_count, + ) + ) + + workitems_single_get_response_data_relationships_approvals_meta_obj.additional_properties = ( + d + ) + return ( + workitems_single_get_response_data_relationships_approvals_meta_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_assignee.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_assignee.py index a27069ca..5f5744f4 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_assignee.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_assignee.py @@ -23,10 +23,9 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsAssignee: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsAssigneeDataItem']] - meta : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAssigneeMeta] + Attributes: + data (Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsAssigneeDataItem']]): + meta (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAssigneeMeta]): """ data: Union[ @@ -46,7 +45,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_assignee_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_assignee_data_item.py index dc82e80b..78d877aa 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_assignee_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_assignee_data_item.py @@ -19,11 +19,10 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsAssigneeDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAssigneeDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAssigneeDataItemType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_assignee_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_assignee_meta.py index 7e9800b6..46b39016 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_assignee_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_assignee_meta.py @@ -16,9 +16,8 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsAssigneeMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_attachments.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_attachments.py index 5444db72..d3578150 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_attachments.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_attachments.py @@ -28,11 +28,10 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsAttachments: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsAttachmentsDataItem']] - meta : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAttachmentsMeta] - links : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAttachmentsLinks] + Attributes: + data (Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsAttachmentsDataItem']]): + meta (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAttachmentsMeta]): + links (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAttachmentsLinks]): """ data: Union[ @@ -55,7 +54,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_attachments_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_attachments_data_item.py index 47680b5e..407f0ef9 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_attachments_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_attachments_data_item.py @@ -19,11 +19,10 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsAttachmentsDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAttachmentsDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAttachmentsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyAttachmentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -42,6 +41,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_attachments_links.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_attachments_links.py index 022a0913..7f6d3c22 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_attachments_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_attachments_links.py @@ -16,9 +16,9 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsAttachmentsLinks: """ - Attributes - ---------- - related : Union[Unset, str] + Attributes: + related (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/attachments?revision=1234. """ related: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_attachments_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_attachments_meta.py index 490be353..be984f53 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_attachments_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_attachments_meta.py @@ -16,9 +16,8 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsAttachmentsMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_author.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_author.py index f4b17f65..8178563f 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_author.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_author.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsAuthor: """ - Attributes - ---------- - data : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAuthorData] + Attributes: + data (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAuthorData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_author_data.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_author_data.py index d009e3fe..ce2bcdf4 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_author_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_author_data.py @@ -17,11 +17,10 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsAuthorData: """ - Attributes - ---------- - type : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAuthorDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsAuthorDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -39,6 +38,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_backlinked_work_items.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_backlinked_work_items.py new file mode 100644 index 00000000..39fa761e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_backlinked_work_items.py @@ -0,0 +1,124 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_single_get_response_data_relationships_backlinked_work_items_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsDataItem, + ) + from ..models.workitems_single_get_response_data_relationships_backlinked_work_items_meta import ( + WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsMeta, + ) + + +T = TypeVar( + "T", bound="WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItems" +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItems: + """ + Attributes: + data (Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsDataItem']]): + meta (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsMeta]): + """ + + data: Union[ + Unset, + List[ + "WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsDataItem" + ], + ] = UNSET + meta: Union[ + Unset, + "WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsMeta", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_single_get_response_data_relationships_backlinked_work_items_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsDataItem, + ) + from ..models.workitems_single_get_response_data_relationships_backlinked_work_items_meta import ( + WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsMeta, + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsMeta.from_dict( + _meta + ) + + workitems_single_get_response_data_relationships_backlinked_work_items_obj = cls( + data=data, + meta=meta, + ) + + workitems_single_get_response_data_relationships_backlinked_work_items_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_backlinked_work_items_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_backlinked_work_items_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_backlinked_work_items_data_item.py new file mode 100644 index 00000000..5ab6be9a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_backlinked_work_items_data_item.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_single_get_response_data_relationships_backlinked_work_items_data_item_type import ( + WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsDataItem", +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/parent/MyProjectId/MyLinkedWorkItemId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workitems_single_get_response_data_relationships_backlinked_work_items_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workitems_single_get_response_data_relationships_backlinked_work_items_data_item_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_backlinked_work_items_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_backlinked_work_items_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_backlinked_work_items_data_item_type.py new file mode 100644 index 00000000..2b9f3b70 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_backlinked_work_items_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsDataItemType( + str, Enum +): + LINKEDWORKITEMS = "linkedworkitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_backlinked_work_items_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_backlinked_work_items_meta.py new file mode 100644 index 00000000..6a5a798d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_backlinked_work_items_meta.py @@ -0,0 +1,68 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsMeta", +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsBacklinkedWorkItemsMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workitems_single_get_response_data_relationships_backlinked_work_items_meta_obj = cls( + total_count=total_count, + ) + + workitems_single_get_response_data_relationships_backlinked_work_items_meta_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_backlinked_work_items_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_categories.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_categories.py index ccdc4511..9b1af930 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_categories.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_categories.py @@ -23,10 +23,9 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsCategories: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsCategoriesDataItem']] - meta : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsCategoriesMeta] + Attributes: + data (Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsCategoriesDataItem']]): + meta (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsCategoriesMeta]): """ data: Union[ @@ -46,7 +45,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_categories_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_categories_data_item.py index 32fe1ade..51d92f8c 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_categories_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_categories_data_item.py @@ -19,11 +19,10 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsCategoriesDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsCategoriesDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsCategoriesDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyCategoryId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -42,6 +41,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_categories_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_categories_meta.py index 6f8e1753..023b5110 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_categories_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_categories_meta.py @@ -16,9 +16,8 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsCategoriesMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_comments.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_comments.py index 6a2b817f..11dab935 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_comments.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_comments.py @@ -26,11 +26,10 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsComments: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsCommentsDataItem']] - meta : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsCommentsMeta] - links : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsCommentsLinks] + Attributes: + data (Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsCommentsDataItem']]): + meta (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsCommentsMeta]): + links (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsCommentsLinks]): """ data: Union[ @@ -53,7 +52,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_comments_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_comments_data_item.py index 9b7c60b6..590eb496 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_comments_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_comments_data_item.py @@ -19,11 +19,10 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsCommentsDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsCommentsDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsCommentsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyCommentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_comments_links.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_comments_links.py index 5f625d4a..63762d0d 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_comments_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_comments_links.py @@ -16,9 +16,9 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsCommentsLinks: """ - Attributes - ---------- - related : Union[Unset, str] + Attributes: + related (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/comments?revision=1234. """ related: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_comments_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_comments_meta.py index 4610a83e..396908ea 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_comments_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_comments_meta.py @@ -16,9 +16,8 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsCommentsMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_externally_linked_work_items.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_externally_linked_work_items.py new file mode 100644 index 00000000..502dc2a4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_externally_linked_work_items.py @@ -0,0 +1,125 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_single_get_response_data_relationships_externally_linked_work_items_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsDataItem, + ) + from ..models.workitems_single_get_response_data_relationships_externally_linked_work_items_meta import ( + WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsMeta, + ) + + +T = TypeVar( + "T", + bound="WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItems", +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItems: + """ + Attributes: + data (Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsDataItem']]): + meta (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsMeta]): + """ + + data: Union[ + Unset, + List[ + "WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsDataItem" + ], + ] = UNSET + meta: Union[ + Unset, + "WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsMeta", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_single_get_response_data_relationships_externally_linked_work_items_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsDataItem, + ) + from ..models.workitems_single_get_response_data_relationships_externally_linked_work_items_meta import ( + WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsMeta, + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsMeta.from_dict( + _meta + ) + + workitems_single_get_response_data_relationships_externally_linked_work_items_obj = cls( + data=data, + meta=meta, + ) + + workitems_single_get_response_data_relationships_externally_linked_work_items_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_externally_linked_work_items_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_externally_linked_work_items_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_externally_linked_work_items_data_item.py new file mode 100644 index 00000000..5d228dad --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_externally_linked_work_items_data_item.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_single_get_response_data_relationships_externally_linked_work_items_data_item_type import ( + WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsDataItem", +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/parent/hostname/MyProjectId/MyLinkedWorkItemId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workitems_single_get_response_data_relationships_externally_linked_work_items_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workitems_single_get_response_data_relationships_externally_linked_work_items_data_item_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_externally_linked_work_items_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_externally_linked_work_items_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_externally_linked_work_items_data_item_type.py new file mode 100644 index 00000000..9b82878e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_externally_linked_work_items_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsDataItemType( + str, Enum +): + EXTERNALLYLINKEDWORKITEMS = "externallylinkedworkitems" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_externally_linked_work_items_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_externally_linked_work_items_meta.py new file mode 100644 index 00000000..ad1e7976 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_externally_linked_work_items_meta.py @@ -0,0 +1,68 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsMeta", +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsExternallyLinkedWorkItemsMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workitems_single_get_response_data_relationships_externally_linked_work_items_meta_obj = cls( + total_count=total_count, + ) + + workitems_single_get_response_data_relationships_externally_linked_work_items_meta_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_externally_linked_work_items_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_oslc_resources.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_oslc_resources.py new file mode 100644 index 00000000..da369760 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_oslc_resources.py @@ -0,0 +1,124 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_single_get_response_data_relationships_linked_oslc_resources_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesDataItem, + ) + from ..models.workitems_single_get_response_data_relationships_linked_oslc_resources_meta import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesMeta, + ) + + +T = TypeVar( + "T", bound="WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResources" +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResources: + """ + Attributes: + data (Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesDataItem']]): + meta (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesMeta]): + """ + + data: Union[ + Unset, + List[ + "WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesDataItem" + ], + ] = UNSET + meta: Union[ + Unset, + "WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesMeta", + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_single_get_response_data_relationships_linked_oslc_resources_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesDataItem, + ) + from ..models.workitems_single_get_response_data_relationships_linked_oslc_resources_meta import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesMeta, + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesMeta.from_dict( + _meta + ) + + workitems_single_get_response_data_relationships_linked_oslc_resources_obj = cls( + data=data, + meta=meta, + ) + + workitems_single_get_response_data_relationships_linked_oslc_resources_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_linked_oslc_resources_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_oslc_resources_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_oslc_resources_data_item.py new file mode 100644 index 00000000..3add9d08 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_oslc_resources_data_item.py @@ -0,0 +1,106 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_single_get_response_data_relationships_linked_oslc_resources_data_item_type import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesDataItem", +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/http://server-host- + name/ns/cm#relatedChangeRequest/http://server-host-name/application- + path/oslc/services/projects/MyProjectId/workitems/MyWorkItemId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workitems_single_get_response_data_relationships_linked_oslc_resources_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workitems_single_get_response_data_relationships_linked_oslc_resources_data_item_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_linked_oslc_resources_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_oslc_resources_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_oslc_resources_data_item_type.py new file mode 100644 index 00000000..94f50ca7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_oslc_resources_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesDataItemType( + str, Enum +): + LINKEDOSLCRESOURCES = "linkedoslcresources" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_oslc_resources_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_oslc_resources_meta.py new file mode 100644 index 00000000..a8745bc9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_oslc_resources_meta.py @@ -0,0 +1,68 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesMeta", +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsLinkedOslcResourcesMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workitems_single_get_response_data_relationships_linked_oslc_resources_meta_obj = cls( + total_count=total_count, + ) + + workitems_single_get_response_data_relationships_linked_oslc_resources_meta_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_linked_oslc_resources_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_revisions.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_revisions.py new file mode 100644 index 00000000..8b87f10b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_revisions.py @@ -0,0 +1,123 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_single_get_response_data_relationships_linked_revisions_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsDataItem, + ) + from ..models.workitems_single_get_response_data_relationships_linked_revisions_meta import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsMeta, + ) + + +T = TypeVar( + "T", bound="WorkitemsSingleGetResponseDataRelationshipsLinkedRevisions" +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsLinkedRevisions: + """ + Attributes: + data (Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsDataItem']]): + meta (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsMeta]): + """ + + data: Union[ + Unset, + List[ + "WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsDataItem" + ], + ] = UNSET + meta: Union[ + Unset, "WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsMeta" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_single_get_response_data_relationships_linked_revisions_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsDataItem, + ) + from ..models.workitems_single_get_response_data_relationships_linked_revisions_meta import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsMeta, + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsMeta.from_dict( + _meta + ) + + workitems_single_get_response_data_relationships_linked_revisions_obj = cls( + data=data, + meta=meta, + ) + + workitems_single_get_response_data_relationships_linked_revisions_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_linked_revisions_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_revisions_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_revisions_data_item.py new file mode 100644 index 00000000..c99e92aa --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_revisions_data_item.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_single_get_response_data_relationships_linked_revisions_data_item_type import ( + WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsDataItem", +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsDataItemType]): + id (Union[Unset, str]): Example: default/1234. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workitems_single_get_response_data_relationships_linked_revisions_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workitems_single_get_response_data_relationships_linked_revisions_data_item_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_linked_revisions_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_revisions_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_revisions_data_item_type.py new file mode 100644 index 00000000..68f4b62e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_revisions_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsDataItemType( + str, Enum +): + REVISIONS = "revisions" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_revisions_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_revisions_meta.py new file mode 100644 index 00000000..69d524e3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_revisions_meta.py @@ -0,0 +1,67 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsMeta" +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsLinkedRevisionsMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workitems_single_get_response_data_relationships_linked_revisions_meta_obj = cls( + total_count=total_count, + ) + + workitems_single_get_response_data_relationships_linked_revisions_meta_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_linked_revisions_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_work_items.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_work_items.py index 3a51c8b1..6240634c 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_work_items.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_work_items.py @@ -28,11 +28,10 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItems: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItemsDataItem']] - meta : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItemsMeta] - links : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItemsLinks] + Attributes: + data (Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItemsDataItem']]): + meta (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItemsMeta]): + links (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItemsLinks]): """ data: Union[ @@ -58,7 +57,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_work_items_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_work_items_data_item.py index 26ea2912..3c181729 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_work_items_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_work_items_data_item.py @@ -20,11 +20,10 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItemsDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItemsDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItemsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/parent/MyProjectId/MyLinkedWorkItemId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -43,6 +42,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_work_items_links.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_work_items_links.py index 62b76e24..aed15e18 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_work_items_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_work_items_links.py @@ -17,9 +17,9 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItemsLinks: """ - Attributes - ---------- - related : Union[Unset, str] + Attributes: + related (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/linkedworkitems?revision=1234. """ related: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_work_items_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_work_items_meta.py index 1a9c18bb..9f73f834 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_work_items_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_linked_work_items_meta.py @@ -16,9 +16,8 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsLinkedWorkItemsMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_module.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_module.py index 3e77da8d..f30c5640 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_module.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_module.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsModule: """ - Attributes - ---------- - data : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsModuleData] + Attributes: + data (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsModuleData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_module_data.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_module_data.py index 06193114..1fe51829 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_module_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_module_data.py @@ -17,11 +17,10 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsModuleData: """ - Attributes - ---------- - type : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsModuleDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsModuleDataType]): + id (Union[Unset, str]): Example: MyProjectId/MySpaceId/MyDocumentId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -39,6 +38,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_planned_in.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_planned_in.py index f46c87de..84c2ac78 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_planned_in.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_planned_in.py @@ -23,10 +23,9 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsPlannedIn: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsPlannedInDataItem']] - meta : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsPlannedInMeta] + Attributes: + data (Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsPlannedInDataItem']]): + meta (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsPlannedInMeta]): """ data: Union[ @@ -46,7 +45,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_planned_in_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_planned_in_data_item.py index a74e06fb..25afa04a 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_planned_in_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_planned_in_data_item.py @@ -19,11 +19,10 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsPlannedInDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsPlannedInDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsPlannedInDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyPlanId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_planned_in_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_planned_in_meta.py index 52a14789..8fea3e5c 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_planned_in_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_planned_in_meta.py @@ -16,9 +16,8 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsPlannedInMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_project.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_project.py index 044f4d1f..7b1f2ba7 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_project.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_project.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsProject: """ - Attributes - ---------- - data : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsProjectData] + Attributes: + data (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsProjectData]): """ data: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_project_data.py index 5d3a84d9..3407c331 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_project_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_project_data.py @@ -19,11 +19,10 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsProjectData: """ - Attributes - ---------- - type : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsProjectDataType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_test_steps.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_test_steps.py new file mode 100644 index 00000000..152f87b1 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_test_steps.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_single_get_response_data_relationships_test_steps_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsTestStepsDataItem, + ) + from ..models.workitems_single_get_response_data_relationships_test_steps_meta import ( + WorkitemsSingleGetResponseDataRelationshipsTestStepsMeta, + ) + + +T = TypeVar("T", bound="WorkitemsSingleGetResponseDataRelationshipsTestSteps") + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsTestSteps: + """ + Attributes: + data (Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsTestStepsDataItem']]): + meta (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsTestStepsMeta]): + """ + + data: Union[ + Unset, + List["WorkitemsSingleGetResponseDataRelationshipsTestStepsDataItem"], + ] = UNSET + meta: Union[ + Unset, "WorkitemsSingleGetResponseDataRelationshipsTestStepsMeta" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_single_get_response_data_relationships_test_steps_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsTestStepsDataItem, + ) + from ..models.workitems_single_get_response_data_relationships_test_steps_meta import ( + WorkitemsSingleGetResponseDataRelationshipsTestStepsMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsSingleGetResponseDataRelationshipsTestStepsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, WorkitemsSingleGetResponseDataRelationshipsTestStepsMeta + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkitemsSingleGetResponseDataRelationshipsTestStepsMeta.from_dict( + _meta + ) + + workitems_single_get_response_data_relationships_test_steps_obj = cls( + data=data, + meta=meta, + ) + + workitems_single_get_response_data_relationships_test_steps_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_test_steps_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_test_steps_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_test_steps_data_item.py new file mode 100644 index 00000000..ea0214c3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_test_steps_data_item.py @@ -0,0 +1,102 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_single_get_response_data_relationships_test_steps_data_item_type import ( + WorkitemsSingleGetResponseDataRelationshipsTestStepsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsSingleGetResponseDataRelationshipsTestStepsDataItem" +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsTestStepsDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsTestStepsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyTestStepIndex. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, WorkitemsSingleGetResponseDataRelationshipsTestStepsDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsTestStepsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsSingleGetResponseDataRelationshipsTestStepsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workitems_single_get_response_data_relationships_test_steps_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workitems_single_get_response_data_relationships_test_steps_data_item_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_test_steps_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_test_steps_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_test_steps_data_item_type.py new file mode 100644 index 00000000..db3f6f9d --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_test_steps_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsSingleGetResponseDataRelationshipsTestStepsDataItemType( + str, Enum +): + TESTSTEPS = "teststeps" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_test_steps_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_test_steps_meta.py new file mode 100644 index 00000000..68956e1f --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_test_steps_meta.py @@ -0,0 +1,67 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsSingleGetResponseDataRelationshipsTestStepsMeta" +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsTestStepsMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workitems_single_get_response_data_relationships_test_steps_meta_obj = cls( + total_count=total_count, + ) + + workitems_single_get_response_data_relationships_test_steps_meta_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_test_steps_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_votes.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_votes.py new file mode 100644 index 00000000..494b3a6c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_votes.py @@ -0,0 +1,119 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_single_get_response_data_relationships_votes_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsVotesDataItem, + ) + from ..models.workitems_single_get_response_data_relationships_votes_meta import ( + WorkitemsSingleGetResponseDataRelationshipsVotesMeta, + ) + + +T = TypeVar("T", bound="WorkitemsSingleGetResponseDataRelationshipsVotes") + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsVotes: + """ + Attributes: + data (Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsVotesDataItem']]): + meta (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsVotesMeta]): + """ + + data: Union[ + Unset, List["WorkitemsSingleGetResponseDataRelationshipsVotesDataItem"] + ] = UNSET + meta: Union[ + Unset, "WorkitemsSingleGetResponseDataRelationshipsVotesMeta" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_single_get_response_data_relationships_votes_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsVotesDataItem, + ) + from ..models.workitems_single_get_response_data_relationships_votes_meta import ( + WorkitemsSingleGetResponseDataRelationshipsVotesMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsSingleGetResponseDataRelationshipsVotesDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, WorkitemsSingleGetResponseDataRelationshipsVotesMeta + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = ( + WorkitemsSingleGetResponseDataRelationshipsVotesMeta.from_dict( + _meta + ) + ) + + workitems_single_get_response_data_relationships_votes_obj = cls( + data=data, + meta=meta, + ) + + workitems_single_get_response_data_relationships_votes_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_votes_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_votes_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_votes_data_item.py new file mode 100644 index 00000000..7a4fc012 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_votes_data_item.py @@ -0,0 +1,103 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_single_get_response_data_relationships_votes_data_item_type import ( + WorkitemsSingleGetResponseDataRelationshipsVotesDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsSingleGetResponseDataRelationshipsVotesDataItem" +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsVotesDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsVotesDataItemType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, WorkitemsSingleGetResponseDataRelationshipsVotesDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, WorkitemsSingleGetResponseDataRelationshipsVotesDataItemType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + WorkitemsSingleGetResponseDataRelationshipsVotesDataItemType( + _type + ) + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workitems_single_get_response_data_relationships_votes_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workitems_single_get_response_data_relationships_votes_data_item_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_votes_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_votes_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_votes_data_item_type.py new file mode 100644 index 00000000..d838e120 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_votes_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsSingleGetResponseDataRelationshipsVotesDataItemType(str, Enum): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_votes_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_votes_meta.py new file mode 100644 index 00000000..f0869524 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_votes_meta.py @@ -0,0 +1,65 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkitemsSingleGetResponseDataRelationshipsVotesMeta") + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsVotesMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workitems_single_get_response_data_relationships_votes_meta_obj = cls( + total_count=total_count, + ) + + workitems_single_get_response_data_relationships_votes_meta_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_votes_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_watches.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_watches.py index 236d0dbc..ccaf2529 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_watches.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_watches.py @@ -23,10 +23,9 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsWatches: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsWatchesDataItem']] - meta : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsWatchesMeta] + Attributes: + data (Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsWatchesDataItem']]): + meta (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsWatchesMeta]): """ data: Union[ @@ -46,7 +45,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) meta: Union[Unset, Dict[str, Any]] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_watches_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_watches_data_item.py index 1702686e..db3c492c 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_watches_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_watches_data_item.py @@ -19,11 +19,10 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsWatchesDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsSingleGetResponseDataRelationshipsWatchesDataItemType] - id : Union[Unset, str] - revision : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsWatchesDataItemType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. """ type: Union[ @@ -41,6 +40,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + revision = self.revision field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_watches_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_watches_meta.py index cfafb7b2..1a2a7c1e 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_watches_meta.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_watches_meta.py @@ -16,9 +16,8 @@ @_attrs_define class WorkitemsSingleGetResponseDataRelationshipsWatchesMeta: """ - Attributes - ---------- - total_count : Union[Unset, int] + Attributes: + total_count (Union[Unset, int]): """ total_count: Union[Unset, int] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_work_records.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_work_records.py new file mode 100644 index 00000000..43460165 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_work_records.py @@ -0,0 +1,124 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_single_get_response_data_relationships_work_records_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsWorkRecordsDataItem, + ) + from ..models.workitems_single_get_response_data_relationships_work_records_meta import ( + WorkitemsSingleGetResponseDataRelationshipsWorkRecordsMeta, + ) + + +T = TypeVar( + "T", bound="WorkitemsSingleGetResponseDataRelationshipsWorkRecords" +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsWorkRecords: + """ + Attributes: + data (Union[Unset, List['WorkitemsSingleGetResponseDataRelationshipsWorkRecordsDataItem']]): + meta (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsWorkRecordsMeta]): + """ + + data: Union[ + Unset, + List["WorkitemsSingleGetResponseDataRelationshipsWorkRecordsDataItem"], + ] = UNSET + meta: Union[ + Unset, "WorkitemsSingleGetResponseDataRelationshipsWorkRecordsMeta" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_single_get_response_data_relationships_work_records_data_item import ( + WorkitemsSingleGetResponseDataRelationshipsWorkRecordsDataItem, + ) + from ..models.workitems_single_get_response_data_relationships_work_records_meta import ( + WorkitemsSingleGetResponseDataRelationshipsWorkRecordsMeta, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsSingleGetResponseDataRelationshipsWorkRecordsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Union[ + Unset, WorkitemsSingleGetResponseDataRelationshipsWorkRecordsMeta + ] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkitemsSingleGetResponseDataRelationshipsWorkRecordsMeta.from_dict( + _meta + ) + + workitems_single_get_response_data_relationships_work_records_obj = ( + cls( + data=data, + meta=meta, + ) + ) + + workitems_single_get_response_data_relationships_work_records_obj.additional_properties = ( + d + ) + return ( + workitems_single_get_response_data_relationships_work_records_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_work_records_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_work_records_data_item.py new file mode 100644 index 00000000..6795dc7a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_work_records_data_item.py @@ -0,0 +1,103 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_single_get_response_data_relationships_work_records_data_item_type import ( + WorkitemsSingleGetResponseDataRelationshipsWorkRecordsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsSingleGetResponseDataRelationshipsWorkRecordsDataItem" +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsWorkRecordsDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsSingleGetResponseDataRelationshipsWorkRecordsDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyWorkRecordId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsWorkRecordsDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsSingleGetResponseDataRelationshipsWorkRecordsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsSingleGetResponseDataRelationshipsWorkRecordsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workitems_single_get_response_data_relationships_work_records_data_item_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workitems_single_get_response_data_relationships_work_records_data_item_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_work_records_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_work_records_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_work_records_data_item_type.py new file mode 100644 index 00000000..fdd618be --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_work_records_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsSingleGetResponseDataRelationshipsWorkRecordsDataItemType( + str, Enum +): + WORKRECORDS = "workrecords" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_work_records_meta.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_work_records_meta.py new file mode 100644 index 00000000..32ceadbb --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_data_relationships_work_records_meta.py @@ -0,0 +1,67 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsSingleGetResponseDataRelationshipsWorkRecordsMeta" +) + + +@_attrs_define +class WorkitemsSingleGetResponseDataRelationshipsWorkRecordsMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workitems_single_get_response_data_relationships_work_records_meta_obj = cls( + total_count=total_count, + ) + + workitems_single_get_response_data_relationships_work_records_meta_obj.additional_properties = ( + d + ) + return workitems_single_get_response_data_relationships_work_records_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_links.py index 8eb75c34..01a1d038 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_links.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_get_response_links.py @@ -14,9 +14,9 @@ @_attrs_define class WorkitemsSingleGetResponseLinks: """ - Attributes - ---------- - self_ : Union[Unset, str] + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId?revision=1234. """ self_: Union[Unset, str] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request.py b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request.py index 589f53e8..d6f82b09 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemsSinglePatchRequest: """ - Attributes - ---------- - data : Union[Unset, WorkitemsSinglePatchRequestData] + Attributes: + data (Union[Unset, WorkitemsSinglePatchRequestData]): """ data: Union[Unset, "WorkitemsSinglePatchRequestData"] = UNSET diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data.py b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data.py index 88a5fdae..ca2cbacc 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data.py @@ -26,12 +26,11 @@ @_attrs_define class WorkitemsSinglePatchRequestData: """ - Attributes - ---------- - type : Union[Unset, WorkitemsSinglePatchRequestDataType] - id : Union[Unset, str] - attributes : Union[Unset, WorkitemsSinglePatchRequestDataAttributes] - relationships : Union[Unset, WorkitemsSinglePatchRequestDataRelationships] + Attributes: + type (Union[Unset, WorkitemsSinglePatchRequestDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId. + attributes (Union[Unset, WorkitemsSinglePatchRequestDataAttributes]): + relationships (Union[Unset, WorkitemsSinglePatchRequestDataRelationships]): """ type: Union[Unset, WorkitemsSinglePatchRequestDataType] = UNSET @@ -52,6 +51,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id + attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_attributes.py b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_attributes.py index ae3046c8..b68da3f8 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_attributes.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_attributes.py @@ -25,20 +25,19 @@ @_attrs_define class WorkitemsSinglePatchRequestDataAttributes: """ - Attributes - ---------- - description : Union[Unset, WorkitemsSinglePatchRequestDataAttributesDescription] - due_date : Union[Unset, datetime.date] - hyperlinks : Union[Unset, List['WorkitemsSinglePatchRequestDataAttributesHyperlinksItem']] - initial_estimate : Union[Unset, str] - priority : Union[Unset, str] - remaining_estimate : Union[Unset, str] - resolution : Union[Unset, str] - resolved_on : Union[Unset, datetime.datetime] - severity : Union[Unset, str] - status : Union[Unset, str] - time_spent : Union[Unset, str] - title : Union[Unset, str] + Attributes: + description (Union[Unset, WorkitemsSinglePatchRequestDataAttributesDescription]): + due_date (Union[Unset, datetime.date]): Example: 1970-01-01. + hyperlinks (Union[Unset, List['WorkitemsSinglePatchRequestDataAttributesHyperlinksItem']]): + initial_estimate (Union[Unset, str]): Example: 5 1/2d. + priority (Union[Unset, str]): Example: 90.0. + remaining_estimate (Union[Unset, str]): Example: 5 1/2d. + resolution (Union[Unset, str]): Example: done. + resolved_on (Union[Unset, datetime.datetime]): Example: 1970-01-01T00:00:00Z. + severity (Union[Unset, str]): Example: blocker. + status (Union[Unset, str]): Example: open. + time_spent (Union[Unset, str]): Example: 5 1/2d. + title (Union[Unset, str]): Example: Title. """ description: Union[ @@ -75,20 +74,26 @@ def to_dict(self) -> Dict[str, Any]: hyperlinks = [] for hyperlinks_item_data in self.hyperlinks: hyperlinks_item = hyperlinks_item_data.to_dict() - hyperlinks.append(hyperlinks_item) initial_estimate = self.initial_estimate + priority = self.priority + remaining_estimate = self.remaining_estimate + resolution = self.resolution + resolved_on: Union[Unset, str] = UNSET if not isinstance(self.resolved_on, Unset): resolved_on = self.resolved_on.isoformat() severity = self.severity + status = self.status + time_spent = self.time_spent + title = self.title field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_attributes_description.py b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_attributes_description.py index dbdcd071..8ac87108 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_attributes_description.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_attributes_description.py @@ -17,10 +17,9 @@ @_attrs_define class WorkitemsSinglePatchRequestDataAttributesDescription: """ - Attributes - ---------- - type : Union[Unset, WorkitemsSinglePatchRequestDataAttributesDescriptionType] - value : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsSinglePatchRequestDataAttributesDescriptionType]): + value (Union[Unset, str]): Example: My text value. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_attributes_hyperlinks_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_attributes_hyperlinks_item.py index 65412a72..878ceece 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_attributes_hyperlinks_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_attributes_hyperlinks_item.py @@ -16,10 +16,9 @@ @_attrs_define class WorkitemsSinglePatchRequestDataAttributesHyperlinksItem: """ - Attributes - ---------- - role : Union[Unset, str] - uri : Union[Unset, str] + Attributes: + role (Union[Unset, str]): Example: ref_ext. + uri (Union[Unset, str]): Example: https://polarion.plm.automation.siemens.com. """ role: Union[Unset, str] = UNSET @@ -30,6 +29,7 @@ class WorkitemsSinglePatchRequestDataAttributesHyperlinksItem: def to_dict(self) -> Dict[str, Any]: role = self.role + uri = self.uri field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships.py b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships.py index f155133e..0fc1cf03 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships.py @@ -15,6 +15,12 @@ from ..models.workitems_single_patch_request_data_relationships_categories import ( WorkitemsSinglePatchRequestDataRelationshipsCategories, ) + from ..models.workitems_single_patch_request_data_relationships_linked_revisions import ( + WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisions, + ) + from ..models.workitems_single_patch_request_data_relationships_votes import ( + WorkitemsSinglePatchRequestDataRelationshipsVotes, + ) from ..models.workitems_single_patch_request_data_relationships_watches import ( WorkitemsSinglePatchRequestDataRelationshipsWatches, ) @@ -26,11 +32,12 @@ @_attrs_define class WorkitemsSinglePatchRequestDataRelationships: """ - Attributes - ---------- - assignee : Union[Unset, WorkitemsSinglePatchRequestDataRelationshipsAssignee] - categories : Union[Unset, WorkitemsSinglePatchRequestDataRelationshipsCategories] - watches : Union[Unset, WorkitemsSinglePatchRequestDataRelationshipsWatches] + Attributes: + assignee (Union[Unset, WorkitemsSinglePatchRequestDataRelationshipsAssignee]): + categories (Union[Unset, WorkitemsSinglePatchRequestDataRelationshipsCategories]): + linked_revisions (Union[Unset, WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisions]): + votes (Union[Unset, WorkitemsSinglePatchRequestDataRelationshipsVotes]): + watches (Union[Unset, WorkitemsSinglePatchRequestDataRelationshipsWatches]): """ assignee: Union[ @@ -39,6 +46,12 @@ class WorkitemsSinglePatchRequestDataRelationships: categories: Union[ Unset, "WorkitemsSinglePatchRequestDataRelationshipsCategories" ] = UNSET + linked_revisions: Union[ + Unset, "WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisions" + ] = UNSET + votes: Union[ + Unset, "WorkitemsSinglePatchRequestDataRelationshipsVotes" + ] = UNSET watches: Union[ Unset, "WorkitemsSinglePatchRequestDataRelationshipsWatches" ] = UNSET @@ -55,6 +68,14 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.categories, Unset): categories = self.categories.to_dict() + linked_revisions: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.linked_revisions, Unset): + linked_revisions = self.linked_revisions.to_dict() + + votes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.votes, Unset): + votes = self.votes.to_dict() + watches: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.watches, Unset): watches = self.watches.to_dict() @@ -66,6 +87,10 @@ def to_dict(self) -> Dict[str, Any]: field_dict["assignee"] = assignee if categories is not UNSET: field_dict["categories"] = categories + if linked_revisions is not UNSET: + field_dict["linkedRevisions"] = linked_revisions + if votes is not UNSET: + field_dict["votes"] = votes if watches is not UNSET: field_dict["watches"] = watches @@ -79,6 +104,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.workitems_single_patch_request_data_relationships_categories import ( WorkitemsSinglePatchRequestDataRelationshipsCategories, ) + from ..models.workitems_single_patch_request_data_relationships_linked_revisions import ( + WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisions, + ) + from ..models.workitems_single_patch_request_data_relationships_votes import ( + WorkitemsSinglePatchRequestDataRelationshipsVotes, + ) from ..models.workitems_single_patch_request_data_relationships_watches import ( WorkitemsSinglePatchRequestDataRelationshipsWatches, ) @@ -108,6 +139,28 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: _categories ) + _linked_revisions = d.pop("linkedRevisions", UNSET) + linked_revisions: Union[ + Unset, WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisions + ] + if isinstance(_linked_revisions, Unset): + linked_revisions = UNSET + else: + linked_revisions = WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisions.from_dict( + _linked_revisions + ) + + _votes = d.pop("votes", UNSET) + votes: Union[Unset, WorkitemsSinglePatchRequestDataRelationshipsVotes] + if isinstance(_votes, Unset): + votes = UNSET + else: + votes = ( + WorkitemsSinglePatchRequestDataRelationshipsVotes.from_dict( + _votes + ) + ) + _watches = d.pop("watches", UNSET) watches: Union[ Unset, WorkitemsSinglePatchRequestDataRelationshipsWatches @@ -124,6 +177,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: workitems_single_patch_request_data_relationships_obj = cls( assignee=assignee, categories=categories, + linked_revisions=linked_revisions, + votes=votes, watches=watches, ) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_assignee.py b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_assignee.py index 7f9fa133..86ba2cea 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_assignee.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_assignee.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemsSinglePatchRequestDataRelationshipsAssignee: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsSinglePatchRequestDataRelationshipsAssigneeDataItem']] + Attributes: + data (Union[Unset, List['WorkitemsSinglePatchRequestDataRelationshipsAssigneeDataItem']]): """ data: Union[ @@ -39,7 +38,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_assignee_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_assignee_data_item.py index 6220ec0e..bca368cf 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_assignee_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_assignee_data_item.py @@ -19,10 +19,9 @@ @_attrs_define class WorkitemsSinglePatchRequestDataRelationshipsAssigneeDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsSinglePatchRequestDataRelationshipsAssigneeDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsSinglePatchRequestDataRelationshipsAssigneeDataItemType]): + id (Union[Unset, str]): Example: MyUserId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_categories.py b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_categories.py index 22414f3c..c10b2e57 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_categories.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_categories.py @@ -22,9 +22,8 @@ @_attrs_define class WorkitemsSinglePatchRequestDataRelationshipsCategories: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsSinglePatchRequestDataRelationshipsCategoriesDataItem']] + Attributes: + data (Union[Unset, List['WorkitemsSinglePatchRequestDataRelationshipsCategoriesDataItem']]): """ data: Union[ @@ -41,7 +40,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_categories_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_categories_data_item.py index 8a1449b9..00020d84 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_categories_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_categories_data_item.py @@ -19,10 +19,9 @@ @_attrs_define class WorkitemsSinglePatchRequestDataRelationshipsCategoriesDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsSinglePatchRequestDataRelationshipsCategoriesDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsSinglePatchRequestDataRelationshipsCategoriesDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyCategoryId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_linked_revisions.py b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_linked_revisions.py new file mode 100644 index 00000000..1d1b9c91 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_linked_revisions.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_single_patch_request_data_relationships_linked_revisions_data_item import ( + WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisionsDataItem, + ) + + +T = TypeVar( + "T", bound="WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisions" +) + + +@_attrs_define +class WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisions: + """ + Attributes: + data (Union[Unset, List['WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisionsDataItem']]): + """ + + data: Union[ + Unset, + List[ + "WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisionsDataItem" + ], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_single_patch_request_data_relationships_linked_revisions_data_item import ( + WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisionsDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisionsDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + workitems_single_patch_request_data_relationships_linked_revisions_obj = cls( + data=data, + ) + + workitems_single_patch_request_data_relationships_linked_revisions_obj.additional_properties = ( + d + ) + return workitems_single_patch_request_data_relationships_linked_revisions_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_linked_revisions_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_linked_revisions_data_item.py new file mode 100644 index 00000000..29cf2cd0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_linked_revisions_data_item.py @@ -0,0 +1,95 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_single_patch_request_data_relationships_linked_revisions_data_item_type import ( + WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisionsDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisionsDataItem", +) + + +@_attrs_define +class WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisionsDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisionsDataItemType]): + id (Union[Unset, str]): Example: default/1234. + """ + + type: Union[ + Unset, + WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisionsDataItemType, + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisionsDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisionsDataItemType( + _type + ) + + id = d.pop("id", UNSET) + + workitems_single_patch_request_data_relationships_linked_revisions_data_item_obj = cls( + type=type, + id=id, + ) + + workitems_single_patch_request_data_relationships_linked_revisions_data_item_obj.additional_properties = ( + d + ) + return workitems_single_patch_request_data_relationships_linked_revisions_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_linked_revisions_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_linked_revisions_data_item_type.py new file mode 100644 index 00000000..f6997019 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_linked_revisions_data_item_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsSinglePatchRequestDataRelationshipsLinkedRevisionsDataItemType( + str, Enum +): + REVISIONS = "revisions" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_votes.py b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_votes.py new file mode 100644 index 00000000..97fa5dbc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_votes.py @@ -0,0 +1,90 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workitems_single_patch_request_data_relationships_votes_data_item import ( + WorkitemsSinglePatchRequestDataRelationshipsVotesDataItem, + ) + + +T = TypeVar("T", bound="WorkitemsSinglePatchRequestDataRelationshipsVotes") + + +@_attrs_define +class WorkitemsSinglePatchRequestDataRelationshipsVotes: + """ + Attributes: + data (Union[Unset, List['WorkitemsSinglePatchRequestDataRelationshipsVotesDataItem']]): + """ + + data: Union[ + Unset, + List["WorkitemsSinglePatchRequestDataRelationshipsVotesDataItem"], + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workitems_single_patch_request_data_relationships_votes_data_item import ( + WorkitemsSinglePatchRequestDataRelationshipsVotesDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkitemsSinglePatchRequestDataRelationshipsVotesDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + workitems_single_patch_request_data_relationships_votes_obj = cls( + data=data, + ) + + workitems_single_patch_request_data_relationships_votes_obj.additional_properties = ( + d + ) + return workitems_single_patch_request_data_relationships_votes_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_votes_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_votes_data_item.py new file mode 100644 index 00000000..31b29901 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_votes_data_item.py @@ -0,0 +1,95 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workitems_single_patch_request_data_relationships_votes_data_item_type import ( + WorkitemsSinglePatchRequestDataRelationshipsVotesDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkitemsSinglePatchRequestDataRelationshipsVotesDataItem" +) + + +@_attrs_define +class WorkitemsSinglePatchRequestDataRelationshipsVotesDataItem: + """ + Attributes: + type (Union[Unset, WorkitemsSinglePatchRequestDataRelationshipsVotesDataItemType]): + id (Union[Unset, str]): Example: MyUserId. + """ + + type: Union[ + Unset, WorkitemsSinglePatchRequestDataRelationshipsVotesDataItemType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkitemsSinglePatchRequestDataRelationshipsVotesDataItemType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + WorkitemsSinglePatchRequestDataRelationshipsVotesDataItemType( + _type + ) + ) + + id = d.pop("id", UNSET) + + workitems_single_patch_request_data_relationships_votes_data_item_obj = cls( + type=type, + id=id, + ) + + workitems_single_patch_request_data_relationships_votes_data_item_obj.additional_properties = ( + d + ) + return workitems_single_patch_request_data_relationships_votes_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_votes_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_votes_data_item_type.py new file mode 100644 index 00000000..c0b28498 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_votes_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkitemsSinglePatchRequestDataRelationshipsVotesDataItemType(str, Enum): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_watches.py b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_watches.py index 667d3943..600f5709 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_watches.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_watches.py @@ -20,9 +20,8 @@ @_attrs_define class WorkitemsSinglePatchRequestDataRelationshipsWatches: """ - Attributes - ---------- - data : Union[Unset, List['WorkitemsSinglePatchRequestDataRelationshipsWatchesDataItem']] + Attributes: + data (Union[Unset, List['WorkitemsSinglePatchRequestDataRelationshipsWatchesDataItem']]): """ data: Union[ @@ -39,7 +38,6 @@ def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() - data.append(data_item) field_dict: Dict[str, Any] = {} diff --git a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_watches_data_item.py b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_watches_data_item.py index 9c35fed8..bda71ef3 100644 --- a/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_watches_data_item.py +++ b/polarion_rest_api_client/open_api_client/models/workitems_single_patch_request_data_relationships_watches_data_item.py @@ -19,10 +19,9 @@ @_attrs_define class WorkitemsSinglePatchRequestDataRelationshipsWatchesDataItem: """ - Attributes - ---------- - type : Union[Unset, WorkitemsSinglePatchRequestDataRelationshipsWatchesDataItemType] - id : Union[Unset, str] + Attributes: + type (Union[Unset, WorkitemsSinglePatchRequestDataRelationshipsWatchesDataItemType]): + id (Union[Unset, str]): Example: MyUserId. """ type: Union[ diff --git a/polarion_rest_api_client/open_api_client/models/workrecords_list_delete_request.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_delete_request.py new file mode 100644 index 00000000..ed6d0a34 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_delete_request.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_list_delete_request_data_item import ( + WorkrecordsListDeleteRequestDataItem, + ) + + +T = TypeVar("T", bound="WorkrecordsListDeleteRequest") + + +@_attrs_define +class WorkrecordsListDeleteRequest: + """ + Attributes: + data (Union[Unset, List['WorkrecordsListDeleteRequestDataItem']]): + """ + + data: Union[Unset, List["WorkrecordsListDeleteRequestDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_list_delete_request_data_item import ( + WorkrecordsListDeleteRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkrecordsListDeleteRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + workrecords_list_delete_request_obj = cls( + data=data, + ) + + workrecords_list_delete_request_obj.additional_properties = d + return workrecords_list_delete_request_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_delete_request_data_item.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_delete_request_data_item.py new file mode 100644 index 00000000..93a1d105 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_delete_request_data_item.py @@ -0,0 +1,82 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workrecords_list_delete_request_data_item_type import ( + WorkrecordsListDeleteRequestDataItemType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkrecordsListDeleteRequestDataItem") + + +@_attrs_define +class WorkrecordsListDeleteRequestDataItem: + """ + Attributes: + type (Union[Unset, WorkrecordsListDeleteRequestDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyWorkRecordId. + """ + + type: Union[Unset, WorkrecordsListDeleteRequestDataItemType] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, WorkrecordsListDeleteRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkrecordsListDeleteRequestDataItemType(_type) + + id = d.pop("id", UNSET) + + workrecords_list_delete_request_data_item_obj = cls( + type=type, + id=id, + ) + + workrecords_list_delete_request_data_item_obj.additional_properties = d + return workrecords_list_delete_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_delete_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_delete_request_data_item_type.py new file mode 100644 index 00000000..8d596449 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_delete_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkrecordsListDeleteRequestDataItemType(str, Enum): + WORKRECORDS = "workrecords" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response.py new file mode 100644 index 00000000..bc766be8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response.py @@ -0,0 +1,160 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_list_get_response_data_item import ( + WorkrecordsListGetResponseDataItem, + ) + from ..models.workrecords_list_get_response_included_item import ( + WorkrecordsListGetResponseIncludedItem, + ) + from ..models.workrecords_list_get_response_links import ( + WorkrecordsListGetResponseLinks, + ) + from ..models.workrecords_list_get_response_meta import ( + WorkrecordsListGetResponseMeta, + ) + + +T = TypeVar("T", bound="WorkrecordsListGetResponse") + + +@_attrs_define +class WorkrecordsListGetResponse: + """ + Attributes: + meta (Union[Unset, WorkrecordsListGetResponseMeta]): + data (Union[Unset, List['WorkrecordsListGetResponseDataItem']]): + included (Union[Unset, List['WorkrecordsListGetResponseIncludedItem']]): Related entities might be returned, see + Rest API + User Guide. + links (Union[Unset, WorkrecordsListGetResponseLinks]): + """ + + meta: Union[Unset, "WorkrecordsListGetResponseMeta"] = UNSET + data: Union[Unset, List["WorkrecordsListGetResponseDataItem"]] = UNSET + included: Union[ + Unset, List["WorkrecordsListGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "WorkrecordsListGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if meta is not UNSET: + field_dict["meta"] = meta + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_list_get_response_data_item import ( + WorkrecordsListGetResponseDataItem, + ) + from ..models.workrecords_list_get_response_included_item import ( + WorkrecordsListGetResponseIncludedItem, + ) + from ..models.workrecords_list_get_response_links import ( + WorkrecordsListGetResponseLinks, + ) + from ..models.workrecords_list_get_response_meta import ( + WorkrecordsListGetResponseMeta, + ) + + d = src_dict.copy() + _meta = d.pop("meta", UNSET) + meta: Union[Unset, WorkrecordsListGetResponseMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkrecordsListGetResponseMeta.from_dict(_meta) + + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkrecordsListGetResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = WorkrecordsListGetResponseIncludedItem.from_dict( + included_item_data + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, WorkrecordsListGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = WorkrecordsListGetResponseLinks.from_dict(_links) + + workrecords_list_get_response_obj = cls( + meta=meta, + data=data, + included=included, + links=links, + ) + + workrecords_list_get_response_obj.additional_properties = d + return workrecords_list_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item.py new file mode 100644 index 00000000..49288b4c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item.py @@ -0,0 +1,197 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workrecords_list_get_response_data_item_type import ( + WorkrecordsListGetResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_list_get_response_data_item_attributes import ( + WorkrecordsListGetResponseDataItemAttributes, + ) + from ..models.workrecords_list_get_response_data_item_links import ( + WorkrecordsListGetResponseDataItemLinks, + ) + from ..models.workrecords_list_get_response_data_item_meta import ( + WorkrecordsListGetResponseDataItemMeta, + ) + from ..models.workrecords_list_get_response_data_item_relationships import ( + WorkrecordsListGetResponseDataItemRelationships, + ) + + +T = TypeVar("T", bound="WorkrecordsListGetResponseDataItem") + + +@_attrs_define +class WorkrecordsListGetResponseDataItem: + """ + Attributes: + type (Union[Unset, WorkrecordsListGetResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyWorkRecordId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, WorkrecordsListGetResponseDataItemAttributes]): + relationships (Union[Unset, WorkrecordsListGetResponseDataItemRelationships]): + meta (Union[Unset, WorkrecordsListGetResponseDataItemMeta]): + links (Union[Unset, WorkrecordsListGetResponseDataItemLinks]): + """ + + type: Union[Unset, WorkrecordsListGetResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "WorkrecordsListGetResponseDataItemAttributes" + ] = UNSET + relationships: Union[ + Unset, "WorkrecordsListGetResponseDataItemRelationships" + ] = UNSET + meta: Union[Unset, "WorkrecordsListGetResponseDataItemMeta"] = UNSET + links: Union[Unset, "WorkrecordsListGetResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_list_get_response_data_item_attributes import ( + WorkrecordsListGetResponseDataItemAttributes, + ) + from ..models.workrecords_list_get_response_data_item_links import ( + WorkrecordsListGetResponseDataItemLinks, + ) + from ..models.workrecords_list_get_response_data_item_meta import ( + WorkrecordsListGetResponseDataItemMeta, + ) + from ..models.workrecords_list_get_response_data_item_relationships import ( + WorkrecordsListGetResponseDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, WorkrecordsListGetResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkrecordsListGetResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, WorkrecordsListGetResponseDataItemAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + WorkrecordsListGetResponseDataItemAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, WorkrecordsListGetResponseDataItemRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + WorkrecordsListGetResponseDataItemRelationships.from_dict( + _relationships + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, WorkrecordsListGetResponseDataItemMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkrecordsListGetResponseDataItemMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, WorkrecordsListGetResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = WorkrecordsListGetResponseDataItemLinks.from_dict(_links) + + workrecords_list_get_response_data_item_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + workrecords_list_get_response_data_item_obj.additional_properties = d + return workrecords_list_get_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_attributes.py new file mode 100644 index 00000000..10f62b02 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_attributes.py @@ -0,0 +1,110 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkrecordsListGetResponseDataItemAttributes") + + +@_attrs_define +class WorkrecordsListGetResponseDataItemAttributes: + """ + Attributes: + comment (Union[Unset, str]): Example: Comment. + date (Union[Unset, datetime.date]): Example: 1970-01-01. + id (Union[Unset, str]): + time_spent (Union[Unset, str]): Example: 5 1/2d. + type (Union[Unset, str]): Example: task. + """ + + comment: Union[Unset, str] = UNSET + date: Union[Unset, datetime.date] = UNSET + id: Union[Unset, str] = UNSET + time_spent: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + comment = self.comment + + date: Union[Unset, str] = UNSET + if not isinstance(self.date, Unset): + date = self.date.isoformat() + + id = self.id + + time_spent = self.time_spent + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if comment is not UNSET: + field_dict["comment"] = comment + if date is not UNSET: + field_dict["date"] = date + if id is not UNSET: + field_dict["id"] = id + if time_spent is not UNSET: + field_dict["timeSpent"] = time_spent + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + comment = d.pop("comment", UNSET) + + _date = d.pop("date", UNSET) + date: Union[Unset, datetime.date] + if isinstance(_date, Unset): + date = UNSET + else: + date = isoparse(_date).date() + + id = d.pop("id", UNSET) + + time_spent = d.pop("timeSpent", UNSET) + + type = d.pop("type", UNSET) + + workrecords_list_get_response_data_item_attributes_obj = cls( + comment=comment, + date=date, + id=id, + time_spent=time_spent, + type=type, + ) + + workrecords_list_get_response_data_item_attributes_obj.additional_properties = ( + d + ) + return workrecords_list_get_response_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_links.py new file mode 100644 index 00000000..ebb5be22 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkrecordsListGetResponseDataItemLinks") + + +@_attrs_define +class WorkrecordsListGetResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/workrecords/MyWorkRecordId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + workrecords_list_get_response_data_item_links_obj = cls( + self_=self_, + ) + + workrecords_list_get_response_data_item_links_obj.additional_properties = ( + d + ) + return workrecords_list_get_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_meta.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_meta.py new file mode 100644 index 00000000..7c042f07 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_meta.py @@ -0,0 +1,91 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_list_get_response_data_item_meta_errors_item import ( + WorkrecordsListGetResponseDataItemMetaErrorsItem, + ) + + +T = TypeVar("T", bound="WorkrecordsListGetResponseDataItemMeta") + + +@_attrs_define +class WorkrecordsListGetResponseDataItemMeta: + """ + Attributes: + errors (Union[Unset, List['WorkrecordsListGetResponseDataItemMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["WorkrecordsListGetResponseDataItemMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_list_get_response_data_item_meta_errors_item import ( + WorkrecordsListGetResponseDataItemMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ( + WorkrecordsListGetResponseDataItemMetaErrorsItem.from_dict( + errors_item_data + ) + ) + + errors.append(errors_item) + + workrecords_list_get_response_data_item_meta_obj = cls( + errors=errors, + ) + + workrecords_list_get_response_data_item_meta_obj.additional_properties = ( + d + ) + return workrecords_list_get_response_data_item_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_meta_errors_item.py new file mode 100644 index 00000000..606ab1ae --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_meta_errors_item.py @@ -0,0 +1,116 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_list_get_response_data_item_meta_errors_item_source import ( + WorkrecordsListGetResponseDataItemMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="WorkrecordsListGetResponseDataItemMetaErrorsItem") + + +@_attrs_define +class WorkrecordsListGetResponseDataItemMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, WorkrecordsListGetResponseDataItemMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "WorkrecordsListGetResponseDataItemMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_list_get_response_data_item_meta_errors_item_source import ( + WorkrecordsListGetResponseDataItemMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, WorkrecordsListGetResponseDataItemMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = WorkrecordsListGetResponseDataItemMetaErrorsItemSource.from_dict( + _source + ) + + workrecords_list_get_response_data_item_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + workrecords_list_get_response_data_item_meta_errors_item_obj.additional_properties = ( + d + ) + return workrecords_list_get_response_data_item_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_meta_errors_item_source.py new file mode 100644 index 00000000..804653b0 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_meta_errors_item_source.py @@ -0,0 +1,114 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_list_get_response_data_item_meta_errors_item_source_resource import ( + WorkrecordsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + +T = TypeVar( + "T", bound="WorkrecordsListGetResponseDataItemMetaErrorsItemSource" +) + + +@_attrs_define +class WorkrecordsListGetResponseDataItemMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, WorkrecordsListGetResponseDataItemMetaErrorsItemSourceResource]): Resource causing the + error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "WorkrecordsListGetResponseDataItemMetaErrorsItemSourceResource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_list_get_response_data_item_meta_errors_item_source_resource import ( + WorkrecordsListGetResponseDataItemMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, + WorkrecordsListGetResponseDataItemMetaErrorsItemSourceResource, + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = WorkrecordsListGetResponseDataItemMetaErrorsItemSourceResource.from_dict( + _resource + ) + + workrecords_list_get_response_data_item_meta_errors_item_source_obj = ( + cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + ) + + workrecords_list_get_response_data_item_meta_errors_item_source_obj.additional_properties = ( + d + ) + return ( + workrecords_list_get_response_data_item_meta_errors_item_source_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_meta_errors_item_source_resource.py new file mode 100644 index 00000000..cabe3eae --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkrecordsListGetResponseDataItemMetaErrorsItemSourceResource" +) + + +@_attrs_define +class WorkrecordsListGetResponseDataItemMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + workrecords_list_get_response_data_item_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + workrecords_list_get_response_data_item_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return workrecords_list_get_response_data_item_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships.py new file mode 100644 index 00000000..6c27a74e --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships.py @@ -0,0 +1,116 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_list_get_response_data_item_relationships_project import ( + WorkrecordsListGetResponseDataItemRelationshipsProject, + ) + from ..models.workrecords_list_get_response_data_item_relationships_user import ( + WorkrecordsListGetResponseDataItemRelationshipsUser, + ) + + +T = TypeVar("T", bound="WorkrecordsListGetResponseDataItemRelationships") + + +@_attrs_define +class WorkrecordsListGetResponseDataItemRelationships: + """ + Attributes: + project (Union[Unset, WorkrecordsListGetResponseDataItemRelationshipsProject]): + user (Union[Unset, WorkrecordsListGetResponseDataItemRelationshipsUser]): + """ + + project: Union[ + Unset, "WorkrecordsListGetResponseDataItemRelationshipsProject" + ] = UNSET + user: Union[ + Unset, "WorkrecordsListGetResponseDataItemRelationshipsUser" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + project: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project, Unset): + project = self.project.to_dict() + + user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.user, Unset): + user = self.user.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if project is not UNSET: + field_dict["project"] = project + if user is not UNSET: + field_dict["user"] = user + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_list_get_response_data_item_relationships_project import ( + WorkrecordsListGetResponseDataItemRelationshipsProject, + ) + from ..models.workrecords_list_get_response_data_item_relationships_user import ( + WorkrecordsListGetResponseDataItemRelationshipsUser, + ) + + d = src_dict.copy() + _project = d.pop("project", UNSET) + project: Union[ + Unset, WorkrecordsListGetResponseDataItemRelationshipsProject + ] + if isinstance(_project, Unset): + project = UNSET + else: + project = WorkrecordsListGetResponseDataItemRelationshipsProject.from_dict( + _project + ) + + _user = d.pop("user", UNSET) + user: Union[Unset, WorkrecordsListGetResponseDataItemRelationshipsUser] + if isinstance(_user, Unset): + user = UNSET + else: + user = ( + WorkrecordsListGetResponseDataItemRelationshipsUser.from_dict( + _user + ) + ) + + workrecords_list_get_response_data_item_relationships_obj = cls( + project=project, + user=user, + ) + + workrecords_list_get_response_data_item_relationships_obj.additional_properties = ( + d + ) + return workrecords_list_get_response_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_project.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_project.py new file mode 100644 index 00000000..da703d01 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_project.py @@ -0,0 +1,94 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_list_get_response_data_item_relationships_project_data import ( + WorkrecordsListGetResponseDataItemRelationshipsProjectData, + ) + + +T = TypeVar( + "T", bound="WorkrecordsListGetResponseDataItemRelationshipsProject" +) + + +@_attrs_define +class WorkrecordsListGetResponseDataItemRelationshipsProject: + """ + Attributes: + data (Union[Unset, WorkrecordsListGetResponseDataItemRelationshipsProjectData]): + """ + + data: Union[ + Unset, "WorkrecordsListGetResponseDataItemRelationshipsProjectData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_list_get_response_data_item_relationships_project_data import ( + WorkrecordsListGetResponseDataItemRelationshipsProjectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, WorkrecordsListGetResponseDataItemRelationshipsProjectData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = WorkrecordsListGetResponseDataItemRelationshipsProjectData.from_dict( + _data + ) + + workrecords_list_get_response_data_item_relationships_project_obj = ( + cls( + data=data, + ) + ) + + workrecords_list_get_response_data_item_relationships_project_obj.additional_properties = ( + d + ) + return ( + workrecords_list_get_response_data_item_relationships_project_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_project_data.py new file mode 100644 index 00000000..0b8f51cd --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_project_data.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workrecords_list_get_response_data_item_relationships_project_data_type import ( + WorkrecordsListGetResponseDataItemRelationshipsProjectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkrecordsListGetResponseDataItemRelationshipsProjectData" +) + + +@_attrs_define +class WorkrecordsListGetResponseDataItemRelationshipsProjectData: + """ + Attributes: + type (Union[Unset, WorkrecordsListGetResponseDataItemRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, WorkrecordsListGetResponseDataItemRelationshipsProjectDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, + WorkrecordsListGetResponseDataItemRelationshipsProjectDataType, + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + WorkrecordsListGetResponseDataItemRelationshipsProjectDataType( + _type + ) + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workrecords_list_get_response_data_item_relationships_project_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workrecords_list_get_response_data_item_relationships_project_data_obj.additional_properties = ( + d + ) + return workrecords_list_get_response_data_item_relationships_project_data_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_project_data_type.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_project_data_type.py new file mode 100644 index 00000000..b0c19fdd --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_project_data_type.py @@ -0,0 +1,13 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkrecordsListGetResponseDataItemRelationshipsProjectDataType( + str, Enum +): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_user.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_user.py new file mode 100644 index 00000000..2d0eb6cd --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_user.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_list_get_response_data_item_relationships_user_data import ( + WorkrecordsListGetResponseDataItemRelationshipsUserData, + ) + + +T = TypeVar("T", bound="WorkrecordsListGetResponseDataItemRelationshipsUser") + + +@_attrs_define +class WorkrecordsListGetResponseDataItemRelationshipsUser: + """ + Attributes: + data (Union[Unset, WorkrecordsListGetResponseDataItemRelationshipsUserData]): + """ + + data: Union[ + Unset, "WorkrecordsListGetResponseDataItemRelationshipsUserData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_list_get_response_data_item_relationships_user_data import ( + WorkrecordsListGetResponseDataItemRelationshipsUserData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, WorkrecordsListGetResponseDataItemRelationshipsUserData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = WorkrecordsListGetResponseDataItemRelationshipsUserData.from_dict( + _data + ) + + workrecords_list_get_response_data_item_relationships_user_obj = cls( + data=data, + ) + + workrecords_list_get_response_data_item_relationships_user_obj.additional_properties = ( + d + ) + return workrecords_list_get_response_data_item_relationships_user_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_user_data.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_user_data.py new file mode 100644 index 00000000..b3a82393 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_user_data.py @@ -0,0 +1,105 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workrecords_list_get_response_data_item_relationships_user_data_type import ( + WorkrecordsListGetResponseDataItemRelationshipsUserDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkrecordsListGetResponseDataItemRelationshipsUserData" +) + + +@_attrs_define +class WorkrecordsListGetResponseDataItemRelationshipsUserData: + """ + Attributes: + type (Union[Unset, WorkrecordsListGetResponseDataItemRelationshipsUserDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, WorkrecordsListGetResponseDataItemRelationshipsUserDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, WorkrecordsListGetResponseDataItemRelationshipsUserDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkrecordsListGetResponseDataItemRelationshipsUserDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workrecords_list_get_response_data_item_relationships_user_data_obj = ( + cls( + type=type, + id=id, + revision=revision, + ) + ) + + workrecords_list_get_response_data_item_relationships_user_data_obj.additional_properties = ( + d + ) + return ( + workrecords_list_get_response_data_item_relationships_user_data_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_user_data_type.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_user_data_type.py new file mode 100644 index 00000000..c947f94b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_relationships_user_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkrecordsListGetResponseDataItemRelationshipsUserDataType(str, Enum): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_type.py new file mode 100644 index 00000000..9155dd7b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkrecordsListGetResponseDataItemType(str, Enum): + WORKRECORDS = "workrecords" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_included_item.py new file mode 100644 index 00000000..1c936217 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="WorkrecordsListGetResponseIncludedItem") + + +@_attrs_define +class WorkrecordsListGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + workrecords_list_get_response_included_item_obj = cls() + + workrecords_list_get_response_included_item_obj.additional_properties = ( + d + ) + return workrecords_list_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_links.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_links.py new file mode 100644 index 00000000..7d664297 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_links.py @@ -0,0 +1,104 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkrecordsListGetResponseLinks") + + +@_attrs_define +class WorkrecordsListGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/workrecords?page%5Bsize%5D=10&page%5Bnumber%5D=5. + first (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/workrecords?page%5Bsize%5D=10&page%5Bnumber%5D=1. + prev (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/workrecords?page%5Bsize%5D=10&page%5Bnumber%5D=4. + next_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/workrecords?page%5Bsize%5D=10&page%5Bnumber%5D=6. + last (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/workrecords?page%5Bsize%5D=10&page%5Bnumber%5D=9. + """ + + self_: Union[Unset, str] = UNSET + first: Union[Unset, str] = UNSET + prev: Union[Unset, str] = UNSET + next_: Union[Unset, str] = UNSET + last: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + first = self.first + + prev = self.prev + + next_ = self.next_ + + last = self.last + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + if first is not UNSET: + field_dict["first"] = first + if prev is not UNSET: + field_dict["prev"] = prev + if next_ is not UNSET: + field_dict["next"] = next_ + if last is not UNSET: + field_dict["last"] = last + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + first = d.pop("first", UNSET) + + prev = d.pop("prev", UNSET) + + next_ = d.pop("next", UNSET) + + last = d.pop("last", UNSET) + + workrecords_list_get_response_links_obj = cls( + self_=self_, + first=first, + prev=prev, + next_=next_, + last=last, + ) + + workrecords_list_get_response_links_obj.additional_properties = d + return workrecords_list_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_meta.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_meta.py new file mode 100644 index 00000000..102b7ad6 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_get_response_meta.py @@ -0,0 +1,63 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkrecordsListGetResponseMeta") + + +@_attrs_define +class WorkrecordsListGetResponseMeta: + """ + Attributes: + total_count (Union[Unset, int]): + """ + + total_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + total_count = self.total_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_count is not UNSET: + field_dict["totalCount"] = total_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + total_count = d.pop("totalCount", UNSET) + + workrecords_list_get_response_meta_obj = cls( + total_count=total_count, + ) + + workrecords_list_get_response_meta_obj.additional_properties = d + return workrecords_list_get_response_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request.py new file mode 100644 index 00000000..f0611945 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_list_post_request_data_item import ( + WorkrecordsListPostRequestDataItem, + ) + + +T = TypeVar("T", bound="WorkrecordsListPostRequest") + + +@_attrs_define +class WorkrecordsListPostRequest: + """ + Attributes: + data (Union[Unset, List['WorkrecordsListPostRequestDataItem']]): + """ + + data: Union[Unset, List["WorkrecordsListPostRequestDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_list_post_request_data_item import ( + WorkrecordsListPostRequestDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkrecordsListPostRequestDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + workrecords_list_post_request_obj = cls( + data=data, + ) + + workrecords_list_post_request_obj.additional_properties = d + return workrecords_list_post_request_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item.py new file mode 100644 index 00000000..974352d2 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item.py @@ -0,0 +1,135 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workrecords_list_post_request_data_item_type import ( + WorkrecordsListPostRequestDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_list_post_request_data_item_attributes import ( + WorkrecordsListPostRequestDataItemAttributes, + ) + from ..models.workrecords_list_post_request_data_item_relationships import ( + WorkrecordsListPostRequestDataItemRelationships, + ) + + +T = TypeVar("T", bound="WorkrecordsListPostRequestDataItem") + + +@_attrs_define +class WorkrecordsListPostRequestDataItem: + """ + Attributes: + type (Union[Unset, WorkrecordsListPostRequestDataItemType]): + attributes (Union[Unset, WorkrecordsListPostRequestDataItemAttributes]): + relationships (Union[Unset, WorkrecordsListPostRequestDataItemRelationships]): + """ + + type: Union[Unset, WorkrecordsListPostRequestDataItemType] = UNSET + attributes: Union[ + Unset, "WorkrecordsListPostRequestDataItemAttributes" + ] = UNSET + relationships: Union[ + Unset, "WorkrecordsListPostRequestDataItemRelationships" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_list_post_request_data_item_attributes import ( + WorkrecordsListPostRequestDataItemAttributes, + ) + from ..models.workrecords_list_post_request_data_item_relationships import ( + WorkrecordsListPostRequestDataItemRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, WorkrecordsListPostRequestDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkrecordsListPostRequestDataItemType(_type) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, WorkrecordsListPostRequestDataItemAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = ( + WorkrecordsListPostRequestDataItemAttributes.from_dict( + _attributes + ) + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, WorkrecordsListPostRequestDataItemRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + WorkrecordsListPostRequestDataItemRelationships.from_dict( + _relationships + ) + ) + + workrecords_list_post_request_data_item_obj = cls( + type=type, + attributes=attributes, + relationships=relationships, + ) + + workrecords_list_post_request_data_item_obj.additional_properties = d + return workrecords_list_post_request_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_attributes.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_attributes.py new file mode 100644 index 00000000..8c9afde5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_attributes.py @@ -0,0 +1,101 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkrecordsListPostRequestDataItemAttributes") + + +@_attrs_define +class WorkrecordsListPostRequestDataItemAttributes: + """ + Attributes: + comment (Union[Unset, str]): Example: Comment. + date (Union[Unset, datetime.date]): Example: 1970-01-01. + time_spent (Union[Unset, str]): Example: 5 1/2d. + type (Union[Unset, str]): Example: task. + """ + + comment: Union[Unset, str] = UNSET + date: Union[Unset, datetime.date] = UNSET + time_spent: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + comment = self.comment + + date: Union[Unset, str] = UNSET + if not isinstance(self.date, Unset): + date = self.date.isoformat() + + time_spent = self.time_spent + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if comment is not UNSET: + field_dict["comment"] = comment + if date is not UNSET: + field_dict["date"] = date + if time_spent is not UNSET: + field_dict["timeSpent"] = time_spent + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + comment = d.pop("comment", UNSET) + + _date = d.pop("date", UNSET) + date: Union[Unset, datetime.date] + if isinstance(_date, Unset): + date = UNSET + else: + date = isoparse(_date).date() + + time_spent = d.pop("timeSpent", UNSET) + + type = d.pop("type", UNSET) + + workrecords_list_post_request_data_item_attributes_obj = cls( + comment=comment, + date=date, + time_spent=time_spent, + type=type, + ) + + workrecords_list_post_request_data_item_attributes_obj.additional_properties = ( + d + ) + return workrecords_list_post_request_data_item_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_relationships.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_relationships.py new file mode 100644 index 00000000..3979b001 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_relationships.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_list_post_request_data_item_relationships_user import ( + WorkrecordsListPostRequestDataItemRelationshipsUser, + ) + + +T = TypeVar("T", bound="WorkrecordsListPostRequestDataItemRelationships") + + +@_attrs_define +class WorkrecordsListPostRequestDataItemRelationships: + """ + Attributes: + user (Union[Unset, WorkrecordsListPostRequestDataItemRelationshipsUser]): + """ + + user: Union[ + Unset, "WorkrecordsListPostRequestDataItemRelationshipsUser" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.user, Unset): + user = self.user.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if user is not UNSET: + field_dict["user"] = user + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_list_post_request_data_item_relationships_user import ( + WorkrecordsListPostRequestDataItemRelationshipsUser, + ) + + d = src_dict.copy() + _user = d.pop("user", UNSET) + user: Union[Unset, WorkrecordsListPostRequestDataItemRelationshipsUser] + if isinstance(_user, Unset): + user = UNSET + else: + user = ( + WorkrecordsListPostRequestDataItemRelationshipsUser.from_dict( + _user + ) + ) + + workrecords_list_post_request_data_item_relationships_obj = cls( + user=user, + ) + + workrecords_list_post_request_data_item_relationships_obj.additional_properties = ( + d + ) + return workrecords_list_post_request_data_item_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_relationships_user.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_relationships_user.py new file mode 100644 index 00000000..f97ecafe --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_relationships_user.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_list_post_request_data_item_relationships_user_data import ( + WorkrecordsListPostRequestDataItemRelationshipsUserData, + ) + + +T = TypeVar("T", bound="WorkrecordsListPostRequestDataItemRelationshipsUser") + + +@_attrs_define +class WorkrecordsListPostRequestDataItemRelationshipsUser: + """ + Attributes: + data (Union[Unset, WorkrecordsListPostRequestDataItemRelationshipsUserData]): + """ + + data: Union[ + Unset, "WorkrecordsListPostRequestDataItemRelationshipsUserData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_list_post_request_data_item_relationships_user_data import ( + WorkrecordsListPostRequestDataItemRelationshipsUserData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, WorkrecordsListPostRequestDataItemRelationshipsUserData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = WorkrecordsListPostRequestDataItemRelationshipsUserData.from_dict( + _data + ) + + workrecords_list_post_request_data_item_relationships_user_obj = cls( + data=data, + ) + + workrecords_list_post_request_data_item_relationships_user_obj.additional_properties = ( + d + ) + return workrecords_list_post_request_data_item_relationships_user_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_relationships_user_data.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_relationships_user_data.py new file mode 100644 index 00000000..8b30604c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_relationships_user_data.py @@ -0,0 +1,96 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workrecords_list_post_request_data_item_relationships_user_data_type import ( + WorkrecordsListPostRequestDataItemRelationshipsUserDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkrecordsListPostRequestDataItemRelationshipsUserData" +) + + +@_attrs_define +class WorkrecordsListPostRequestDataItemRelationshipsUserData: + """ + Attributes: + type (Union[Unset, WorkrecordsListPostRequestDataItemRelationshipsUserDataType]): + id (Union[Unset, str]): Example: MyUserId. + """ + + type: Union[ + Unset, WorkrecordsListPostRequestDataItemRelationshipsUserDataType + ] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, WorkrecordsListPostRequestDataItemRelationshipsUserDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkrecordsListPostRequestDataItemRelationshipsUserDataType( + _type + ) + + id = d.pop("id", UNSET) + + workrecords_list_post_request_data_item_relationships_user_data_obj = ( + cls( + type=type, + id=id, + ) + ) + + workrecords_list_post_request_data_item_relationships_user_data_obj.additional_properties = ( + d + ) + return ( + workrecords_list_post_request_data_item_relationships_user_data_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_relationships_user_data_type.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_relationships_user_data_type.py new file mode 100644 index 00000000..b0b1a96a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_relationships_user_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkrecordsListPostRequestDataItemRelationshipsUserDataType(str, Enum): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_type.py new file mode 100644 index 00000000..c3bfe9f3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_request_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkrecordsListPostRequestDataItemType(str, Enum): + WORKRECORDS = "workrecords" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workrecords_list_post_response.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_response.py new file mode 100644 index 00000000..eaec90f4 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_response.py @@ -0,0 +1,85 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_list_post_response_data_item import ( + WorkrecordsListPostResponseDataItem, + ) + + +T = TypeVar("T", bound="WorkrecordsListPostResponse") + + +@_attrs_define +class WorkrecordsListPostResponse: + """ + Attributes: + data (Union[Unset, List['WorkrecordsListPostResponseDataItem']]): + """ + + data: Union[Unset, List["WorkrecordsListPostResponseDataItem"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_list_post_response_data_item import ( + WorkrecordsListPostResponseDataItem, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data", UNSET) + for data_item_data in _data or []: + data_item = WorkrecordsListPostResponseDataItem.from_dict( + data_item_data + ) + + data.append(data_item) + + workrecords_list_post_response_obj = cls( + data=data, + ) + + workrecords_list_post_response_obj.additional_properties = d + return workrecords_list_post_response_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_post_response_data_item.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_response_data_item.py new file mode 100644 index 00000000..e8d41dcb --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_response_data_item.py @@ -0,0 +1,108 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workrecords_list_post_response_data_item_type import ( + WorkrecordsListPostResponseDataItemType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_list_post_response_data_item_links import ( + WorkrecordsListPostResponseDataItemLinks, + ) + + +T = TypeVar("T", bound="WorkrecordsListPostResponseDataItem") + + +@_attrs_define +class WorkrecordsListPostResponseDataItem: + """ + Attributes: + type (Union[Unset, WorkrecordsListPostResponseDataItemType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyWorkRecordId. + links (Union[Unset, WorkrecordsListPostResponseDataItemLinks]): + """ + + type: Union[Unset, WorkrecordsListPostResponseDataItemType] = UNSET + id: Union[Unset, str] = UNSET + links: Union[Unset, "WorkrecordsListPostResponseDataItemLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_list_post_response_data_item_links import ( + WorkrecordsListPostResponseDataItemLinks, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, WorkrecordsListPostResponseDataItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkrecordsListPostResponseDataItemType(_type) + + id = d.pop("id", UNSET) + + _links = d.pop("links", UNSET) + links: Union[Unset, WorkrecordsListPostResponseDataItemLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = WorkrecordsListPostResponseDataItemLinks.from_dict(_links) + + workrecords_list_post_response_data_item_obj = cls( + type=type, + id=id, + links=links, + ) + + workrecords_list_post_response_data_item_obj.additional_properties = d + return workrecords_list_post_response_data_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_post_response_data_item_links.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_response_data_item_links.py new file mode 100644 index 00000000..5da67c8a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_response_data_item_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkrecordsListPostResponseDataItemLinks") + + +@_attrs_define +class WorkrecordsListPostResponseDataItemLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/workrecords/MyWorkRecordId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + workrecords_list_post_response_data_item_links_obj = cls( + self_=self_, + ) + + workrecords_list_post_response_data_item_links_obj.additional_properties = ( + d + ) + return workrecords_list_post_response_data_item_links_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_list_post_response_data_item_type.py b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_response_data_item_type.py new file mode 100644 index 00000000..3f51972b --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_list_post_response_data_item_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkrecordsListPostResponseDataItemType(str, Enum): + WORKRECORDS = "workrecords" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response.py b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response.py new file mode 100644 index 00000000..ec8fa01a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response.py @@ -0,0 +1,133 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_single_get_response_data import ( + WorkrecordsSingleGetResponseData, + ) + from ..models.workrecords_single_get_response_included_item import ( + WorkrecordsSingleGetResponseIncludedItem, + ) + from ..models.workrecords_single_get_response_links import ( + WorkrecordsSingleGetResponseLinks, + ) + + +T = TypeVar("T", bound="WorkrecordsSingleGetResponse") + + +@_attrs_define +class WorkrecordsSingleGetResponse: + """ + Attributes: + data (Union[Unset, WorkrecordsSingleGetResponseData]): + included (Union[Unset, List['WorkrecordsSingleGetResponseIncludedItem']]): Related entities might be returned, + see Rest API + User Guide. + links (Union[Unset, WorkrecordsSingleGetResponseLinks]): + """ + + data: Union[Unset, "WorkrecordsSingleGetResponseData"] = UNSET + included: Union[ + Unset, List["WorkrecordsSingleGetResponseIncludedItem"] + ] = UNSET + links: Union[Unset, "WorkrecordsSingleGetResponseLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + included: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_single_get_response_data import ( + WorkrecordsSingleGetResponseData, + ) + from ..models.workrecords_single_get_response_included_item import ( + WorkrecordsSingleGetResponseIncludedItem, + ) + from ..models.workrecords_single_get_response_links import ( + WorkrecordsSingleGetResponseLinks, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, WorkrecordsSingleGetResponseData] + if isinstance(_data, Unset): + data = UNSET + else: + data = WorkrecordsSingleGetResponseData.from_dict(_data) + + included = [] + _included = d.pop("included", UNSET) + for included_item_data in _included or []: + included_item = WorkrecordsSingleGetResponseIncludedItem.from_dict( + included_item_data + ) + + included.append(included_item) + + _links = d.pop("links", UNSET) + links: Union[Unset, WorkrecordsSingleGetResponseLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = WorkrecordsSingleGetResponseLinks.from_dict(_links) + + workrecords_single_get_response_obj = cls( + data=data, + included=included, + links=links, + ) + + workrecords_single_get_response_obj.additional_properties = d + return workrecords_single_get_response_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data.py b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data.py new file mode 100644 index 00000000..046bfcb9 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data.py @@ -0,0 +1,195 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workrecords_single_get_response_data_type import ( + WorkrecordsSingleGetResponseDataType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_single_get_response_data_attributes import ( + WorkrecordsSingleGetResponseDataAttributes, + ) + from ..models.workrecords_single_get_response_data_links import ( + WorkrecordsSingleGetResponseDataLinks, + ) + from ..models.workrecords_single_get_response_data_meta import ( + WorkrecordsSingleGetResponseDataMeta, + ) + from ..models.workrecords_single_get_response_data_relationships import ( + WorkrecordsSingleGetResponseDataRelationships, + ) + + +T = TypeVar("T", bound="WorkrecordsSingleGetResponseData") + + +@_attrs_define +class WorkrecordsSingleGetResponseData: + """ + Attributes: + type (Union[Unset, WorkrecordsSingleGetResponseDataType]): + id (Union[Unset, str]): Example: MyProjectId/MyWorkItemId/MyWorkRecordId. + revision (Union[Unset, str]): Example: 1234. + attributes (Union[Unset, WorkrecordsSingleGetResponseDataAttributes]): + relationships (Union[Unset, WorkrecordsSingleGetResponseDataRelationships]): + meta (Union[Unset, WorkrecordsSingleGetResponseDataMeta]): + links (Union[Unset, WorkrecordsSingleGetResponseDataLinks]): + """ + + type: Union[Unset, WorkrecordsSingleGetResponseDataType] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + attributes: Union[ + Unset, "WorkrecordsSingleGetResponseDataAttributes" + ] = UNSET + relationships: Union[ + Unset, "WorkrecordsSingleGetResponseDataRelationships" + ] = UNSET + meta: Union[Unset, "WorkrecordsSingleGetResponseDataMeta"] = UNSET + links: Union[Unset, "WorkrecordsSingleGetResponseDataLinks"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + meta: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + links: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + if meta is not UNSET: + field_dict["meta"] = meta + if links is not UNSET: + field_dict["links"] = links + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_single_get_response_data_attributes import ( + WorkrecordsSingleGetResponseDataAttributes, + ) + from ..models.workrecords_single_get_response_data_links import ( + WorkrecordsSingleGetResponseDataLinks, + ) + from ..models.workrecords_single_get_response_data_meta import ( + WorkrecordsSingleGetResponseDataMeta, + ) + from ..models.workrecords_single_get_response_data_relationships import ( + WorkrecordsSingleGetResponseDataRelationships, + ) + + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, WorkrecordsSingleGetResponseDataType] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkrecordsSingleGetResponseDataType(_type) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: Union[Unset, WorkrecordsSingleGetResponseDataAttributes] + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = WorkrecordsSingleGetResponseDataAttributes.from_dict( + _attributes + ) + + _relationships = d.pop("relationships", UNSET) + relationships: Union[ + Unset, WorkrecordsSingleGetResponseDataRelationships + ] + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = ( + WorkrecordsSingleGetResponseDataRelationships.from_dict( + _relationships + ) + ) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, WorkrecordsSingleGetResponseDataMeta] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = WorkrecordsSingleGetResponseDataMeta.from_dict(_meta) + + _links = d.pop("links", UNSET) + links: Union[Unset, WorkrecordsSingleGetResponseDataLinks] + if isinstance(_links, Unset): + links = UNSET + else: + links = WorkrecordsSingleGetResponseDataLinks.from_dict(_links) + + workrecords_single_get_response_data_obj = cls( + type=type, + id=id, + revision=revision, + attributes=attributes, + relationships=relationships, + meta=meta, + links=links, + ) + + workrecords_single_get_response_data_obj.additional_properties = d + return workrecords_single_get_response_data_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_attributes.py b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_attributes.py new file mode 100644 index 00000000..b6a7ff5c --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_attributes.py @@ -0,0 +1,110 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkrecordsSingleGetResponseDataAttributes") + + +@_attrs_define +class WorkrecordsSingleGetResponseDataAttributes: + """ + Attributes: + comment (Union[Unset, str]): Example: Comment. + date (Union[Unset, datetime.date]): Example: 1970-01-01. + id (Union[Unset, str]): + time_spent (Union[Unset, str]): Example: 5 1/2d. + type (Union[Unset, str]): Example: task. + """ + + comment: Union[Unset, str] = UNSET + date: Union[Unset, datetime.date] = UNSET + id: Union[Unset, str] = UNSET + time_spent: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + comment = self.comment + + date: Union[Unset, str] = UNSET + if not isinstance(self.date, Unset): + date = self.date.isoformat() + + id = self.id + + time_spent = self.time_spent + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if comment is not UNSET: + field_dict["comment"] = comment + if date is not UNSET: + field_dict["date"] = date + if id is not UNSET: + field_dict["id"] = id + if time_spent is not UNSET: + field_dict["timeSpent"] = time_spent + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + comment = d.pop("comment", UNSET) + + _date = d.pop("date", UNSET) + date: Union[Unset, datetime.date] + if isinstance(_date, Unset): + date = UNSET + else: + date = isoparse(_date).date() + + id = d.pop("id", UNSET) + + time_spent = d.pop("timeSpent", UNSET) + + type = d.pop("type", UNSET) + + workrecords_single_get_response_data_attributes_obj = cls( + comment=comment, + date=date, + id=id, + time_spent=time_spent, + type=type, + ) + + workrecords_single_get_response_data_attributes_obj.additional_properties = ( + d + ) + return workrecords_single_get_response_data_attributes_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_links.py b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_links.py new file mode 100644 index 00000000..042c33a3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_links.py @@ -0,0 +1,66 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkrecordsSingleGetResponseDataLinks") + + +@_attrs_define +class WorkrecordsSingleGetResponseDataLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/workrecords/MyWorkRecordId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + workrecords_single_get_response_data_links_obj = cls( + self_=self_, + ) + + workrecords_single_get_response_data_links_obj.additional_properties = ( + d + ) + return workrecords_single_get_response_data_links_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_meta.py b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_meta.py new file mode 100644 index 00000000..c737dbc5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_meta.py @@ -0,0 +1,89 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_single_get_response_data_meta_errors_item import ( + WorkrecordsSingleGetResponseDataMetaErrorsItem, + ) + + +T = TypeVar("T", bound="WorkrecordsSingleGetResponseDataMeta") + + +@_attrs_define +class WorkrecordsSingleGetResponseDataMeta: + """ + Attributes: + errors (Union[Unset, List['WorkrecordsSingleGetResponseDataMetaErrorsItem']]): + """ + + errors: Union[ + Unset, List["WorkrecordsSingleGetResponseDataMetaErrorsItem"] + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.errors, Unset): + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_single_get_response_data_meta_errors_item import ( + WorkrecordsSingleGetResponseDataMetaErrorsItem, + ) + + d = src_dict.copy() + errors = [] + _errors = d.pop("errors", UNSET) + for errors_item_data in _errors or []: + errors_item = ( + WorkrecordsSingleGetResponseDataMetaErrorsItem.from_dict( + errors_item_data + ) + ) + + errors.append(errors_item) + + workrecords_single_get_response_data_meta_obj = cls( + errors=errors, + ) + + workrecords_single_get_response_data_meta_obj.additional_properties = d + return workrecords_single_get_response_data_meta_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_meta_errors_item.py b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_meta_errors_item.py new file mode 100644 index 00000000..c5b4a302 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_meta_errors_item.py @@ -0,0 +1,118 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_single_get_response_data_meta_errors_item_source import ( + WorkrecordsSingleGetResponseDataMetaErrorsItemSource, + ) + + +T = TypeVar("T", bound="WorkrecordsSingleGetResponseDataMetaErrorsItem") + + +@_attrs_define +class WorkrecordsSingleGetResponseDataMetaErrorsItem: + """ + Attributes: + status (Union[Unset, str]): HTTP status code applicable to this problem. Example: 400. + title (Union[Unset, str]): Short, human-readable summary of the problem. Example: Bad Request. + detail (Union[Unset, str]): Human-readable explanation specific to this occurrence of the problem. Example: + Unexpected token, BEGIN_ARRAY expected, but was : BEGIN_OBJECT (at $.data). + source (Union[Unset, WorkrecordsSingleGetResponseDataMetaErrorsItemSource]): + """ + + status: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + detail: Union[Unset, str] = UNSET + source: Union[ + Unset, "WorkrecordsSingleGetResponseDataMetaErrorsItemSource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + + title = self.title + + detail = self.detail + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if title is not UNSET: + field_dict["title"] = title + if detail is not UNSET: + field_dict["detail"] = detail + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_single_get_response_data_meta_errors_item_source import ( + WorkrecordsSingleGetResponseDataMetaErrorsItemSource, + ) + + d = src_dict.copy() + status = d.pop("status", UNSET) + + title = d.pop("title", UNSET) + + detail = d.pop("detail", UNSET) + + _source = d.pop("source", UNSET) + source: Union[ + Unset, WorkrecordsSingleGetResponseDataMetaErrorsItemSource + ] + if isinstance(_source, Unset): + source = UNSET + else: + source = ( + WorkrecordsSingleGetResponseDataMetaErrorsItemSource.from_dict( + _source + ) + ) + + workrecords_single_get_response_data_meta_errors_item_obj = cls( + status=status, + title=title, + detail=detail, + source=source, + ) + + workrecords_single_get_response_data_meta_errors_item_obj.additional_properties = ( + d + ) + return workrecords_single_get_response_data_meta_errors_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_meta_errors_item_source.py b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_meta_errors_item_source.py new file mode 100644 index 00000000..d4977198 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_meta_errors_item_source.py @@ -0,0 +1,107 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_single_get_response_data_meta_errors_item_source_resource import ( + WorkrecordsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + +T = TypeVar("T", bound="WorkrecordsSingleGetResponseDataMetaErrorsItemSource") + + +@_attrs_define +class WorkrecordsSingleGetResponseDataMetaErrorsItemSource: + """ + Attributes: + pointer (Union[Unset, str]): JSON Pointer to the associated entity in the request document. Example: $.data. + parameter (Union[Unset, str]): String indicating which URI query parameter caused the error. Example: revision. + resource (Union[Unset, WorkrecordsSingleGetResponseDataMetaErrorsItemSourceResource]): Resource causing the + error. + """ + + pointer: Union[Unset, str] = UNSET + parameter: Union[Unset, str] = UNSET + resource: Union[ + Unset, "WorkrecordsSingleGetResponseDataMetaErrorsItemSourceResource" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + pointer = self.pointer + + parameter = self.parameter + + resource: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.resource, Unset): + resource = self.resource.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pointer is not UNSET: + field_dict["pointer"] = pointer + if parameter is not UNSET: + field_dict["parameter"] = parameter + if resource is not UNSET: + field_dict["resource"] = resource + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_single_get_response_data_meta_errors_item_source_resource import ( + WorkrecordsSingleGetResponseDataMetaErrorsItemSourceResource, + ) + + d = src_dict.copy() + pointer = d.pop("pointer", UNSET) + + parameter = d.pop("parameter", UNSET) + + _resource = d.pop("resource", UNSET) + resource: Union[ + Unset, WorkrecordsSingleGetResponseDataMetaErrorsItemSourceResource + ] + if isinstance(_resource, Unset): + resource = UNSET + else: + resource = WorkrecordsSingleGetResponseDataMetaErrorsItemSourceResource.from_dict( + _resource + ) + + workrecords_single_get_response_data_meta_errors_item_source_obj = cls( + pointer=pointer, + parameter=parameter, + resource=resource, + ) + + workrecords_single_get_response_data_meta_errors_item_source_obj.additional_properties = ( + d + ) + return workrecords_single_get_response_data_meta_errors_item_source_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_meta_errors_item_source_resource.py b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_meta_errors_item_source_resource.py new file mode 100644 index 00000000..e8f59684 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_meta_errors_item_source_resource.py @@ -0,0 +1,77 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkrecordsSingleGetResponseDataMetaErrorsItemSourceResource" +) + + +@_attrs_define +class WorkrecordsSingleGetResponseDataMetaErrorsItemSourceResource: + """Resource causing the error. + + Attributes: + id (Union[Unset, str]): Example: MyProjectId/id. + type (Union[Unset, str]): Example: type. + """ + + id: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + type = d.pop("type", UNSET) + + workrecords_single_get_response_data_meta_errors_item_source_resource_obj = cls( + id=id, + type=type, + ) + + workrecords_single_get_response_data_meta_errors_item_source_resource_obj.additional_properties = ( + d + ) + return workrecords_single_get_response_data_meta_errors_item_source_resource_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships.py b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships.py new file mode 100644 index 00000000..b848abeb --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships.py @@ -0,0 +1,116 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_single_get_response_data_relationships_project import ( + WorkrecordsSingleGetResponseDataRelationshipsProject, + ) + from ..models.workrecords_single_get_response_data_relationships_user import ( + WorkrecordsSingleGetResponseDataRelationshipsUser, + ) + + +T = TypeVar("T", bound="WorkrecordsSingleGetResponseDataRelationships") + + +@_attrs_define +class WorkrecordsSingleGetResponseDataRelationships: + """ + Attributes: + project (Union[Unset, WorkrecordsSingleGetResponseDataRelationshipsProject]): + user (Union[Unset, WorkrecordsSingleGetResponseDataRelationshipsUser]): + """ + + project: Union[ + Unset, "WorkrecordsSingleGetResponseDataRelationshipsProject" + ] = UNSET + user: Union[ + Unset, "WorkrecordsSingleGetResponseDataRelationshipsUser" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + project: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.project, Unset): + project = self.project.to_dict() + + user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.user, Unset): + user = self.user.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if project is not UNSET: + field_dict["project"] = project + if user is not UNSET: + field_dict["user"] = user + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_single_get_response_data_relationships_project import ( + WorkrecordsSingleGetResponseDataRelationshipsProject, + ) + from ..models.workrecords_single_get_response_data_relationships_user import ( + WorkrecordsSingleGetResponseDataRelationshipsUser, + ) + + d = src_dict.copy() + _project = d.pop("project", UNSET) + project: Union[ + Unset, WorkrecordsSingleGetResponseDataRelationshipsProject + ] + if isinstance(_project, Unset): + project = UNSET + else: + project = ( + WorkrecordsSingleGetResponseDataRelationshipsProject.from_dict( + _project + ) + ) + + _user = d.pop("user", UNSET) + user: Union[Unset, WorkrecordsSingleGetResponseDataRelationshipsUser] + if isinstance(_user, Unset): + user = UNSET + else: + user = WorkrecordsSingleGetResponseDataRelationshipsUser.from_dict( + _user + ) + + workrecords_single_get_response_data_relationships_obj = cls( + project=project, + user=user, + ) + + workrecords_single_get_response_data_relationships_obj.additional_properties = ( + d + ) + return workrecords_single_get_response_data_relationships_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_project.py b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_project.py new file mode 100644 index 00000000..641143a7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_project.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_single_get_response_data_relationships_project_data import ( + WorkrecordsSingleGetResponseDataRelationshipsProjectData, + ) + + +T = TypeVar("T", bound="WorkrecordsSingleGetResponseDataRelationshipsProject") + + +@_attrs_define +class WorkrecordsSingleGetResponseDataRelationshipsProject: + """ + Attributes: + data (Union[Unset, WorkrecordsSingleGetResponseDataRelationshipsProjectData]): + """ + + data: Union[ + Unset, "WorkrecordsSingleGetResponseDataRelationshipsProjectData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_single_get_response_data_relationships_project_data import ( + WorkrecordsSingleGetResponseDataRelationshipsProjectData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, WorkrecordsSingleGetResponseDataRelationshipsProjectData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = WorkrecordsSingleGetResponseDataRelationshipsProjectData.from_dict( + _data + ) + + workrecords_single_get_response_data_relationships_project_obj = cls( + data=data, + ) + + workrecords_single_get_response_data_relationships_project_obj.additional_properties = ( + d + ) + return workrecords_single_get_response_data_relationships_project_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_project_data.py b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_project_data.py new file mode 100644 index 00000000..9a845cb8 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_project_data.py @@ -0,0 +1,107 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workrecords_single_get_response_data_relationships_project_data_type import ( + WorkrecordsSingleGetResponseDataRelationshipsProjectDataType, +) +from ..types import UNSET, Unset + +T = TypeVar( + "T", bound="WorkrecordsSingleGetResponseDataRelationshipsProjectData" +) + + +@_attrs_define +class WorkrecordsSingleGetResponseDataRelationshipsProjectData: + """ + Attributes: + type (Union[Unset, WorkrecordsSingleGetResponseDataRelationshipsProjectDataType]): + id (Union[Unset, str]): Example: MyProjectId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, WorkrecordsSingleGetResponseDataRelationshipsProjectDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, WorkrecordsSingleGetResponseDataRelationshipsProjectDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = ( + WorkrecordsSingleGetResponseDataRelationshipsProjectDataType( + _type + ) + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workrecords_single_get_response_data_relationships_project_data_obj = ( + cls( + type=type, + id=id, + revision=revision, + ) + ) + + workrecords_single_get_response_data_relationships_project_data_obj.additional_properties = ( + d + ) + return ( + workrecords_single_get_response_data_relationships_project_data_obj + ) + + @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/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_project_data_type.py b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_project_data_type.py new file mode 100644 index 00000000..6b7418ce --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_project_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkrecordsSingleGetResponseDataRelationshipsProjectDataType(str, Enum): + PROJECTS = "projects" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_user.py b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_user.py new file mode 100644 index 00000000..70dc3cce --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_user.py @@ -0,0 +1,88 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workrecords_single_get_response_data_relationships_user_data import ( + WorkrecordsSingleGetResponseDataRelationshipsUserData, + ) + + +T = TypeVar("T", bound="WorkrecordsSingleGetResponseDataRelationshipsUser") + + +@_attrs_define +class WorkrecordsSingleGetResponseDataRelationshipsUser: + """ + Attributes: + data (Union[Unset, WorkrecordsSingleGetResponseDataRelationshipsUserData]): + """ + + data: Union[ + Unset, "WorkrecordsSingleGetResponseDataRelationshipsUserData" + ] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workrecords_single_get_response_data_relationships_user_data import ( + WorkrecordsSingleGetResponseDataRelationshipsUserData, + ) + + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[ + Unset, WorkrecordsSingleGetResponseDataRelationshipsUserData + ] + if isinstance(_data, Unset): + data = UNSET + else: + data = WorkrecordsSingleGetResponseDataRelationshipsUserData.from_dict( + _data + ) + + workrecords_single_get_response_data_relationships_user_obj = cls( + data=data, + ) + + workrecords_single_get_response_data_relationships_user_obj.additional_properties = ( + d + ) + return workrecords_single_get_response_data_relationships_user_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_user_data.py b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_user_data.py new file mode 100644 index 00000000..2077cbe5 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_user_data.py @@ -0,0 +1,99 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workrecords_single_get_response_data_relationships_user_data_type import ( + WorkrecordsSingleGetResponseDataRelationshipsUserDataType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkrecordsSingleGetResponseDataRelationshipsUserData") + + +@_attrs_define +class WorkrecordsSingleGetResponseDataRelationshipsUserData: + """ + Attributes: + type (Union[Unset, WorkrecordsSingleGetResponseDataRelationshipsUserDataType]): + id (Union[Unset, str]): Example: MyUserId. + revision (Union[Unset, str]): Example: 1234. + """ + + type: Union[ + Unset, WorkrecordsSingleGetResponseDataRelationshipsUserDataType + ] = UNSET + id: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + id = self.id + + revision = self.revision + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if id is not UNSET: + field_dict["id"] = id + if revision is not UNSET: + field_dict["revision"] = revision + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[ + Unset, WorkrecordsSingleGetResponseDataRelationshipsUserDataType + ] + if isinstance(_type, Unset): + type = UNSET + else: + type = WorkrecordsSingleGetResponseDataRelationshipsUserDataType( + _type + ) + + id = d.pop("id", UNSET) + + revision = d.pop("revision", UNSET) + + workrecords_single_get_response_data_relationships_user_data_obj = cls( + type=type, + id=id, + revision=revision, + ) + + workrecords_single_get_response_data_relationships_user_data_obj.additional_properties = ( + d + ) + return workrecords_single_get_response_data_relationships_user_data_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_user_data_type.py b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_user_data_type.py new file mode 100644 index 00000000..58453de7 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_relationships_user_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkrecordsSingleGetResponseDataRelationshipsUserDataType(str, Enum): + USERS = "users" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_type.py b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_type.py new file mode 100644 index 00000000..adea47fc --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_data_type.py @@ -0,0 +1,11 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from enum import Enum + + +class WorkrecordsSingleGetResponseDataType(str, Enum): + WORKRECORDS = "workrecords" + + def __str__(self) -> str: + return str(self.value) diff --git a/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_included_item.py b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_included_item.py new file mode 100644 index 00000000..c1c12d4a --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_included_item.py @@ -0,0 +1,51 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="WorkrecordsSingleGetResponseIncludedItem") + + +@_attrs_define +class WorkrecordsSingleGetResponseIncludedItem: + """""" + + 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) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + workrecords_single_get_response_included_item_obj = cls() + + workrecords_single_get_response_included_item_obj.additional_properties = ( + d + ) + return workrecords_single_get_response_included_item_obj + + @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/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_links.py b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_links.py new file mode 100644 index 00000000..928e87f3 --- /dev/null +++ b/polarion_rest_api_client/open_api_client/models/workrecords_single_get_response_links.py @@ -0,0 +1,64 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkrecordsSingleGetResponseLinks") + + +@_attrs_define +class WorkrecordsSingleGetResponseLinks: + """ + Attributes: + self_ (Union[Unset, str]): Example: server-host-name/application- + path/projects/MyProjectId/workitems/MyWorkItemId/workrecords/MyWorkRecordId?revision=1234. + """ + + self_: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> Dict[str, Any]: + self_ = self.self_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if self_ is not UNSET: + field_dict["self"] = self_ + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + self_ = d.pop("self", UNSET) + + workrecords_single_get_response_links_obj = cls( + self_=self_, + ) + + workrecords_single_get_response_links_obj.additional_properties = d + return workrecords_single_get_response_links_obj + + @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/polarion_rest_api_client/open_api_client/types.py b/polarion_rest_api_client/open_api_client/types.py index 029db940..4d33c494 100644 --- a/polarion_rest_api_client/open_api_client/types.py +++ b/polarion_rest_api_client/open_api_client/types.py @@ -52,4 +52,4 @@ class Response(Generic[T]): parsed: Optional[T] -__all__ = ["File", "Response", "FileJsonType"] +__all__ = ["File", "Response", "FileJsonType", "Unset", "UNSET"] diff --git a/pyproject.toml b/pyproject.toml index b0414941..d20d7fb1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ Documentation = "https://dsd-dbs.github.io/polarion-rest-api-client" [project.optional-dependencies] dev = [ - "openapi-python-client==0.15.1" + "openapi-python-client==0.17.1" ] docs = [