From fa3157c4ae22f9ca45b14e6156943e9389f30f6e Mon Sep 17 00:00:00 2001 From: "pavel.butuzov" Date: Wed, 22 Nov 2023 10:07:11 +0300 Subject: [PATCH] Supported TMS 4.5. --- ...tIdAttributesTemplatesSearchPostRequest.md | 14 + ...ProjectIdTestPlansDeleteBulkPostRequest.md | 13 + ...ectsProjectIdTestPlansSearchPostRequest.md | 27 + ...jectIdWorkItemsSearchGroupedPostRequest.md | 14 + ...ectsProjectIdWorkItemsSearchPostRequest.md | 14 + docs/AutotestSelectModelExtractionModel.md | 12 + docs/AutotestSelectModelFilter.md | 29 + docs/FilterModelData.md | 30 + docs/FlakyBulkModelAutotestSelect.md | 13 + docs/ProjectAttributeTemplatesApi.md | 271 +++++ docs/ProjectAttributesApi.md | 554 ++++++++++ docs/ProjectConfigurationsApi.md | 92 ++ docs/ProjectExportApi.md | 471 +++++++++ docs/ProjectImportApi.md | 278 +++++ docs/ProjectSectionsApi.md | 108 ++ docs/ProjectTestPlanAttributesApi.md | 453 +++++++++ docs/ProjectTestPlansApi.md | 559 ++++++++++ docs/ProjectWorkItemsApi.md | 510 ++++++++++ ...estPlanChangeModelTestPlanChangedFields.md | 24 + docs/TestPlanWithAnalyticModelAnalytic.md | 16 + docs/TestRunModelAnalytic.md | 13 + docs/UserWithRankModelUserRank.md | 17 + ...orkItemChangeModelWorkItemChangedFields.md | 31 + ...rkItemChangedFieldsViewModelAttachments.md | 13 + ...WorkItemChangedFieldsViewModelAutoTests.md | 13 + .../WorkItemChangedFieldsViewModelDuration.md | 13 + .../WorkItemChangedFieldsViewModelGlobalId.md | 13 + ...WorkItemChangedFieldsViewModelIsDeleted.md | 13 + docs/WorkItemChangedFieldsViewModelLinks.md | 13 + ...WorkItemChangedFieldsViewModelProjectId.md | 13 + docs/WorkItemChangedFieldsViewModelState.md | 13 + docs/WorkItemChangedFieldsViewModelSteps.md | 14 + docs/WorkItemChangedFieldsViewModelTags.md | 13 + docs/WorkItemCommentModelUser.md | 25 + docs/WorkItemExtractionModel.md | 14 + docs/WorkItemExtractionModelIds.md | 14 + docs/WorkItemExtractionModelSectionIds.md | 14 + docs/WorkItemGroupGetModel.md | 13 + docs/WorkItemGroupGetModelSelectModel.md | 14 + docs/WorkItemGroupModel.md | 13 + docs/WorkItemGroupType.md | 11 + docs/WorkItemLocalFilterModel.md | 29 + docs/WorkItemLocalSelectModel.md | 13 + ...WorkItemLocalSelectModelExtractionModel.md | 15 + docs/WorkItemLocalSelectModelFilter.md | 30 + docs/WorkItemStepChangeViewModelWorkItem.md | 15 + .../api/project_attribute_templates_api.py | 494 +++++++++ .../api/project_attributes_api.py | 923 +++++++++++++++++ .../api/project_configurations_api.py | 174 ++++ .../api/project_export_api.py | 771 ++++++++++++++ .../api/project_import_api.py | 468 +++++++++ .../api/project_sections_api.py | 203 ++++ .../api/project_test_plan_attributes_api.py | 776 ++++++++++++++ .../api/project_test_plans_api.py | 958 ++++++++++++++++++ .../api/project_work_items_api.py | 876 ++++++++++++++++ ...ttributes_templates_search_post_request.py | 327 ++++++ ..._id_test_plans_delete_bulk_post_request.py | 327 ++++++ ...oject_id_test_plans_search_post_request.py | 409 ++++++++ ..._work_items_search_grouped_post_request.py | 331 ++++++ ...oject_id_work_items_search_post_request.py | 327 ++++++ .../autotest_select_model_extraction_model.py | 321 ++++++ .../model/autotest_select_model_filter.py | 409 ++++++++ .../model/filter_model_data.py | 431 ++++++++ .../model/flaky_bulk_model_autotest_select.py | 327 ++++++ ...n_change_model_test_plan_changed_fields.py | 387 +++++++ .../test_plan_with_analytic_model_analytic.py | 343 +++++++ .../model/test_run_model_analytic.py | 327 ++++++ .../model/user_with_rank_model_user_rank.py | 339 +++++++ ...m_change_model_work_item_changed_fields.py | 419 ++++++++ ...m_changed_fields_view_model_attachments.py | 325 ++++++ ...em_changed_fields_view_model_auto_tests.py | 325 ++++++ ...item_changed_fields_view_model_duration.py | 323 ++++++ ...tem_changed_fields_view_model_global_id.py | 323 ++++++ ...em_changed_fields_view_model_is_deleted.py | 323 ++++++ ...rk_item_changed_fields_view_model_links.py | 325 ++++++ ...em_changed_fields_view_model_project_id.py | 323 ++++++ ...rk_item_changed_fields_view_model_state.py | 323 ++++++ ...rk_item_changed_fields_view_model_steps.py | 329 ++++++ ...ork_item_changed_fields_view_model_tags.py | 323 ++++++ .../model/work_item_comment_model_user.py | 373 +++++++ .../model/work_item_extraction_model.py | 274 +++++ .../model/work_item_extraction_model_ids.py | 323 ++++++ .../work_item_extraction_model_section_ids.py | 323 ++++++ .../model/work_item_group_get_model.py | 278 +++++ .../work_item_group_get_model_select_model.py | 327 ++++++ .../model/work_item_group_model.py | 278 +++++ .../model/work_item_group_type.py | 295 ++++++ .../model/work_item_local_filter_model.py | 366 +++++++ .../model/work_item_local_select_model.py | 268 +++++ ...tem_local_select_model_extraction_model.py | 333 ++++++ .../work_item_local_select_model_filter.py | 425 ++++++++ ...k_item_step_change_view_model_work_item.py | 333 ++++++ 92 files changed, 22019 insertions(+) create mode 100644 docs/ApiV2ProjectsProjectIdAttributesTemplatesSearchPostRequest.md create mode 100644 docs/ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest.md create mode 100644 docs/ApiV2ProjectsProjectIdTestPlansSearchPostRequest.md create mode 100644 docs/ApiV2ProjectsProjectIdWorkItemsSearchGroupedPostRequest.md create mode 100644 docs/ApiV2ProjectsProjectIdWorkItemsSearchPostRequest.md create mode 100644 docs/AutotestSelectModelExtractionModel.md create mode 100644 docs/AutotestSelectModelFilter.md create mode 100644 docs/FilterModelData.md create mode 100644 docs/FlakyBulkModelAutotestSelect.md create mode 100644 docs/ProjectAttributeTemplatesApi.md create mode 100644 docs/ProjectAttributesApi.md create mode 100644 docs/ProjectConfigurationsApi.md create mode 100644 docs/ProjectExportApi.md create mode 100644 docs/ProjectImportApi.md create mode 100644 docs/ProjectSectionsApi.md create mode 100644 docs/ProjectTestPlanAttributesApi.md create mode 100644 docs/ProjectTestPlansApi.md create mode 100644 docs/ProjectWorkItemsApi.md create mode 100644 docs/TestPlanChangeModelTestPlanChangedFields.md create mode 100644 docs/TestPlanWithAnalyticModelAnalytic.md create mode 100644 docs/TestRunModelAnalytic.md create mode 100644 docs/UserWithRankModelUserRank.md create mode 100644 docs/WorkItemChangeModelWorkItemChangedFields.md create mode 100644 docs/WorkItemChangedFieldsViewModelAttachments.md create mode 100644 docs/WorkItemChangedFieldsViewModelAutoTests.md create mode 100644 docs/WorkItemChangedFieldsViewModelDuration.md create mode 100644 docs/WorkItemChangedFieldsViewModelGlobalId.md create mode 100644 docs/WorkItemChangedFieldsViewModelIsDeleted.md create mode 100644 docs/WorkItemChangedFieldsViewModelLinks.md create mode 100644 docs/WorkItemChangedFieldsViewModelProjectId.md create mode 100644 docs/WorkItemChangedFieldsViewModelState.md create mode 100644 docs/WorkItemChangedFieldsViewModelSteps.md create mode 100644 docs/WorkItemChangedFieldsViewModelTags.md create mode 100644 docs/WorkItemCommentModelUser.md create mode 100644 docs/WorkItemExtractionModel.md create mode 100644 docs/WorkItemExtractionModelIds.md create mode 100644 docs/WorkItemExtractionModelSectionIds.md create mode 100644 docs/WorkItemGroupGetModel.md create mode 100644 docs/WorkItemGroupGetModelSelectModel.md create mode 100644 docs/WorkItemGroupModel.md create mode 100644 docs/WorkItemGroupType.md create mode 100644 docs/WorkItemLocalFilterModel.md create mode 100644 docs/WorkItemLocalSelectModel.md create mode 100644 docs/WorkItemLocalSelectModelExtractionModel.md create mode 100644 docs/WorkItemLocalSelectModelFilter.md create mode 100644 docs/WorkItemStepChangeViewModelWorkItem.md create mode 100644 src/testit_api_client/api/project_attribute_templates_api.py create mode 100644 src/testit_api_client/api/project_attributes_api.py create mode 100644 src/testit_api_client/api/project_configurations_api.py create mode 100644 src/testit_api_client/api/project_export_api.py create mode 100644 src/testit_api_client/api/project_import_api.py create mode 100644 src/testit_api_client/api/project_sections_api.py create mode 100644 src/testit_api_client/api/project_test_plan_attributes_api.py create mode 100644 src/testit_api_client/api/project_test_plans_api.py create mode 100644 src/testit_api_client/api/project_work_items_api.py create mode 100644 src/testit_api_client/model/api_v2_projects_project_id_attributes_templates_search_post_request.py create mode 100644 src/testit_api_client/model/api_v2_projects_project_id_test_plans_delete_bulk_post_request.py create mode 100644 src/testit_api_client/model/api_v2_projects_project_id_test_plans_search_post_request.py create mode 100644 src/testit_api_client/model/api_v2_projects_project_id_work_items_search_grouped_post_request.py create mode 100644 src/testit_api_client/model/api_v2_projects_project_id_work_items_search_post_request.py create mode 100644 src/testit_api_client/model/autotest_select_model_extraction_model.py create mode 100644 src/testit_api_client/model/autotest_select_model_filter.py create mode 100644 src/testit_api_client/model/filter_model_data.py create mode 100644 src/testit_api_client/model/flaky_bulk_model_autotest_select.py create mode 100644 src/testit_api_client/model/test_plan_change_model_test_plan_changed_fields.py create mode 100644 src/testit_api_client/model/test_plan_with_analytic_model_analytic.py create mode 100644 src/testit_api_client/model/test_run_model_analytic.py create mode 100644 src/testit_api_client/model/user_with_rank_model_user_rank.py create mode 100644 src/testit_api_client/model/work_item_change_model_work_item_changed_fields.py create mode 100644 src/testit_api_client/model/work_item_changed_fields_view_model_attachments.py create mode 100644 src/testit_api_client/model/work_item_changed_fields_view_model_auto_tests.py create mode 100644 src/testit_api_client/model/work_item_changed_fields_view_model_duration.py create mode 100644 src/testit_api_client/model/work_item_changed_fields_view_model_global_id.py create mode 100644 src/testit_api_client/model/work_item_changed_fields_view_model_is_deleted.py create mode 100644 src/testit_api_client/model/work_item_changed_fields_view_model_links.py create mode 100644 src/testit_api_client/model/work_item_changed_fields_view_model_project_id.py create mode 100644 src/testit_api_client/model/work_item_changed_fields_view_model_state.py create mode 100644 src/testit_api_client/model/work_item_changed_fields_view_model_steps.py create mode 100644 src/testit_api_client/model/work_item_changed_fields_view_model_tags.py create mode 100644 src/testit_api_client/model/work_item_comment_model_user.py create mode 100644 src/testit_api_client/model/work_item_extraction_model.py create mode 100644 src/testit_api_client/model/work_item_extraction_model_ids.py create mode 100644 src/testit_api_client/model/work_item_extraction_model_section_ids.py create mode 100644 src/testit_api_client/model/work_item_group_get_model.py create mode 100644 src/testit_api_client/model/work_item_group_get_model_select_model.py create mode 100644 src/testit_api_client/model/work_item_group_model.py create mode 100644 src/testit_api_client/model/work_item_group_type.py create mode 100644 src/testit_api_client/model/work_item_local_filter_model.py create mode 100644 src/testit_api_client/model/work_item_local_select_model.py create mode 100644 src/testit_api_client/model/work_item_local_select_model_extraction_model.py create mode 100644 src/testit_api_client/model/work_item_local_select_model_filter.py create mode 100644 src/testit_api_client/model/work_item_step_change_view_model_work_item.py diff --git a/docs/ApiV2ProjectsProjectIdAttributesTemplatesSearchPostRequest.md b/docs/ApiV2ProjectsProjectIdAttributesTemplatesSearchPostRequest.md new file mode 100644 index 0000000..6cc02e9 --- /dev/null +++ b/docs/ApiV2ProjectsProjectIdAttributesTemplatesSearchPostRequest.md @@ -0,0 +1,14 @@ +# ApiV2ProjectsProjectIdAttributesTemplatesSearchPostRequest + +Collection of filters to apply to search + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str, none_type** | Name of custom attribute template | [optional] +**custom_attribute_types** | [**[CustomAttributeTypesEnum], none_type**](CustomAttributeTypesEnum.md) | Collection of custom attributes types | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest.md b/docs/ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest.md new file mode 100644 index 0000000..7c82633 --- /dev/null +++ b/docs/ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest.md @@ -0,0 +1,13 @@ +# ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter** | [**ApiV2ProjectsProjectIdTestPlansSearchPostRequest**](ApiV2ProjectsProjectIdTestPlansSearchPostRequest.md) | | +**extraction_model** | [**TestPlanExtractionModel**](TestPlanExtractionModel.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApiV2ProjectsProjectIdTestPlansSearchPostRequest.md b/docs/ApiV2ProjectsProjectIdTestPlansSearchPostRequest.md new file mode 100644 index 0000000..7749262 --- /dev/null +++ b/docs/ApiV2ProjectsProjectIdTestPlansSearchPostRequest.md @@ -0,0 +1,27 @@ +# ApiV2ProjectsProjectIdTestPlansSearchPostRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str, none_type** | | [optional] +**description** | **str, none_type** | | [optional] +**build** | **str, none_type** | | [optional] +**product_name** | **str, none_type** | | [optional] +**status** | [**[TestPlanStatusModel], none_type**](TestPlanStatusModel.md) | | [optional] +**global_ids** | **[int], none_type** | | [optional] +**is_locked** | **bool, none_type** | | [optional] +**locked_date** | [**DateTimeRangeSelectorModel**](DateTimeRangeSelectorModel.md) | | [optional] +**automatic_duration_timer** | **[bool], none_type** | | [optional] +**created_by_ids** | **[str], none_type** | | [optional] +**created_date** | [**DateTimeRangeSelectorModel**](DateTimeRangeSelectorModel.md) | | [optional] +**start_date** | [**DateTimeRangeSelectorModel**](DateTimeRangeSelectorModel.md) | | [optional] +**end_date** | [**DateTimeRangeSelectorModel**](DateTimeRangeSelectorModel.md) | | [optional] +**tag_names** | **[str], none_type** | | [optional] +**attributes** | **{str: ([str], none_type)}, none_type** | | [optional] +**is_deleted** | **bool, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApiV2ProjectsProjectIdWorkItemsSearchGroupedPostRequest.md b/docs/ApiV2ProjectsProjectIdWorkItemsSearchGroupedPostRequest.md new file mode 100644 index 0000000..e57d206 --- /dev/null +++ b/docs/ApiV2ProjectsProjectIdWorkItemsSearchGroupedPostRequest.md @@ -0,0 +1,14 @@ +# ApiV2ProjectsProjectIdWorkItemsSearchGroupedPostRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_type** | [**WorkItemGroupType**](WorkItemGroupType.md) | | +**select_model** | [**WorkItemGroupGetModelSelectModel**](WorkItemGroupGetModelSelectModel.md) | | [optional] +**custom_attribute_id** | **str, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApiV2ProjectsProjectIdWorkItemsSearchPostRequest.md b/docs/ApiV2ProjectsProjectIdWorkItemsSearchPostRequest.md new file mode 100644 index 0000000..fee8544 --- /dev/null +++ b/docs/ApiV2ProjectsProjectIdWorkItemsSearchPostRequest.md @@ -0,0 +1,14 @@ +# ApiV2ProjectsProjectIdWorkItemsSearchPostRequest + +Model containing options to filter work items + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter** | [**WorkItemSelectModelFilter**](WorkItemSelectModelFilter.md) | | +**extraction_model** | [**WorkItemLocalSelectModelExtractionModel**](WorkItemLocalSelectModelExtractionModel.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AutotestSelectModelExtractionModel.md b/docs/AutotestSelectModelExtractionModel.md new file mode 100644 index 0000000..165d477 --- /dev/null +++ b/docs/AutotestSelectModelExtractionModel.md @@ -0,0 +1,12 @@ +# AutotestSelectModelExtractionModel + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ids** | [**AutotestsExtractionModelIds**](AutotestsExtractionModelIds.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AutotestSelectModelFilter.md b/docs/AutotestSelectModelFilter.md new file mode 100644 index 0000000..10e5655 --- /dev/null +++ b/docs/AutotestSelectModelFilter.md @@ -0,0 +1,29 @@ +# AutotestSelectModelFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_ids** | **[str], none_type** | Specifies an autotest projects IDs to search for | [optional] +**external_ids** | **[str], none_type** | Specifies an autotest external IDs to search for | [optional] +**global_ids** | **[int], none_type** | Specifies an autotest global IDs to search for | [optional] +**name** | **str, none_type** | Specifies an autotest name to search for | [optional] +**is_flaky** | **bool, none_type** | Specifies an autotest flaky status to search for | [optional] +**must_be_approved** | **bool, none_type** | Specifies an autotest unapproved changes status to search for | [optional] +**stability_percentage** | [**AutotestFilterModelStabilityPercentage**](AutotestFilterModelStabilityPercentage.md) | | [optional] +**created_date** | [**AutotestFilterModelCreatedDate**](AutotestFilterModelCreatedDate.md) | | [optional] +**created_by_ids** | **[str], none_type** | Specifies an autotest creator IDs to search for | [optional] +**modified_date** | [**AutotestFilterModelModifiedDate**](AutotestFilterModelModifiedDate.md) | | [optional] +**modified_by_ids** | **[str], none_type** | Specifies an autotest last editor IDs to search for | [optional] +**is_deleted** | **bool, none_type** | Specifies an autotest deleted status to search for | [optional] +**namespace** | **str, none_type** | Specifies an autotest namespace to search for | [optional] +**is_empty_namespace** | **bool, none_type** | Specifies an autotest namespace name presence status to search for | [optional] +**class_name** | **str, none_type** | Specifies an autotest class name to search for | [optional] +**is_empty_class_name** | **bool, none_type** | Specifies an autotest class name presence status to search for | [optional] +**last_test_result_outcome** | [**AutotestResultOutcome**](AutotestResultOutcome.md) | | [optional] +**external_key** | **str, none_type** | Specifies an autotest external key to search for | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FilterModelData.md b/docs/FilterModelData.md new file mode 100644 index 0000000..7289a2f --- /dev/null +++ b/docs/FilterModelData.md @@ -0,0 +1,30 @@ +# FilterModelData + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_ids** | **[str], none_type** | Collection of project identifiers | [optional] +**name** | **str, none_type** | Name of work item | [optional] +**ids** | **[str], none_type** | Specifies a work item unique IDs to search for | [optional] +**global_ids** | **[int], none_type** | Collection of global (integer) identifiers | [optional] +**attributes** | **{str: ([str], none_type)}, none_type** | Custom attributes of work item | [optional] +**is_deleted** | **bool, none_type** | Is result must consist of only actual/deleted work items | [optional] +**section_ids** | **[str], none_type** | Collection of section identifiers | [optional] +**created_by_ids** | **[str], none_type** | Collection of identifiers of users who created work item | [optional] +**modified_by_ids** | **[str], none_type** | Collection of identifiers of users who applied last modification to work item | [optional] +**states** | [**[WorkItemStates], none_type**](WorkItemStates.md) | Collection of states of work item | [optional] +**priorities** | [**[WorkItemPriorityModel], none_type**](WorkItemPriorityModel.md) | Collection of priorities of work item | [optional] +**types** | [**[WorkItemEntityTypes], none_type**](WorkItemEntityTypes.md) | Collection of types of work item | [optional] +**created_date** | [**TestPointFilterModelWorkItemCreatedDate**](TestPointFilterModelWorkItemCreatedDate.md) | | [optional] +**modified_date** | [**TestPointFilterModelWorkItemModifiedDate**](TestPointFilterModelWorkItemModifiedDate.md) | | [optional] +**duration** | [**TestSuiteWorkItemsSearchModelDuration**](TestSuiteWorkItemsSearchModelDuration.md) | | [optional] +**median_duration** | [**TestSuiteWorkItemsSearchModelMedianDuration**](TestSuiteWorkItemsSearchModelMedianDuration.md) | | [optional] +**is_automated** | **bool, none_type** | Is result must consist of only manual/automated work items | [optional] +**tags** | **[str], none_type** | Collection of tags | [optional] +**auto_test_ids** | **[str], none_type** | Collection of identifiers of linked autotests | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlakyBulkModelAutotestSelect.md b/docs/FlakyBulkModelAutotestSelect.md new file mode 100644 index 0000000..b65e6bc --- /dev/null +++ b/docs/FlakyBulkModelAutotestSelect.md @@ -0,0 +1,13 @@ +# FlakyBulkModelAutotestSelect + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter** | [**AutotestSelectModelFilter**](AutotestSelectModelFilter.md) | | +**extraction_model** | [**AutotestSelectModelExtractionModel**](AutotestSelectModelExtractionModel.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProjectAttributeTemplatesApi.md b/docs/ProjectAttributeTemplatesApi.md new file mode 100644 index 0000000..08e30a0 --- /dev/null +++ b/docs/ProjectAttributeTemplatesApi.md @@ -0,0 +1,271 @@ +# testit_api_client.ProjectAttributeTemplatesApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**api_v2_projects_project_id_attributes_templates_search_post**](ProjectAttributeTemplatesApi.md#api_v2_projects_project_id_attributes_templates_search_post) | **POST** /api/v2/projects/{projectId}/attributes/templates/search | Search for custom attributes templates +[**api_v2_projects_project_id_attributes_templates_template_id_delete**](ProjectAttributeTemplatesApi.md#api_v2_projects_project_id_attributes_templates_template_id_delete) | **DELETE** /api/v2/projects/{projectId}/attributes/templates/{templateId} | Delete CustomAttributeTemplate from Project +[**api_v2_projects_project_id_attributes_templates_template_id_post**](ProjectAttributeTemplatesApi.md#api_v2_projects_project_id_attributes_templates_template_id_post) | **POST** /api/v2/projects/{projectId}/attributes/templates/{templateId} | Add CustomAttributeTemplate to Project + + +# **api_v2_projects_project_id_attributes_templates_search_post** +> [ProjectCustomAttributeTemplateGetModel] api_v2_projects_project_id_attributes_templates_search_post(project_id) + +Search for custom attributes templates + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_attribute_templates_api +from testit_api_client.model.api_v2_projects_project_id_attributes_templates_search_post_request import ApiV2ProjectsProjectIdAttributesTemplatesSearchPostRequest +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.project_custom_attribute_template_get_model import ProjectCustomAttributeTemplateGetModel +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_attribute_templates_api.ProjectAttributeTemplatesApi(api_client) + project_id = "projectId_example" # str | + skip = 1 # int | Amount of items to be skipped (offset) (optional) + take = 1 # int | Amount of items to be taken (limit) (optional) + order_by = "OrderBy_example" # str | SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + search_field = "SearchField_example" # str | Property name for searching (optional) + search_value = "SearchValue_example" # str | Value for searching (optional) + api_v2_projects_project_id_attributes_templates_search_post_request = ApiV2ProjectsProjectIdAttributesTemplatesSearchPostRequest(None) # ApiV2ProjectsProjectIdAttributesTemplatesSearchPostRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Search for custom attributes templates + api_response = api_instance.api_v2_projects_project_id_attributes_templates_search_post(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectAttributeTemplatesApi->api_v2_projects_project_id_attributes_templates_search_post: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Search for custom attributes templates + api_response = api_instance.api_v2_projects_project_id_attributes_templates_search_post(project_id, skip=skip, take=take, order_by=order_by, search_field=search_field, search_value=search_value, api_v2_projects_project_id_attributes_templates_search_post_request=api_v2_projects_project_id_attributes_templates_search_post_request) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectAttributeTemplatesApi->api_v2_projects_project_id_attributes_templates_search_post: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **skip** | **int**| Amount of items to be skipped (offset) | [optional] + **take** | **int**| Amount of items to be taken (limit) | [optional] + **order_by** | **str**| SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) | [optional] + **search_field** | **str**| Property name for searching | [optional] + **search_value** | **str**| Value for searching | [optional] + **api_v2_projects_project_id_attributes_templates_search_post_request** | [**ApiV2ProjectsProjectIdAttributesTemplatesSearchPostRequest**](ApiV2ProjectsProjectIdAttributesTemplatesSearchPostRequest.md)| | [optional] + +### Return type + +[**[ProjectCustomAttributeTemplateGetModel]**](ProjectCustomAttributeTemplateGetModel.md) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
| +**403** | Project admin permission for project settings is required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v2_projects_project_id_attributes_templates_template_id_delete** +> api_v2_projects_project_id_attributes_templates_template_id_delete(project_id, template_id) + +Delete CustomAttributeTemplate from Project + +
Use case
User sets project internal or global identifier
User sets attribute template internal identifier
User runs method execution
System delete attribute template from project + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_attribute_templates_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_attribute_templates_api.ProjectAttributeTemplatesApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + template_id = "templateId_example" # str | CustomAttributeTemplate internal (UUID) identifier + + # example passing only required values which don't have defaults set + try: + # Delete CustomAttributeTemplate from Project + api_instance.api_v2_projects_project_id_attributes_templates_template_id_delete(project_id, template_id) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectAttributeTemplatesApi->api_v2_projects_project_id_attributes_templates_template_id_delete: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **template_id** | **str**| CustomAttributeTemplate internal (UUID) identifier | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**403** | Update project settings permission for project required | - | +**404** | Can't find a Project with identifier | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v2_projects_project_id_attributes_templates_template_id_post** +> api_v2_projects_project_id_attributes_templates_template_id_post(project_id, template_id) + +Add CustomAttributeTemplate to Project + +
Use case
User sets project internal or global identifier
User sets attribute template internal identifier
User runs method execution
System add attribute template to project + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_attribute_templates_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_attribute_templates_api.ProjectAttributeTemplatesApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + template_id = "templateId_example" # str | CustomAttributeTemplate internal (UUID) identifier + + # example passing only required values which don't have defaults set + try: + # Add CustomAttributeTemplate to Project + api_instance.api_v2_projects_project_id_attributes_templates_template_id_post(project_id, template_id) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectAttributeTemplatesApi->api_v2_projects_project_id_attributes_templates_template_id_post: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **template_id** | **str**| CustomAttributeTemplate internal (UUID) identifier | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Update project settings permission for project required | - | +**404** | Can't find a Project with identifier | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ProjectAttributesApi.md b/docs/ProjectAttributesApi.md new file mode 100644 index 0000000..bc1de3d --- /dev/null +++ b/docs/ProjectAttributesApi.md @@ -0,0 +1,554 @@ +# testit_api_client.ProjectAttributesApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_projects_attribute**](ProjectAttributesApi.md#create_projects_attribute) | **POST** /api/v2/projects/{projectId}/attributes | Create project attribute +[**delete_projects_attribute**](ProjectAttributesApi.md#delete_projects_attribute) | **DELETE** /api/v2/projects/{projectId}/attributes/{attributeId} | Delete project attribute +[**get_attribute_by_project_id**](ProjectAttributesApi.md#get_attribute_by_project_id) | **GET** /api/v2/projects/{projectId}/attributes/{attributeId} | Get project attribute +[**get_attributes_by_project_id**](ProjectAttributesApi.md#get_attributes_by_project_id) | **GET** /api/v2/projects/{projectId}/attributes | Get project attributes +[**search_attributes_in_project**](ProjectAttributesApi.md#search_attributes_in_project) | **POST** /api/v2/projects/{projectId}/attributes/search | Search for attributes used in the project +[**update_projects_attribute**](ProjectAttributesApi.md#update_projects_attribute) | **PUT** /api/v2/projects/{projectId}/attributes | Edit attribute of the project + + +# **create_projects_attribute** +> CustomAttributeModel create_projects_attribute(project_id) + +Create project attribute + +
Use case
User sets attribute parameters (listed in request example) and runs method execution
System search project
System creates attribute and relates it to the project
System returns project attribute properties (example listed in response parameters) + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_attributes_api +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.create_projects_attribute_request import CreateProjectsAttributeRequest +from testit_api_client.model.custom_attribute_model import CustomAttributeModel +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_attributes_api.ProjectAttributesApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + create_projects_attribute_request = CreateProjectsAttributeRequest(None) # CreateProjectsAttributeRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Create project attribute + api_response = api_instance.create_projects_attribute(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectAttributesApi->create_projects_attribute: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Create project attribute + api_response = api_instance.create_projects_attribute(project_id, create_projects_attribute_request=create_projects_attribute_request) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectAttributesApi->create_projects_attribute: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **create_projects_attribute_request** | [**CreateProjectsAttributeRequest**](CreateProjectsAttributeRequest.md)| | [optional] + +### Return type + +[**CustomAttributeModel**](CustomAttributeModel.md) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**403** | Update permission for project settings is required | - | +**400** | <br>- Attribute is `null` <br>- Priority is invalid <br>- Attribute with `Options` type must have an options <br>- ID is not `null` <br>- Option ID is not `null` | - | +**404** | Project with provided ID was not found | - | +**409** | <br>`CustomAttribute.Name` or `CustomAttribute.Id` are not unique in attributes schemes <br>`CustomAttributeOptionModel.Id` or `CustomAttributeOptionModel.Value` are not unique in `attributesScheme.Options` | - | +**422** | Cannot add new attribute from template which is in use | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_projects_attribute** +> delete_projects_attribute(project_id, attribute_id) + +Delete project attribute + +
Use case
User sets project identifier and runs method execution
User sets attribute identifier
User runs method execution
System search project
System search and delete attribute
System returns no content response + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_attributes_api +from testit_api_client.model.problem_details import ProblemDetails +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_attributes_api.ProjectAttributesApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + attribute_id = "attributeId_example" # str | Project attribute internal (UUID) + + # example passing only required values which don't have defaults set + try: + # Delete project attribute + api_instance.delete_projects_attribute(project_id, attribute_id) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectAttributesApi->delete_projects_attribute: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **attribute_id** | **str**| Project attribute internal (UUID) | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successful operation | - | +**403** | Update permission for project settings is required | - | +**400** | <br>- Project ID is invalid <br>- Project attribute ID is invalid <br>- Attribute is empty | - | +**404** | Project with provided ID was not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_attribute_by_project_id** +> CustomAttributeModel get_attribute_by_project_id(project_id, attribute_id) + +Get project attribute + +
Use case
User sets project internal or global identifier
User sets project attribute identifier
User runs method execution
System search project
System search project attribute
System returns project attribute (listed in response model) + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_attributes_api +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.custom_attribute_model import CustomAttributeModel +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_attributes_api.ProjectAttributesApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + attribute_id = "attributeId_example" # str | Project attribute internal (UUID) or global (integer) identifier + + # example passing only required values which don't have defaults set + try: + # Get project attribute + api_response = api_instance.get_attribute_by_project_id(project_id, attribute_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectAttributesApi->get_attribute_by_project_id: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **attribute_id** | **str**| Project attribute internal (UUID) or global (integer) identifier | + +### Return type + +[**CustomAttributeModel**](CustomAttributeModel.md) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Read permission for test library is required | - | +**404** | <br>- Project with provided ID was not found <br>- Project attribute with provided ID was not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_attributes_by_project_id** +> [CustomAttributeModel] get_attributes_by_project_id(project_id) + +Get project attributes + +
Use case
User sets project internal or global identifier
[Optional] User sets isDeleted field value
User runs method execution
System search project
[Optional] If User sets isDeleted field value as true, System search all deleted attributes related to project
[Optional] If User sets isDeleted field value as false, System search all attributes related to project which are not deleted
[Optional] If User did not set isDeleted field value, System search all attributes related to project
System returns array of found attributes (listed in response model) + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_attributes_api +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.custom_attribute_model import CustomAttributeModel +from testit_api_client.model.deletion_state import DeletionState +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_attributes_api.ProjectAttributesApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + is_deleted = None # DeletionState | (optional) if omitted the server will use the default value of NotDeleted + + # example passing only required values which don't have defaults set + try: + # Get project attributes + api_response = api_instance.get_attributes_by_project_id(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectAttributesApi->get_attributes_by_project_id: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get project attributes + api_response = api_instance.get_attributes_by_project_id(project_id, is_deleted=is_deleted) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectAttributesApi->get_attributes_by_project_id: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **is_deleted** | **DeletionState**| | [optional] if omitted the server will use the default value of NotDeleted + +### Return type + +[**[CustomAttributeModel]**](CustomAttributeModel.md) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Read permission for test library is required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **search_attributes_in_project** +> [CustomAttributeGetModel] search_attributes_in_project(project_id) + +Search for attributes used in the project + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_attributes_api +from testit_api_client.model.custom_attribute_get_model import CustomAttributeGetModel +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.search_attributes_in_project_request import SearchAttributesInProjectRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_attributes_api.ProjectAttributesApi(api_client) + project_id = "projectId_example" # str | Unique or global project ID + skip = 1 # int | Amount of items to be skipped (offset) (optional) + take = 1 # int | Amount of items to be taken (limit) (optional) + order_by = "OrderBy_example" # str | SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + search_field = "SearchField_example" # str | Property name for searching (optional) + search_value = "SearchValue_example" # str | Value for searching (optional) + search_attributes_in_project_request = SearchAttributesInProjectRequest(None) # SearchAttributesInProjectRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Search for attributes used in the project + api_response = api_instance.search_attributes_in_project(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectAttributesApi->search_attributes_in_project: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Search for attributes used in the project + api_response = api_instance.search_attributes_in_project(project_id, skip=skip, take=take, order_by=order_by, search_field=search_field, search_value=search_value, search_attributes_in_project_request=search_attributes_in_project_request) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectAttributesApi->search_attributes_in_project: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Unique or global project ID | + **skip** | **int**| Amount of items to be skipped (offset) | [optional] + **take** | **int**| Amount of items to be taken (limit) | [optional] + **order_by** | **str**| SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) | [optional] + **search_field** | **str**| Property name for searching | [optional] + **search_value** | **str**| Value for searching | [optional] + **search_attributes_in_project_request** | [**SearchAttributesInProjectRequest**](SearchAttributesInProjectRequest.md)| | [optional] + +### Return type + +[**[CustomAttributeGetModel]**](CustomAttributeGetModel.md) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
| +**403** | Read permission for project is required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_projects_attribute** +> update_projects_attribute(project_id) + +Edit attribute of the project + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_attributes_api +from testit_api_client.model.update_projects_attribute_request import UpdateProjectsAttributeRequest +from testit_api_client.model.problem_details import ProblemDetails +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_attributes_api.ProjectAttributesApi(api_client) + project_id = "projectId_example" # str | Unique or global project ID + update_projects_attribute_request = UpdateProjectsAttributeRequest(None) # UpdateProjectsAttributeRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Edit attribute of the project + api_instance.update_projects_attribute(project_id) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectAttributesApi->update_projects_attribute: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Edit attribute of the project + api_instance.update_projects_attribute(project_id, update_projects_attribute_request=update_projects_attribute_request) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectAttributesApi->update_projects_attribute: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Unique or global project ID | + **update_projects_attribute_request** | [**UpdateProjectsAttributeRequest**](UpdateProjectsAttributeRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**403** | Update permission for project settings is required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ProjectConfigurationsApi.md b/docs/ProjectConfigurationsApi.md new file mode 100644 index 0000000..9dee9b5 --- /dev/null +++ b/docs/ProjectConfigurationsApi.md @@ -0,0 +1,92 @@ +# testit_api_client.ProjectConfigurationsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_configurations_by_project_id**](ProjectConfigurationsApi.md#get_configurations_by_project_id) | **GET** /api/v2/projects/{projectId}/configurations | Get project configurations + + +# **get_configurations_by_project_id** +> [ConfigurationModel] get_configurations_by_project_id(project_id) + +Get project configurations + +
Use case
User sets project internal or global identifier
User runs method execution
System search project
System search all configurations related to project
System returns array of found configurations (listed in response model) + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_configurations_api +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.configuration_model import ConfigurationModel +from testit_api_client.model.validation_problem_details import ValidationProblemDetails +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_configurations_api.ProjectConfigurationsApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + + # example passing only required values which don't have defaults set + try: + # Get project configurations + api_response = api_instance.get_configurations_by_project_id(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectConfigurationsApi->get_configurations_by_project_id: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + +### Return type + +[**[ConfigurationModel]**](ConfigurationModel.md) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**403** | Read permission for configurations required | - | +**404** | Project with provided ID was not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ProjectExportApi.md b/docs/ProjectExportApi.md new file mode 100644 index 0000000..8b7ae10 --- /dev/null +++ b/docs/ProjectExportApi.md @@ -0,0 +1,471 @@ +# testit_api_client.ProjectExportApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**export**](ProjectExportApi.md#export) | **POST** /api/v2/projects/{projectId}/export | Export project as JSON file +[**export_project_json**](ProjectExportApi.md#export_project_json) | **POST** /api/v2/projects/{projectId}/export/json | Export project as JSON file in background job +[**export_project_with_test_plans_json**](ProjectExportApi.md#export_project_with_test_plans_json) | **POST** /api/v2/projects/{projectId}/export/testPlans/json | Export project as JSON file with test plans in background job +[**export_project_with_test_plans_zip**](ProjectExportApi.md#export_project_with_test_plans_zip) | **POST** /api/v2/projects/{projectId}/export/testPlans/zip | Export project as Zip file with test plans in background job +[**export_project_zip**](ProjectExportApi.md#export_project_zip) | **POST** /api/v2/projects/{projectId}/export/zip | Export project as Zip file in background job + + +# **export** +> file_type export(project_id) + +Export project as JSON file + +
This method exports the selected project or its part (sections, work items) to a `.json` file.
In the request body, you can specify sections and test cases to be exported.
Example of a request to export two sections and two test cases:
``` curl -X POST \"http://{domain}.com/api/v2/projects/27a32ce6-d972-4ef8-bef5-51be4bf9e468/export\" \\ -H \"accept: application/json\" -H \"Authorization: PrivateToken {token}\" -H \"Content-Type: application/json-patch+json\" \\ -d \"{\\\"sectionIds\\\":[\\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\\"9fa85f64-5717-4562-b3fc-2c963f66a000\\\"],\\\"workItemIds\\\":[\\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\\"90085f64-5717-4562-b3fc-2c963f66a000\\\"]}\" ```
In the response, you get:
- A `.zip` file with attachments and a.json file if you enable attachments export.
- A `.json` file with the project if you do not enable attachments export. + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_export_api +from testit_api_client.model.export_project_json_request import ExportProjectJsonRequest +from testit_api_client.model.problem_details import ProblemDetails +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_export_api.ProjectExportApi(api_client) + project_id = "projectId_example" # str | Specifies the ID of the project you want to export. + include_attachments = False # bool | Enables attachment export. (optional) if omitted the server will use the default value of False + export_project_json_request = ExportProjectJsonRequest(None) # ExportProjectJsonRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Export project as JSON file + api_response = api_instance.export(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectExportApi->export: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Export project as JSON file + api_response = api_instance.export(project_id, include_attachments=include_attachments, export_project_json_request=export_project_json_request) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectExportApi->export: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Specifies the ID of the project you want to export. | + **include_attachments** | **bool**| Enables attachment export. | [optional] if omitted the server will use the default value of False + **export_project_json_request** | [**ExportProjectJsonRequest**](ExportProjectJsonRequest.md)| | [optional] + +### Return type + +**file_type** + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Update permission for project settings is required | - | +**400** | Root section was not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **export_project_json** +> str export_project_json(project_id) + +Export project as JSON file in background job + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_export_api +from testit_api_client.model.export_project_json_request import ExportProjectJsonRequest +from testit_api_client.model.problem_details import ProblemDetails +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_export_api.ProjectExportApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + time_zone_offset_in_minutes = 1 # int | (optional) + export_project_json_request = ExportProjectJsonRequest(None) # ExportProjectJsonRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Export project as JSON file in background job + api_response = api_instance.export_project_json(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectExportApi->export_project_json: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Export project as JSON file in background job + api_response = api_instance.export_project_json(project_id, time_zone_offset_in_minutes=time_zone_offset_in_minutes, export_project_json_request=export_project_json_request) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectExportApi->export_project_json: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **time_zone_offset_in_minutes** | **int**| | [optional] + **export_project_json_request** | [**ExportProjectJsonRequest**](ExportProjectJsonRequest.md)| | [optional] + +### Return type + +**str** + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Update permission for project settings is required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **export_project_with_test_plans_json** +> str export_project_with_test_plans_json(project_id) + +Export project as JSON file with test plans in background job + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_export_api +from testit_api_client.model.export_project_with_test_plans_json_request import ExportProjectWithTestPlansJsonRequest +from testit_api_client.model.problem_details import ProblemDetails +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_export_api.ProjectExportApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + time_zone_offset_in_minutes = 1 # int | (optional) + export_project_with_test_plans_json_request = ExportProjectWithTestPlansJsonRequest(None) # ExportProjectWithTestPlansJsonRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Export project as JSON file with test plans in background job + api_response = api_instance.export_project_with_test_plans_json(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectExportApi->export_project_with_test_plans_json: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Export project as JSON file with test plans in background job + api_response = api_instance.export_project_with_test_plans_json(project_id, time_zone_offset_in_minutes=time_zone_offset_in_minutes, export_project_with_test_plans_json_request=export_project_with_test_plans_json_request) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectExportApi->export_project_with_test_plans_json: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **time_zone_offset_in_minutes** | **int**| | [optional] + **export_project_with_test_plans_json_request** | [**ExportProjectWithTestPlansJsonRequest**](ExportProjectWithTestPlansJsonRequest.md)| | [optional] + +### Return type + +**str** + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Update permission for project settings is required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **export_project_with_test_plans_zip** +> str export_project_with_test_plans_zip(project_id) + +Export project as Zip file with test plans in background job + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_export_api +from testit_api_client.model.export_project_with_test_plans_json_request import ExportProjectWithTestPlansJsonRequest +from testit_api_client.model.problem_details import ProblemDetails +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_export_api.ProjectExportApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + time_zone_offset_in_minutes = 1 # int | (optional) + export_project_with_test_plans_json_request = ExportProjectWithTestPlansJsonRequest(None) # ExportProjectWithTestPlansJsonRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Export project as Zip file with test plans in background job + api_response = api_instance.export_project_with_test_plans_zip(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectExportApi->export_project_with_test_plans_zip: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Export project as Zip file with test plans in background job + api_response = api_instance.export_project_with_test_plans_zip(project_id, time_zone_offset_in_minutes=time_zone_offset_in_minutes, export_project_with_test_plans_json_request=export_project_with_test_plans_json_request) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectExportApi->export_project_with_test_plans_zip: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **time_zone_offset_in_minutes** | **int**| | [optional] + **export_project_with_test_plans_json_request** | [**ExportProjectWithTestPlansJsonRequest**](ExportProjectWithTestPlansJsonRequest.md)| | [optional] + +### Return type + +**str** + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Update permission for project settings is required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **export_project_zip** +> str export_project_zip(project_id) + +Export project as Zip file in background job + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_export_api +from testit_api_client.model.export_project_json_request import ExportProjectJsonRequest +from testit_api_client.model.problem_details import ProblemDetails +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_export_api.ProjectExportApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + time_zone_offset_in_minutes = 1 # int | (optional) + export_project_json_request = ExportProjectJsonRequest(None) # ExportProjectJsonRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Export project as Zip file in background job + api_response = api_instance.export_project_zip(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectExportApi->export_project_zip: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Export project as Zip file in background job + api_response = api_instance.export_project_zip(project_id, time_zone_offset_in_minutes=time_zone_offset_in_minutes, export_project_json_request=export_project_json_request) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectExportApi->export_project_zip: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **time_zone_offset_in_minutes** | **int**| | [optional] + **export_project_json_request** | [**ExportProjectJsonRequest**](ExportProjectJsonRequest.md)| | [optional] + +### Return type + +**str** + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Update permission for project settings is required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ProjectImportApi.md b/docs/ProjectImportApi.md new file mode 100644 index 0000000..f2bf083 --- /dev/null +++ b/docs/ProjectImportApi.md @@ -0,0 +1,278 @@ +# testit_api_client.ProjectImportApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**background_import_to_existing_project**](ProjectImportApi.md#background_import_to_existing_project) | **POST** /api/v2/projects/{projectId}/import/json | Import project from JSON file into existing project in background job +[**background_import_zip_to_existing_project**](ProjectImportApi.md#background_import_zip_to_existing_project) | **POST** /api/v2/projects/{projectId}/import/zip | Import project from Zip file into existing project in background job +[**import_to_existing_project**](ProjectImportApi.md#import_to_existing_project) | **POST** /api/v2/projects/{projectId}/import | Import project from JSON file into existing project + + +# **background_import_to_existing_project** +> str background_import_to_existing_project(project_id) + +Import project from JSON file into existing project in background job + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_import_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_import_api.ProjectImportApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + file = open('/path/to/file', 'rb') # file_type | Select file (optional) + + # example passing only required values which don't have defaults set + try: + # Import project from JSON file into existing project in background job + api_response = api_instance.background_import_to_existing_project(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectImportApi->background_import_to_existing_project: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Import project from JSON file into existing project in background job + api_response = api_instance.background_import_to_existing_project(project_id, file=file) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectImportApi->background_import_to_existing_project: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **file** | **file_type**| Select file | [optional] + +### Return type + +**str** + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Update permission for project settings required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **background_import_zip_to_existing_project** +> str background_import_zip_to_existing_project(project_id) + +Import project from Zip file into existing project in background job + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_import_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_import_api.ProjectImportApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + file = open('/path/to/file', 'rb') # file_type | Select file (optional) + + # example passing only required values which don't have defaults set + try: + # Import project from Zip file into existing project in background job + api_response = api_instance.background_import_zip_to_existing_project(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectImportApi->background_import_zip_to_existing_project: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Import project from Zip file into existing project in background job + api_response = api_instance.background_import_zip_to_existing_project(project_id, file=file) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectImportApi->background_import_zip_to_existing_project: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **file** | **file_type**| Select file | [optional] + +### Return type + +**str** + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Update permission for project settings required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **import_to_existing_project** +> import_to_existing_project(project_id) + +Import project from JSON file into existing project + +
Use case
User attaches project as json file taken from export or export-by-testPlans method
User runs method execution
System updates project
System returns no content response + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_import_api +from testit_api_client.model.problem_details import ProblemDetails +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_import_api.ProjectImportApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + include_attachments = True # bool | (optional) + file = open('/path/to/file', 'rb') # file_type | Select file (optional) + + # example passing only required values which don't have defaults set + try: + # Import project from JSON file into existing project + api_instance.import_to_existing_project(project_id) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectImportApi->import_to_existing_project: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Import project from JSON file into existing project + api_instance.import_to_existing_project(project_id, include_attachments=include_attachments, file=file) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectImportApi->import_to_existing_project: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **include_attachments** | **bool**| | [optional] + **file** | **file_type**| Select file | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**403** | Update permission for project settings required | - | +**413** | Multipart body length limit exceeded | - | +**404** | File not found | - | +**409** | Entity with same id already imported in other project | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ProjectSectionsApi.md b/docs/ProjectSectionsApi.md new file mode 100644 index 0000000..0c78bc1 --- /dev/null +++ b/docs/ProjectSectionsApi.md @@ -0,0 +1,108 @@ +# testit_api_client.ProjectSectionsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_sections_by_project_id**](ProjectSectionsApi.md#get_sections_by_project_id) | **GET** /api/v2/projects/{projectId}/sections | Get project sections + + +# **get_sections_by_project_id** +> [SectionModel] get_sections_by_project_id(project_id) + +Get project sections + +
Use case
User sets project internal or global identifier and runs method execution
System search project
System search all sections related to the project
System returns array of sections (listed in response) + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_sections_api +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.section_model import SectionModel +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_sections_api.ProjectSectionsApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + skip = 1 # int | Amount of items to be skipped (offset) (optional) + take = 1 # int | Amount of items to be taken (limit) (optional) + order_by = "OrderBy_example" # str | SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + search_field = "SearchField_example" # str | Property name for searching (optional) + search_value = "SearchValue_example" # str | Value for searching (optional) + + # example passing only required values which don't have defaults set + try: + # Get project sections + api_response = api_instance.get_sections_by_project_id(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectSectionsApi->get_sections_by_project_id: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get project sections + api_response = api_instance.get_sections_by_project_id(project_id, skip=skip, take=take, order_by=order_by, search_field=search_field, search_value=search_value) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectSectionsApi->get_sections_by_project_id: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **skip** | **int**| Amount of items to be skipped (offset) | [optional] + **take** | **int**| Amount of items to be taken (limit) | [optional] + **order_by** | **str**| SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) | [optional] + **search_field** | **str**| Property name for searching | [optional] + **search_value** | **str**| Value for searching | [optional] + +### Return type + +[**[SectionModel]**](SectionModel.md) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
| +**403** | Read permission for test library is required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ProjectTestPlanAttributesApi.md b/docs/ProjectTestPlanAttributesApi.md new file mode 100644 index 0000000..c9ea693 --- /dev/null +++ b/docs/ProjectTestPlanAttributesApi.md @@ -0,0 +1,453 @@ +# testit_api_client.ProjectTestPlanAttributesApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_custom_attribute_test_plan_project_relations**](ProjectTestPlanAttributesApi.md#create_custom_attribute_test_plan_project_relations) | **POST** /api/v2/projects/{projectId}/testPlans/attributes | Add attributes to project's test plans +[**delete_custom_attribute_test_plan_project_relations**](ProjectTestPlanAttributesApi.md#delete_custom_attribute_test_plan_project_relations) | **DELETE** /api/v2/projects/{projectId}/testPlans/attributes/{attributeId} | Delete attribute from project's test plans +[**get_custom_attribute_test_plan_project_relations**](ProjectTestPlanAttributesApi.md#get_custom_attribute_test_plan_project_relations) | **GET** /api/v2/projects/{projectId}/testPlans/attributes | Get project's test plan attributes +[**search_test_plan_attributes_in_project**](ProjectTestPlanAttributesApi.md#search_test_plan_attributes_in_project) | **POST** /api/v2/projects/{projectId}/testPlans/attributes/search | Search for attributes used in the project test plans +[**update_custom_attribute_test_plan_project_relations**](ProjectTestPlanAttributesApi.md#update_custom_attribute_test_plan_project_relations) | **PUT** /api/v2/projects/{projectId}/testPlans/attributes | Update attribute of project's test plans + + +# **create_custom_attribute_test_plan_project_relations** +> create_custom_attribute_test_plan_project_relations(project_id) + +Add attributes to project's test plans + +
Use case
User sets project internal or global identifier and attributes identifiers
User runs method execution
System updates project and add attributes to project for test plans
System returns no content response + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_test_plan_attributes_api +from testit_api_client.model.problem_details import ProblemDetails +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_test_plan_attributes_api.ProjectTestPlanAttributesApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + request_body = [ + "request_body_example", + ] # [str] | (optional) + + # example passing only required values which don't have defaults set + try: + # Add attributes to project's test plans + api_instance.create_custom_attribute_test_plan_project_relations(project_id) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlanAttributesApi->create_custom_attribute_test_plan_project_relations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Add attributes to project's test plans + api_instance.create_custom_attribute_test_plan_project_relations(project_id, request_body=request_body) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlanAttributesApi->create_custom_attribute_test_plan_project_relations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **request_body** | **[str]**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**403** | Update permission for project settings is required | - | +**400** | <br> Attributes must be global | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_custom_attribute_test_plan_project_relations** +> delete_custom_attribute_test_plan_project_relations(project_id, attribute_id) + +Delete attribute from project's test plans + +
Use case
User sets project internal or global identifier and attribute identifier
User runs method execution
System updates project and delete attribute from project for test plans
System returns no content response + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_test_plan_attributes_api +from testit_api_client.model.problem_details import ProblemDetails +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_test_plan_attributes_api.ProjectTestPlanAttributesApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + attribute_id = "attributeId_example" # str | + + # example passing only required values which don't have defaults set + try: + # Delete attribute from project's test plans + api_instance.delete_custom_attribute_test_plan_project_relations(project_id, attribute_id) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlanAttributesApi->delete_custom_attribute_test_plan_project_relations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **attribute_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**403** | Update permission for project settings is required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_custom_attribute_test_plan_project_relations** +> [CustomAttributeModel] get_custom_attribute_test_plan_project_relations(project_id) + +Get project's test plan attributes + +
Use case
User runs method execution
System returns project for test plans attributes by project identifier + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_test_plan_attributes_api +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.custom_attribute_model import CustomAttributeModel +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_test_plan_attributes_api.ProjectTestPlanAttributesApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + + # example passing only required values which don't have defaults set + try: + # Get project's test plan attributes + api_response = api_instance.get_custom_attribute_test_plan_project_relations(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlanAttributesApi->get_custom_attribute_test_plan_project_relations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + +### Return type + +[**[CustomAttributeModel]**](CustomAttributeModel.md) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Read permission for project settings is required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **search_test_plan_attributes_in_project** +> [CustomAttributeGetModel] search_test_plan_attributes_in_project(project_id) + +Search for attributes used in the project test plans + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_test_plan_attributes_api +from testit_api_client.model.custom_attribute_get_model import CustomAttributeGetModel +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.search_attributes_in_project_request import SearchAttributesInProjectRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_test_plan_attributes_api.ProjectTestPlanAttributesApi(api_client) + project_id = "projectId_example" # str | Unique or global project ID + skip = 1 # int | Amount of items to be skipped (offset) (optional) + take = 1 # int | Amount of items to be taken (limit) (optional) + order_by = "OrderBy_example" # str | SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + search_field = "SearchField_example" # str | Property name for searching (optional) + search_value = "SearchValue_example" # str | Value for searching (optional) + search_attributes_in_project_request = SearchAttributesInProjectRequest(None) # SearchAttributesInProjectRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Search for attributes used in the project test plans + api_response = api_instance.search_test_plan_attributes_in_project(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlanAttributesApi->search_test_plan_attributes_in_project: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Search for attributes used in the project test plans + api_response = api_instance.search_test_plan_attributes_in_project(project_id, skip=skip, take=take, order_by=order_by, search_field=search_field, search_value=search_value, search_attributes_in_project_request=search_attributes_in_project_request) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlanAttributesApi->search_test_plan_attributes_in_project: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Unique or global project ID | + **skip** | **int**| Amount of items to be skipped (offset) | [optional] + **take** | **int**| Amount of items to be taken (limit) | [optional] + **order_by** | **str**| SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) | [optional] + **search_field** | **str**| Property name for searching | [optional] + **search_value** | **str**| Value for searching | [optional] + **search_attributes_in_project_request** | [**SearchAttributesInProjectRequest**](SearchAttributesInProjectRequest.md)| | [optional] + +### Return type + +[**[CustomAttributeGetModel]**](CustomAttributeGetModel.md) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
| +**403** | Read permission for project is required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_custom_attribute_test_plan_project_relations** +> update_custom_attribute_test_plan_project_relations(project_id) + +Update attribute of project's test plans + +
Use case
User sets project internal or global identifier and attribute model
User runs method execution
System updates project and project attribute for test plan
System returns no content response + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_test_plan_attributes_api +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.update_custom_attribute_test_plan_project_relations_request import UpdateCustomAttributeTestPlanProjectRelationsRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_test_plan_attributes_api.ProjectTestPlanAttributesApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + update_custom_attribute_test_plan_project_relations_request = UpdateCustomAttributeTestPlanProjectRelationsRequest(None) # UpdateCustomAttributeTestPlanProjectRelationsRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Update attribute of project's test plans + api_instance.update_custom_attribute_test_plan_project_relations(project_id) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlanAttributesApi->update_custom_attribute_test_plan_project_relations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Update attribute of project's test plans + api_instance.update_custom_attribute_test_plan_project_relations(project_id, update_custom_attribute_test_plan_project_relations_request=update_custom_attribute_test_plan_project_relations_request) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlanAttributesApi->update_custom_attribute_test_plan_project_relations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **update_custom_attribute_test_plan_project_relations_request** | [**UpdateCustomAttributeTestPlanProjectRelationsRequest**](UpdateCustomAttributeTestPlanProjectRelationsRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**403** | Update permission for project settings is required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ProjectTestPlansApi.md b/docs/ProjectTestPlansApi.md new file mode 100644 index 0000000..08d5387 --- /dev/null +++ b/docs/ProjectTestPlansApi.md @@ -0,0 +1,559 @@ +# testit_api_client.ProjectTestPlansApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**api_v2_projects_project_id_test_plans_analytics_get**](ProjectTestPlansApi.md#api_v2_projects_project_id_test_plans_analytics_get) | **GET** /api/v2/projects/{projectId}/testPlans/analytics | Get TestPlans analytics +[**api_v2_projects_project_id_test_plans_delete_bulk_post**](ProjectTestPlansApi.md#api_v2_projects_project_id_test_plans_delete_bulk_post) | **POST** /api/v2/projects/{projectId}/testPlans/delete/bulk | Delete multiple test plans +[**api_v2_projects_project_id_test_plans_name_exists_get**](ProjectTestPlansApi.md#api_v2_projects_project_id_test_plans_name_exists_get) | **GET** /api/v2/projects/{projectId}/testPlans/{name}/exists | Checks if TestPlan exists with the specified name exists for the project +[**api_v2_projects_project_id_test_plans_purge_bulk_post**](ProjectTestPlansApi.md#api_v2_projects_project_id_test_plans_purge_bulk_post) | **POST** /api/v2/projects/{projectId}/testPlans/purge/bulk | Permanently delete multiple archived test plans +[**api_v2_projects_project_id_test_plans_restore_bulk_post**](ProjectTestPlansApi.md#api_v2_projects_project_id_test_plans_restore_bulk_post) | **POST** /api/v2/projects/{projectId}/testPlans/restore/bulk | Restore multiple test plans +[**api_v2_projects_project_id_test_plans_search_post**](ProjectTestPlansApi.md#api_v2_projects_project_id_test_plans_search_post) | **POST** /api/v2/projects/{projectId}/testPlans/search | Get Project TestPlans with analytics + + +# **api_v2_projects_project_id_test_plans_analytics_get** +> [TestPlanWithAnalyticModel] api_v2_projects_project_id_test_plans_analytics_get(project_id) + +Get TestPlans analytics + +
Use case
User sets project internal identifier
User sets query params
User runs method execution
System return analytics + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_test_plans_api +from testit_api_client.model.test_plan_with_analytic_model import TestPlanWithAnalyticModel +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_test_plans_api.ProjectTestPlansApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) identifier + is_deleted = True # bool | (optional) + must_update_cache = False # bool | (optional) if omitted the server will use the default value of False + skip = 1 # int | Amount of items to be skipped (offset) (optional) + take = 1 # int | Amount of items to be taken (limit) (optional) + order_by = "OrderBy_example" # str | SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + search_field = "SearchField_example" # str | Property name for searching (optional) + search_value = "SearchValue_example" # str | Value for searching (optional) + + # example passing only required values which don't have defaults set + try: + # Get TestPlans analytics + api_response = api_instance.api_v2_projects_project_id_test_plans_analytics_get(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlansApi->api_v2_projects_project_id_test_plans_analytics_get: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get TestPlans analytics + api_response = api_instance.api_v2_projects_project_id_test_plans_analytics_get(project_id, is_deleted=is_deleted, must_update_cache=must_update_cache, skip=skip, take=take, order_by=order_by, search_field=search_field, search_value=search_value) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlansApi->api_v2_projects_project_id_test_plans_analytics_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) identifier | + **is_deleted** | **bool**| | [optional] + **must_update_cache** | **bool**| | [optional] if omitted the server will use the default value of False + **skip** | **int**| Amount of items to be skipped (offset) | [optional] + **take** | **int**| Amount of items to be taken (limit) | [optional] + **order_by** | **str**| SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) | [optional] + **search_field** | **str**| Property name for searching | [optional] + **search_value** | **str**| Value for searching | [optional] + +### Return type + +[**[TestPlanWithAnalyticModel]**](TestPlanWithAnalyticModel.md) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v2_projects_project_id_test_plans_delete_bulk_post** +> [str] api_v2_projects_project_id_test_plans_delete_bulk_post(project_id) + +Delete multiple test plans + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_test_plans_api +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.api_v2_projects_project_id_test_plans_delete_bulk_post_request import ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_test_plans_api.ProjectTestPlansApi(api_client) + project_id = "projectId_example" # str | Unique or global ID of the project + api_v2_projects_project_id_test_plans_delete_bulk_post_request = ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest(None) # ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Delete multiple test plans + api_response = api_instance.api_v2_projects_project_id_test_plans_delete_bulk_post(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlansApi->api_v2_projects_project_id_test_plans_delete_bulk_post: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete multiple test plans + api_response = api_instance.api_v2_projects_project_id_test_plans_delete_bulk_post(project_id, api_v2_projects_project_id_test_plans_delete_bulk_post_request=api_v2_projects_project_id_test_plans_delete_bulk_post_request) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlansApi->api_v2_projects_project_id_test_plans_delete_bulk_post: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Unique or global ID of the project | + **api_v2_projects_project_id_test_plans_delete_bulk_post_request** | [**ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest**](ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest.md)| | [optional] + +### Return type + +**[str]** + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | - Read permission for the project is required - Delete permission for test plans is required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v2_projects_project_id_test_plans_name_exists_get** +> bool api_v2_projects_project_id_test_plans_name_exists_get(project_id, name) + +Checks if TestPlan exists with the specified name exists for the project + +
Use case
User sets project internal or global identifier
User runs method execution
System purge delete project workitems + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_test_plans_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_test_plans_api.ProjectTestPlansApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + name = "name_example" # str | TestPlan name to check + + # example passing only required values which don't have defaults set + try: + # Checks if TestPlan exists with the specified name exists for the project + api_response = api_instance.api_v2_projects_project_id_test_plans_name_exists_get(project_id, name) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlansApi->api_v2_projects_project_id_test_plans_name_exists_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **name** | **str**| TestPlan name to check | + +### Return type + +**bool** + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v2_projects_project_id_test_plans_purge_bulk_post** +> api_v2_projects_project_id_test_plans_purge_bulk_post(project_id) + +Permanently delete multiple archived test plans + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_test_plans_api +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.api_v2_projects_project_id_test_plans_delete_bulk_post_request import ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_test_plans_api.ProjectTestPlansApi(api_client) + project_id = "projectId_example" # str | Unique or global ID of the project + api_v2_projects_project_id_test_plans_delete_bulk_post_request = ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest(None) # ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Permanently delete multiple archived test plans + api_instance.api_v2_projects_project_id_test_plans_purge_bulk_post(project_id) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlansApi->api_v2_projects_project_id_test_plans_purge_bulk_post: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Permanently delete multiple archived test plans + api_instance.api_v2_projects_project_id_test_plans_purge_bulk_post(project_id, api_v2_projects_project_id_test_plans_delete_bulk_post_request=api_v2_projects_project_id_test_plans_delete_bulk_post_request) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlansApi->api_v2_projects_project_id_test_plans_purge_bulk_post: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Unique or global ID of the project | + **api_v2_projects_project_id_test_plans_delete_bulk_post_request** | [**ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest**](ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**403** | Full access permission for the archive is required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v2_projects_project_id_test_plans_restore_bulk_post** +> api_v2_projects_project_id_test_plans_restore_bulk_post(project_id) + +Restore multiple test plans + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_test_plans_api +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.api_v2_projects_project_id_test_plans_delete_bulk_post_request import ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_test_plans_api.ProjectTestPlansApi(api_client) + project_id = "projectId_example" # str | Unique or global ID of the project + api_v2_projects_project_id_test_plans_delete_bulk_post_request = ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest(None) # ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Restore multiple test plans + api_instance.api_v2_projects_project_id_test_plans_restore_bulk_post(project_id) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlansApi->api_v2_projects_project_id_test_plans_restore_bulk_post: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Restore multiple test plans + api_instance.api_v2_projects_project_id_test_plans_restore_bulk_post(project_id, api_v2_projects_project_id_test_plans_delete_bulk_post_request=api_v2_projects_project_id_test_plans_delete_bulk_post_request) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlansApi->api_v2_projects_project_id_test_plans_restore_bulk_post: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Unique or global ID of the project | + **api_v2_projects_project_id_test_plans_delete_bulk_post_request** | [**ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest**](ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Read permission for the archive is required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v2_projects_project_id_test_plans_search_post** +> [TestPlanWithAnalyticModel] api_v2_projects_project_id_test_plans_search_post(project_id) + +Get Project TestPlans with analytics + +
Use case
User sets project internal or global identifier
User sets request body
User runs method execution
System returns project testplans with analytics + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_test_plans_api +from testit_api_client.model.test_plan_with_analytic_model import TestPlanWithAnalyticModel +from testit_api_client.model.api_v2_projects_project_id_test_plans_search_post_request import ApiV2ProjectsProjectIdTestPlansSearchPostRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_test_plans_api.ProjectTestPlansApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + must_update_cache = False # bool | (optional) if omitted the server will use the default value of False + skip = 1 # int | Amount of items to be skipped (offset) (optional) + take = 1 # int | Amount of items to be taken (limit) (optional) + order_by = "OrderBy_example" # str | SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + search_field = "SearchField_example" # str | Property name for searching (optional) + search_value = "SearchValue_example" # str | Value for searching (optional) + api_v2_projects_project_id_test_plans_search_post_request = ApiV2ProjectsProjectIdTestPlansSearchPostRequest(None) # ApiV2ProjectsProjectIdTestPlansSearchPostRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Get Project TestPlans with analytics + api_response = api_instance.api_v2_projects_project_id_test_plans_search_post(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlansApi->api_v2_projects_project_id_test_plans_search_post: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get Project TestPlans with analytics + api_response = api_instance.api_v2_projects_project_id_test_plans_search_post(project_id, must_update_cache=must_update_cache, skip=skip, take=take, order_by=order_by, search_field=search_field, search_value=search_value, api_v2_projects_project_id_test_plans_search_post_request=api_v2_projects_project_id_test_plans_search_post_request) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectTestPlansApi->api_v2_projects_project_id_test_plans_search_post: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **must_update_cache** | **bool**| | [optional] if omitted the server will use the default value of False + **skip** | **int**| Amount of items to be skipped (offset) | [optional] + **take** | **int**| Amount of items to be taken (limit) | [optional] + **order_by** | **str**| SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) | [optional] + **search_field** | **str**| Property name for searching | [optional] + **search_value** | **str**| Value for searching | [optional] + **api_v2_projects_project_id_test_plans_search_post_request** | [**ApiV2ProjectsProjectIdTestPlansSearchPostRequest**](ApiV2ProjectsProjectIdTestPlansSearchPostRequest.md)| | [optional] + +### Return type + +[**[TestPlanWithAnalyticModel]**](TestPlanWithAnalyticModel.md) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ProjectWorkItemsApi.md b/docs/ProjectWorkItemsApi.md new file mode 100644 index 0000000..62614de --- /dev/null +++ b/docs/ProjectWorkItemsApi.md @@ -0,0 +1,510 @@ +# testit_api_client.ProjectWorkItemsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**api_v2_projects_project_id_work_items_search_grouped_post**](ProjectWorkItemsApi.md#api_v2_projects_project_id_work_items_search_grouped_post) | **POST** /api/v2/projects/{projectId}/workItems/search/grouped | Search for work items and group results by attribute +[**api_v2_projects_project_id_work_items_search_id_post**](ProjectWorkItemsApi.md#api_v2_projects_project_id_work_items_search_id_post) | **POST** /api/v2/projects/{projectId}/workItems/search/id | Search for work items and extract IDs only +[**api_v2_projects_project_id_work_items_search_post**](ProjectWorkItemsApi.md#api_v2_projects_project_id_work_items_search_post) | **POST** /api/v2/projects/{projectId}/workItems/search | Search for work items +[**api_v2_projects_project_id_work_items_tags_get**](ProjectWorkItemsApi.md#api_v2_projects_project_id_work_items_tags_get) | **GET** /api/v2/projects/{projectId}/workItems/tags | Get WorkItems Tags +[**get_work_items_by_project_id**](ProjectWorkItemsApi.md#get_work_items_by_project_id) | **GET** /api/v2/projects/{projectId}/workItems | Get project work items + + +# **api_v2_projects_project_id_work_items_search_grouped_post** +> [WorkItemGroupModel] api_v2_projects_project_id_work_items_search_grouped_post(project_id) + +Search for work items and group results by attribute + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_work_items_api +from testit_api_client.model.api_v2_projects_project_id_work_items_search_grouped_post_request import ApiV2ProjectsProjectIdWorkItemsSearchGroupedPostRequest +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.work_item_group_model import WorkItemGroupModel +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_work_items_api.ProjectWorkItemsApi(api_client) + project_id = "projectId_example" # str | Unique or global ID of the project + skip = 1 # int | Amount of items to be skipped (offset) (optional) + take = 1 # int | Amount of items to be taken (limit) (optional) + order_by = "OrderBy_example" # str | SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + search_field = "SearchField_example" # str | Property name for searching (optional) + search_value = "SearchValue_example" # str | Value for searching (optional) + api_v2_projects_project_id_work_items_search_grouped_post_request = ApiV2ProjectsProjectIdWorkItemsSearchGroupedPostRequest(None) # ApiV2ProjectsProjectIdWorkItemsSearchGroupedPostRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Search for work items and group results by attribute + api_response = api_instance.api_v2_projects_project_id_work_items_search_grouped_post(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectWorkItemsApi->api_v2_projects_project_id_work_items_search_grouped_post: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Search for work items and group results by attribute + api_response = api_instance.api_v2_projects_project_id_work_items_search_grouped_post(project_id, skip=skip, take=take, order_by=order_by, search_field=search_field, search_value=search_value, api_v2_projects_project_id_work_items_search_grouped_post_request=api_v2_projects_project_id_work_items_search_grouped_post_request) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectWorkItemsApi->api_v2_projects_project_id_work_items_search_grouped_post: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Unique or global ID of the project | + **skip** | **int**| Amount of items to be skipped (offset) | [optional] + **take** | **int**| Amount of items to be taken (limit) | [optional] + **order_by** | **str**| SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) | [optional] + **search_field** | **str**| Property name for searching | [optional] + **search_value** | **str**| Value for searching | [optional] + **api_v2_projects_project_id_work_items_search_grouped_post_request** | [**ApiV2ProjectsProjectIdWorkItemsSearchGroupedPostRequest**](ApiV2ProjectsProjectIdWorkItemsSearchGroupedPostRequest.md)| | [optional] + +### Return type + +[**[WorkItemGroupModel]**](WorkItemGroupModel.md) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
| +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v2_projects_project_id_work_items_search_id_post** +> [str] api_v2_projects_project_id_work_items_search_id_post(project_id) + +Search for work items and extract IDs only + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_work_items_api +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.api_v2_projects_project_id_work_items_search_post_request import ApiV2ProjectsProjectIdWorkItemsSearchPostRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_work_items_api.ProjectWorkItemsApi(api_client) + project_id = "projectId_example" # str | Unique or global ID of the project + skip = 1 # int | Amount of items to be skipped (offset) (optional) + take = 1 # int | Amount of items to be taken (limit) (optional) + order_by = "OrderBy_example" # str | SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + search_field = "SearchField_example" # str | Property name for searching (optional) + search_value = "SearchValue_example" # str | Value for searching (optional) + api_v2_projects_project_id_work_items_search_post_request = ApiV2ProjectsProjectIdWorkItemsSearchPostRequest(None) # ApiV2ProjectsProjectIdWorkItemsSearchPostRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Search for work items and extract IDs only + api_response = api_instance.api_v2_projects_project_id_work_items_search_id_post(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectWorkItemsApi->api_v2_projects_project_id_work_items_search_id_post: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Search for work items and extract IDs only + api_response = api_instance.api_v2_projects_project_id_work_items_search_id_post(project_id, skip=skip, take=take, order_by=order_by, search_field=search_field, search_value=search_value, api_v2_projects_project_id_work_items_search_post_request=api_v2_projects_project_id_work_items_search_post_request) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectWorkItemsApi->api_v2_projects_project_id_work_items_search_id_post: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Unique or global ID of the project | + **skip** | **int**| Amount of items to be skipped (offset) | [optional] + **take** | **int**| Amount of items to be taken (limit) | [optional] + **order_by** | **str**| SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) | [optional] + **search_field** | **str**| Property name for searching | [optional] + **search_value** | **str**| Value for searching | [optional] + **api_v2_projects_project_id_work_items_search_post_request** | [**ApiV2ProjectsProjectIdWorkItemsSearchPostRequest**](ApiV2ProjectsProjectIdWorkItemsSearchPostRequest.md)| | [optional] + +### Return type + +**[str]** + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
| +**403** | Read permission for test library is required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v2_projects_project_id_work_items_search_post** +> [WorkItemShortModel] api_v2_projects_project_id_work_items_search_post(project_id) + +Search for work items + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_work_items_api +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.work_item_short_model import WorkItemShortModel +from testit_api_client.model.api_v2_projects_project_id_work_items_search_post_request import ApiV2ProjectsProjectIdWorkItemsSearchPostRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_work_items_api.ProjectWorkItemsApi(api_client) + project_id = "projectId_example" # str | Unique or global ID of the project + skip = 1 # int | Amount of items to be skipped (offset) (optional) + take = 1 # int | Amount of items to be taken (limit) (optional) + order_by = "OrderBy_example" # str | SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + search_field = "SearchField_example" # str | Property name for searching (optional) + search_value = "SearchValue_example" # str | Value for searching (optional) + api_v2_projects_project_id_work_items_search_post_request = ApiV2ProjectsProjectIdWorkItemsSearchPostRequest(None) # ApiV2ProjectsProjectIdWorkItemsSearchPostRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # Search for work items + api_response = api_instance.api_v2_projects_project_id_work_items_search_post(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectWorkItemsApi->api_v2_projects_project_id_work_items_search_post: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Search for work items + api_response = api_instance.api_v2_projects_project_id_work_items_search_post(project_id, skip=skip, take=take, order_by=order_by, search_field=search_field, search_value=search_value, api_v2_projects_project_id_work_items_search_post_request=api_v2_projects_project_id_work_items_search_post_request) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectWorkItemsApi->api_v2_projects_project_id_work_items_search_post: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Unique or global ID of the project | + **skip** | **int**| Amount of items to be skipped (offset) | [optional] + **take** | **int**| Amount of items to be taken (limit) | [optional] + **order_by** | **str**| SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) | [optional] + **search_field** | **str**| Property name for searching | [optional] + **search_value** | **str**| Value for searching | [optional] + **api_v2_projects_project_id_work_items_search_post_request** | [**ApiV2ProjectsProjectIdWorkItemsSearchPostRequest**](ApiV2ProjectsProjectIdWorkItemsSearchPostRequest.md)| | [optional] + +### Return type + +[**[WorkItemShortModel]**](WorkItemShortModel.md) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
| +**403** | Read permission for test library is required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v2_projects_project_id_work_items_tags_get** +> [TagShortModel] api_v2_projects_project_id_work_items_tags_get(project_id) + +Get WorkItems Tags + +
Use case
User sets project internal identifier
User runs method execution
System returns work items tags + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_work_items_api +from testit_api_client.model.tag_short_model import TagShortModel +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_work_items_api.ProjectWorkItemsApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) identifier + is_deleted = True # bool | (optional) + + # example passing only required values which don't have defaults set + try: + # Get WorkItems Tags + api_response = api_instance.api_v2_projects_project_id_work_items_tags_get(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectWorkItemsApi->api_v2_projects_project_id_work_items_tags_get: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get WorkItems Tags + api_response = api_instance.api_v2_projects_project_id_work_items_tags_get(project_id, is_deleted=is_deleted) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectWorkItemsApi->api_v2_projects_project_id_work_items_tags_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) identifier | + **is_deleted** | **bool**| | [optional] + +### Return type + +[**[TagShortModel]**](TagShortModel.md) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_work_items_by_project_id** +> [WorkItemShortModel] get_work_items_by_project_id(project_id) + +Get project work items + +
Use case
User sets project internal or global identifier
[Optional] User sets isDeleted field value
User runs method execution
System search project
[Optional] If User sets isDeleted field value as true, System search all deleted workitems related to project
[Optional] If User sets isDeleted field value as false, System search all workitems related to project which are not deleted
If User did not set isDeleted field value, System search all workitems related to project
System returns array of found workitems (listed in response model) + +### Example + +* Api Key Authentication (Bearer or PrivateToken): + +```python +import time +import testit_api_client +from testit_api_client.api import project_work_items_api +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.work_item_short_model import WorkItemShortModel +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = testit_api_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer or PrivateToken +configuration.api_key['Bearer or PrivateToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer or PrivateToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with testit_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = project_work_items_api.ProjectWorkItemsApi(api_client) + project_id = "projectId_example" # str | Project internal (UUID) or global (integer) identifier + is_deleted = False # bool | If result must consist of only actual/deleted work items (optional) if omitted the server will use the default value of False + tag_names = [ + "tagNames_example", + ] # [str] | List of tags to filter by (optional) + include_iterations = True # bool | (optional) if omitted the server will use the default value of True + skip = 1 # int | Amount of items to be skipped (offset) (optional) + take = 1 # int | Amount of items to be taken (limit) (optional) + order_by = "OrderBy_example" # str | SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + search_field = "SearchField_example" # str | Property name for searching (optional) + search_value = "SearchValue_example" # str | Value for searching (optional) + + # example passing only required values which don't have defaults set + try: + # Get project work items + api_response = api_instance.get_work_items_by_project_id(project_id) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectWorkItemsApi->get_work_items_by_project_id: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get project work items + api_response = api_instance.get_work_items_by_project_id(project_id, is_deleted=is_deleted, tag_names=tag_names, include_iterations=include_iterations, skip=skip, take=take, order_by=order_by, search_field=search_field, search_value=search_value) + pprint(api_response) + except testit_api_client.ApiException as e: + print("Exception when calling ProjectWorkItemsApi->get_work_items_by_project_id: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project internal (UUID) or global (integer) identifier | + **is_deleted** | **bool**| If result must consist of only actual/deleted work items | [optional] if omitted the server will use the default value of False + **tag_names** | **[str]**| List of tags to filter by | [optional] + **include_iterations** | **bool**| | [optional] if omitted the server will use the default value of True + **skip** | **int**| Amount of items to be skipped (offset) | [optional] + **take** | **int**| Amount of items to be taken (limit) | [optional] + **order_by** | **str**| SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) | [optional] + **search_field** | **str**| Property name for searching | [optional] + **search_value** | **str**| Value for searching | [optional] + +### Return type + +[**[WorkItemShortModel]**](WorkItemShortModel.md) + +### Authorization + +[Bearer or PrivateToken](../README.md#Bearer or PrivateToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
| +**403** | Read permission for test library is required | - | +**400** | <br>- `orderBy` statement must have one `.` and no `,` characters <br>- `orderBy` statement has invalid length <br>- `orderBy` statement must have UUID as attribute key <br>- Search field was not found | - | +**404** | Project with provided ID was not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/TestPlanChangeModelTestPlanChangedFields.md b/docs/TestPlanChangeModelTestPlanChangedFields.md new file mode 100644 index 0000000..4470015 --- /dev/null +++ b/docs/TestPlanChangeModelTestPlanChangedFields.md @@ -0,0 +1,24 @@ +# TestPlanChangeModelTestPlanChangedFields + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | [**StringChangedFieldWithDiffsViewModel**](StringChangedFieldWithDiffsViewModel.md) | | [optional] +**description** | [**StringChangedFieldWithDiffsViewModel**](StringChangedFieldWithDiffsViewModel.md) | | [optional] +**product_name** | [**StringChangedFieldViewModel**](StringChangedFieldViewModel.md) | | [optional] +**build** | [**StringChangedFieldViewModel**](StringChangedFieldViewModel.md) | | [optional] +**period** | [**PeriodViewModelChangedFieldViewModel**](PeriodViewModelChangedFieldViewModel.md) | | [optional] +**status** | [**StringChangedFieldViewModel**](StringChangedFieldViewModel.md) | | [optional] +**tags** | [**StringArrayChangedFieldViewModel**](StringArrayChangedFieldViewModel.md) | | [optional] +**test_suite** | [**TestSuiteChangeViewModelChangedFieldViewModel**](TestSuiteChangeViewModelChangedFieldViewModel.md) | | [optional] +**test_points** | [**TestPointChangeViewModelChangedFieldViewModel**](TestPointChangeViewModelChangedFieldViewModel.md) | | [optional] +**test_results** | [**TestResultChangeViewModelChangedFieldViewModel**](TestResultChangeViewModelChangedFieldViewModel.md) | | [optional] +**locking** | [**BooleanChangedFieldViewModel**](BooleanChangedFieldViewModel.md) | | [optional] +**has_automatic_duration_timer** | [**BooleanNullableChangedFieldViewModel**](BooleanNullableChangedFieldViewModel.md) | | [optional] +**attributes** | [**{str: (CustomAttributeChangeModel,)}, none_type**](CustomAttributeChangeModel.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TestPlanWithAnalyticModelAnalytic.md b/docs/TestPlanWithAnalyticModelAnalytic.md new file mode 100644 index 0000000..af4f52a --- /dev/null +++ b/docs/TestPlanWithAnalyticModelAnalytic.md @@ -0,0 +1,16 @@ +# TestPlanWithAnalyticModelAnalytic + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count_group_by_status** | [**[TestPlanGroupByStatus]**](TestPlanGroupByStatus.md) | | +**sum_group_by_tester** | [**[TestPlanGroupByTester]**](TestPlanGroupByTester.md) | | +**count_group_by_tester** | [**[TestPlanGroupByTester]**](TestPlanGroupByTester.md) | | +**count_group_by_test_suite** | [**[TestPlanGroupByTestSuite]**](TestPlanGroupByTestSuite.md) | | +**count_group_by_tester_and_status** | [**[TestPlanGroupByTesterAndStatus]**](TestPlanGroupByTesterAndStatus.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TestRunModelAnalytic.md b/docs/TestRunModelAnalytic.md new file mode 100644 index 0000000..7bd88f2 --- /dev/null +++ b/docs/TestRunModelAnalytic.md @@ -0,0 +1,13 @@ +# TestRunModelAnalytic + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count_group_by_status** | [**[TestRunGroupByStatusModel], none_type**](TestRunGroupByStatusModel.md) | | [optional] +**count_group_by_failure_class** | [**[TestRunGroupByFailureClassModel], none_type**](TestRunGroupByFailureClassModel.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserWithRankModelUserRank.md b/docs/UserWithRankModelUserRank.md new file mode 100644 index 0000000..82ec4d3 --- /dev/null +++ b/docs/UserWithRankModelUserRank.md @@ -0,0 +1,17 @@ +# UserWithRankModelUserRank + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**score** | **int** | | +**work_items_created** | **int** | | +**passed_test_points** | **int** | | +**failed_test_points** | **int** | | +**skipped_test_points** | **int** | | +**blocked_test_points** | **int** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemChangeModelWorkItemChangedFields.md b/docs/WorkItemChangeModelWorkItemChangedFields.md new file mode 100644 index 0000000..84d9a1c --- /dev/null +++ b/docs/WorkItemChangeModelWorkItemChangedFields.md @@ -0,0 +1,31 @@ +# WorkItemChangeModelWorkItemChangedFields + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_deleted** | [**WorkItemChangedFieldsViewModelIsDeleted**](WorkItemChangedFieldsViewModelIsDeleted.md) | | +**project_id** | [**WorkItemChangedFieldsViewModelProjectId**](WorkItemChangedFieldsViewModelProjectId.md) | | +**is_automated** | [**WorkItemChangedFieldsViewModelIsDeleted**](WorkItemChangedFieldsViewModelIsDeleted.md) | | +**section_id** | [**WorkItemChangedFieldsViewModelProjectId**](WorkItemChangedFieldsViewModelProjectId.md) | | +**state** | [**WorkItemChangedFieldsViewModelState**](WorkItemChangedFieldsViewModelState.md) | | +**priority** | [**WorkItemChangedFieldsViewModelState**](WorkItemChangedFieldsViewModelState.md) | | +**duration** | [**WorkItemChangedFieldsViewModelDuration**](WorkItemChangedFieldsViewModelDuration.md) | | +**attributes** | [**{str: (WorkItemChangedAttributeViewModel,)}**](WorkItemChangedAttributeViewModel.md) | | +**steps** | [**WorkItemChangedFieldsViewModelSteps**](WorkItemChangedFieldsViewModelSteps.md) | | +**precondition_steps** | [**WorkItemChangedFieldsViewModelSteps**](WorkItemChangedFieldsViewModelSteps.md) | | +**postcondition_steps** | [**WorkItemChangedFieldsViewModelSteps**](WorkItemChangedFieldsViewModelSteps.md) | | +**auto_tests** | [**WorkItemChangedFieldsViewModelAutoTests**](WorkItemChangedFieldsViewModelAutoTests.md) | | +**attachments** | [**WorkItemChangedFieldsViewModelAttachments**](WorkItemChangedFieldsViewModelAttachments.md) | | +**tags** | [**WorkItemChangedFieldsViewModelTags**](WorkItemChangedFieldsViewModelTags.md) | | +**links** | [**WorkItemChangedFieldsViewModelLinks**](WorkItemChangedFieldsViewModelLinks.md) | | +**global_id** | [**WorkItemChangedFieldsViewModelGlobalId**](WorkItemChangedFieldsViewModelGlobalId.md) | | +**version_number** | [**WorkItemChangedFieldsViewModelDuration**](WorkItemChangedFieldsViewModelDuration.md) | | +**entity_type_name** | [**WorkItemChangedFieldsViewModelState**](WorkItemChangedFieldsViewModelState.md) | | +**name** | [**StringChangedFieldWithDiffsViewModel**](StringChangedFieldWithDiffsViewModel.md) | | [optional] +**description** | [**StringChangedFieldWithDiffsViewModel**](StringChangedFieldWithDiffsViewModel.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemChangedFieldsViewModelAttachments.md b/docs/WorkItemChangedFieldsViewModelAttachments.md new file mode 100644 index 0000000..4abab7d --- /dev/null +++ b/docs/WorkItemChangedFieldsViewModelAttachments.md @@ -0,0 +1,13 @@ +# WorkItemChangedFieldsViewModelAttachments + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**old_value** | [**[AttachmentChangeViewModel], none_type**](AttachmentChangeViewModel.md) | | [optional] +**new_value** | [**[AttachmentChangeViewModel], none_type**](AttachmentChangeViewModel.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemChangedFieldsViewModelAutoTests.md b/docs/WorkItemChangedFieldsViewModelAutoTests.md new file mode 100644 index 0000000..74e6d26 --- /dev/null +++ b/docs/WorkItemChangedFieldsViewModelAutoTests.md @@ -0,0 +1,13 @@ +# WorkItemChangedFieldsViewModelAutoTests + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**old_value** | [**[AutoTestChangeViewModel], none_type**](AutoTestChangeViewModel.md) | | [optional] +**new_value** | [**[AutoTestChangeViewModel], none_type**](AutoTestChangeViewModel.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemChangedFieldsViewModelDuration.md b/docs/WorkItemChangedFieldsViewModelDuration.md new file mode 100644 index 0000000..12085b0 --- /dev/null +++ b/docs/WorkItemChangedFieldsViewModelDuration.md @@ -0,0 +1,13 @@ +# WorkItemChangedFieldsViewModelDuration + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**old_value** | **int** | | +**new_value** | **int** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemChangedFieldsViewModelGlobalId.md b/docs/WorkItemChangedFieldsViewModelGlobalId.md new file mode 100644 index 0000000..81d2b35 --- /dev/null +++ b/docs/WorkItemChangedFieldsViewModelGlobalId.md @@ -0,0 +1,13 @@ +# WorkItemChangedFieldsViewModelGlobalId + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**old_value** | **int** | | +**new_value** | **int** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemChangedFieldsViewModelIsDeleted.md b/docs/WorkItemChangedFieldsViewModelIsDeleted.md new file mode 100644 index 0000000..69dced3 --- /dev/null +++ b/docs/WorkItemChangedFieldsViewModelIsDeleted.md @@ -0,0 +1,13 @@ +# WorkItemChangedFieldsViewModelIsDeleted + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**old_value** | **bool** | | +**new_value** | **bool** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemChangedFieldsViewModelLinks.md b/docs/WorkItemChangedFieldsViewModelLinks.md new file mode 100644 index 0000000..e04ae51 --- /dev/null +++ b/docs/WorkItemChangedFieldsViewModelLinks.md @@ -0,0 +1,13 @@ +# WorkItemChangedFieldsViewModelLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**old_value** | [**[WorkItemLinkChangeViewModel], none_type**](WorkItemLinkChangeViewModel.md) | | [optional] +**new_value** | [**[WorkItemLinkChangeViewModel], none_type**](WorkItemLinkChangeViewModel.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemChangedFieldsViewModelProjectId.md b/docs/WorkItemChangedFieldsViewModelProjectId.md new file mode 100644 index 0000000..4833f89 --- /dev/null +++ b/docs/WorkItemChangedFieldsViewModelProjectId.md @@ -0,0 +1,13 @@ +# WorkItemChangedFieldsViewModelProjectId + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**old_value** | **str** | | +**new_value** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemChangedFieldsViewModelState.md b/docs/WorkItemChangedFieldsViewModelState.md new file mode 100644 index 0000000..0e8327c --- /dev/null +++ b/docs/WorkItemChangedFieldsViewModelState.md @@ -0,0 +1,13 @@ +# WorkItemChangedFieldsViewModelState + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**old_value** | **str, none_type** | | [optional] +**new_value** | **str, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemChangedFieldsViewModelSteps.md b/docs/WorkItemChangedFieldsViewModelSteps.md new file mode 100644 index 0000000..5eafa8e --- /dev/null +++ b/docs/WorkItemChangedFieldsViewModelSteps.md @@ -0,0 +1,14 @@ +# WorkItemChangedFieldsViewModelSteps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**diff_value** | [**[WorkItemStepChangeViewModel], none_type**](WorkItemStepChangeViewModel.md) | | [optional] +**old_value** | [**[WorkItemStepChangeViewModel], none_type**](WorkItemStepChangeViewModel.md) | | [optional] +**new_value** | [**[WorkItemStepChangeViewModel], none_type**](WorkItemStepChangeViewModel.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemChangedFieldsViewModelTags.md b/docs/WorkItemChangedFieldsViewModelTags.md new file mode 100644 index 0000000..958df98 --- /dev/null +++ b/docs/WorkItemChangedFieldsViewModelTags.md @@ -0,0 +1,13 @@ +# WorkItemChangedFieldsViewModelTags + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**old_value** | **[str], none_type** | | [optional] +**new_value** | **[str], none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemCommentModelUser.md b/docs/WorkItemCommentModelUser.md new file mode 100644 index 0000000..b242435 --- /dev/null +++ b/docs/WorkItemCommentModelUser.md @@ -0,0 +1,25 @@ +# WorkItemCommentModelUser + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**first_name** | **str** | | +**last_name** | **str** | | +**middle_name** | **str** | | +**user_name** | **str** | | +**display_name** | **str** | | +**user_type** | **str** | | +**avatar_url** | **str** | | +**avatar_metadata** | **str** | | +**is_deleted** | **bool** | | +**is_disabled** | **bool** | | +**is_active_status_by_entity** | **bool** | | +**user_rank** | [**UserWithRankModelUserRank**](UserWithRankModelUserRank.md) | | +**provider_id** | **str, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemExtractionModel.md b/docs/WorkItemExtractionModel.md new file mode 100644 index 0000000..eacafa1 --- /dev/null +++ b/docs/WorkItemExtractionModel.md @@ -0,0 +1,14 @@ +# WorkItemExtractionModel + +Rules for different level entities inclusion/exclusion + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_ids** | [**ConfigurationExtractionModelProjectIds**](ConfigurationExtractionModelProjectIds.md) | | [optional] +**ids** | [**WorkItemExtractionModelIds**](WorkItemExtractionModelIds.md) | | [optional] +**section_ids** | [**WorkItemExtractionModelSectionIds**](WorkItemExtractionModelSectionIds.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemExtractionModelIds.md b/docs/WorkItemExtractionModelIds.md new file mode 100644 index 0000000..481e26a --- /dev/null +++ b/docs/WorkItemExtractionModelIds.md @@ -0,0 +1,14 @@ +# WorkItemExtractionModelIds + +Extraction parameters for work items + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**include** | **[str], none_type** | | [optional] +**exclude** | **[str], none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemExtractionModelSectionIds.md b/docs/WorkItemExtractionModelSectionIds.md new file mode 100644 index 0000000..c004276 --- /dev/null +++ b/docs/WorkItemExtractionModelSectionIds.md @@ -0,0 +1,14 @@ +# WorkItemExtractionModelSectionIds + +Extraction parameters for sections + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**include** | **[str], none_type** | | [optional] +**exclude** | **[str], none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemGroupGetModel.md b/docs/WorkItemGroupGetModel.md new file mode 100644 index 0000000..82a201f --- /dev/null +++ b/docs/WorkItemGroupGetModel.md @@ -0,0 +1,13 @@ +# WorkItemGroupGetModel + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_type** | [**WorkItemGroupType**](WorkItemGroupType.md) | | +**select_model** | [**WorkItemGroupGetModelSelectModel**](WorkItemGroupGetModelSelectModel.md) | | [optional] +**custom_attribute_id** | **str, none_type** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemGroupGetModelSelectModel.md b/docs/WorkItemGroupGetModelSelectModel.md new file mode 100644 index 0000000..dffce2b --- /dev/null +++ b/docs/WorkItemGroupGetModelSelectModel.md @@ -0,0 +1,14 @@ +# WorkItemGroupGetModelSelectModel + +Model containing options to filter work items + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter** | [**WorkItemLocalSelectModelFilter**](WorkItemLocalSelectModelFilter.md) | | [optional] +**extraction_model** | [**WorkItemLocalSelectModelExtractionModel**](WorkItemLocalSelectModelExtractionModel.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemGroupModel.md b/docs/WorkItemGroupModel.md new file mode 100644 index 0000000..6ae8d1b --- /dev/null +++ b/docs/WorkItemGroupModel.md @@ -0,0 +1,13 @@ +# WorkItemGroupModel + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**size** | **int** | | +**work_items** | [**[WorkItemShortModel]**](WorkItemShortModel.md) | | +**key** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemGroupType.md b/docs/WorkItemGroupType.md new file mode 100644 index 0000000..e62f04b --- /dev/null +++ b/docs/WorkItemGroupType.md @@ -0,0 +1,11 @@ +# WorkItemGroupType + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | | must be one of ["Type", "Priority", "Status", "AutomationStatus", "Creator", "LastEditor", "CustomAttribute", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemLocalFilterModel.md b/docs/WorkItemLocalFilterModel.md new file mode 100644 index 0000000..5fda405 --- /dev/null +++ b/docs/WorkItemLocalFilterModel.md @@ -0,0 +1,29 @@ +# WorkItemLocalFilterModel + +Collection of filters to apply to search + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str, none_type** | Name of work item | [optional] +**ids** | **[str], none_type** | Specifies a work item unique IDs to search for | [optional] +**global_ids** | **[int], none_type** | Collection of global (integer) identifiers | [optional] +**attributes** | **{str: ([str], none_type)}, none_type** | Custom attributes of work item | [optional] +**is_deleted** | **bool, none_type** | Is result must consist of only actual/deleted work items | [optional] +**section_ids** | **[str], none_type** | Collection of section identifiers | [optional] +**created_by_ids** | **[str], none_type** | Collection of identifiers of users who created work item | [optional] +**modified_by_ids** | **[str], none_type** | Collection of identifiers of users who applied last modification to work item | [optional] +**states** | [**[WorkItemStates], none_type**](WorkItemStates.md) | Collection of states of work item | [optional] +**priorities** | [**[WorkItemPriorityModel], none_type**](WorkItemPriorityModel.md) | Collection of priorities of work item | [optional] +**types** | [**[WorkItemEntityTypes], none_type**](WorkItemEntityTypes.md) | Collection of types of work item | [optional] +**created_date** | [**TestPointFilterModelWorkItemCreatedDate**](TestPointFilterModelWorkItemCreatedDate.md) | | [optional] +**modified_date** | [**TestPointFilterModelWorkItemModifiedDate**](TestPointFilterModelWorkItemModifiedDate.md) | | [optional] +**duration** | [**TestSuiteWorkItemsSearchModelDuration**](TestSuiteWorkItemsSearchModelDuration.md) | | [optional] +**median_duration** | [**TestSuiteWorkItemsSearchModelMedianDuration**](TestSuiteWorkItemsSearchModelMedianDuration.md) | | [optional] +**is_automated** | **bool, none_type** | Is result must consist of only manual/automated work items | [optional] +**tags** | **[str], none_type** | Collection of tags | [optional] +**auto_test_ids** | **[str], none_type** | Collection of identifiers of linked autotests | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemLocalSelectModel.md b/docs/WorkItemLocalSelectModel.md new file mode 100644 index 0000000..b79b2c9 --- /dev/null +++ b/docs/WorkItemLocalSelectModel.md @@ -0,0 +1,13 @@ +# WorkItemLocalSelectModel + +Model containing options to filter work items + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter** | [**WorkItemLocalSelectModelFilter**](WorkItemLocalSelectModelFilter.md) | | [optional] +**extraction_model** | [**WorkItemLocalSelectModelExtractionModel**](WorkItemLocalSelectModelExtractionModel.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemLocalSelectModelExtractionModel.md b/docs/WorkItemLocalSelectModelExtractionModel.md new file mode 100644 index 0000000..d9691a0 --- /dev/null +++ b/docs/WorkItemLocalSelectModelExtractionModel.md @@ -0,0 +1,15 @@ +# WorkItemLocalSelectModelExtractionModel + +Rules for different level entities inclusion/exclusion + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_ids** | [**ConfigurationExtractionModelProjectIds**](ConfigurationExtractionModelProjectIds.md) | | [optional] +**ids** | [**WorkItemExtractionModelIds**](WorkItemExtractionModelIds.md) | | [optional] +**section_ids** | [**WorkItemExtractionModelSectionIds**](WorkItemExtractionModelSectionIds.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemLocalSelectModelFilter.md b/docs/WorkItemLocalSelectModelFilter.md new file mode 100644 index 0000000..9ac7c2a --- /dev/null +++ b/docs/WorkItemLocalSelectModelFilter.md @@ -0,0 +1,30 @@ +# WorkItemLocalSelectModelFilter + +Collection of filters to apply to search + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str, none_type** | Name of work item | [optional] +**ids** | **[str], none_type** | Specifies a work item unique IDs to search for | [optional] +**global_ids** | **[int], none_type** | Collection of global (integer) identifiers | [optional] +**attributes** | **{str: ([str], none_type)}, none_type** | Custom attributes of work item | [optional] +**is_deleted** | **bool, none_type** | Is result must consist of only actual/deleted work items | [optional] +**section_ids** | **[str], none_type** | Collection of section identifiers | [optional] +**created_by_ids** | **[str], none_type** | Collection of identifiers of users who created work item | [optional] +**modified_by_ids** | **[str], none_type** | Collection of identifiers of users who applied last modification to work item | [optional] +**states** | [**[WorkItemStates], none_type**](WorkItemStates.md) | Collection of states of work item | [optional] +**priorities** | [**[WorkItemPriorityModel], none_type**](WorkItemPriorityModel.md) | Collection of priorities of work item | [optional] +**types** | [**[WorkItemEntityTypes], none_type**](WorkItemEntityTypes.md) | Collection of types of work item | [optional] +**created_date** | [**TestPointFilterModelWorkItemCreatedDate**](TestPointFilterModelWorkItemCreatedDate.md) | | [optional] +**modified_date** | [**TestPointFilterModelWorkItemModifiedDate**](TestPointFilterModelWorkItemModifiedDate.md) | | [optional] +**duration** | [**TestSuiteWorkItemsSearchModelDuration**](TestSuiteWorkItemsSearchModelDuration.md) | | [optional] +**median_duration** | [**TestSuiteWorkItemsSearchModelMedianDuration**](TestSuiteWorkItemsSearchModelMedianDuration.md) | | [optional] +**is_automated** | **bool, none_type** | Is result must consist of only manual/automated work items | [optional] +**tags** | **[str], none_type** | Collection of tags | [optional] +**auto_test_ids** | **[str], none_type** | Collection of identifiers of linked autotests | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkItemStepChangeViewModelWorkItem.md b/docs/WorkItemStepChangeViewModelWorkItem.md new file mode 100644 index 0000000..cd003b6 --- /dev/null +++ b/docs/WorkItemStepChangeViewModelWorkItem.md @@ -0,0 +1,15 @@ +# WorkItemStepChangeViewModelWorkItem + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**global_id** | **int** | | +**name** | **str** | | +**steps** | [**[WorkItemStepChangeViewModel]**](WorkItemStepChangeViewModel.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/testit_api_client/api/project_attribute_templates_api.py b/src/testit_api_client/api/project_attribute_templates_api.py new file mode 100644 index 0000000..bf0d64d --- /dev/null +++ b/src/testit_api_client/api/project_attribute_templates_api.py @@ -0,0 +1,494 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.api_client import ApiClient, Endpoint as _Endpoint +from testit_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from testit_api_client.model.api_v2_projects_project_id_attributes_templates_search_post_request import ApiV2ProjectsProjectIdAttributesTemplatesSearchPostRequest +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.project_custom_attribute_template_get_model import ProjectCustomAttributeTemplateGetModel + + +class ProjectAttributeTemplatesApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.api_v2_projects_project_id_attributes_templates_search_post_endpoint = _Endpoint( + settings={ + 'response_type': ([ProjectCustomAttributeTemplateGetModel],), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/attributes/templates/search', + 'operation_id': 'api_v2_projects_project_id_attributes_templates_search_post', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'skip', + 'take', + 'order_by', + 'search_field', + 'search_value', + 'api_v2_projects_project_id_attributes_templates_search_post_request', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'skip': + (int,), + 'take': + (int,), + 'order_by': + (str,), + 'search_field': + (str,), + 'search_value': + (str,), + 'api_v2_projects_project_id_attributes_templates_search_post_request': + (ApiV2ProjectsProjectIdAttributesTemplatesSearchPostRequest,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'skip': 'Skip', + 'take': 'Take', + 'order_by': 'OrderBy', + 'search_field': 'SearchField', + 'search_value': 'SearchValue', + }, + 'location_map': { + 'project_id': 'path', + 'skip': 'query', + 'take': 'query', + 'order_by': 'query', + 'search_field': 'query', + 'search_value': 'query', + 'api_v2_projects_project_id_attributes_templates_search_post_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.api_v2_projects_project_id_attributes_templates_template_id_delete_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/attributes/templates/{templateId}', + 'operation_id': 'api_v2_projects_project_id_attributes_templates_template_id_delete', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'template_id', + ], + 'required': [ + 'project_id', + 'template_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'template_id': + (str,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'template_id': 'templateId', + }, + 'location_map': { + 'project_id': 'path', + 'template_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.api_v2_projects_project_id_attributes_templates_template_id_post_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/attributes/templates/{templateId}', + 'operation_id': 'api_v2_projects_project_id_attributes_templates_template_id_post', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'template_id', + ], + 'required': [ + 'project_id', + 'template_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'template_id': + (str,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'template_id': 'templateId', + }, + 'location_map': { + 'project_id': 'path', + 'template_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + + def api_v2_projects_project_id_attributes_templates_search_post( + self, + project_id, + **kwargs + ): + """Search for custom attributes templates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.api_v2_projects_project_id_attributes_templates_search_post(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): + + Keyword Args: + skip (int): Amount of items to be skipped (offset). [optional] + take (int): Amount of items to be taken (limit). [optional] + order_by (str): SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC). [optional] + search_field (str): Property name for searching. [optional] + search_value (str): Value for searching. [optional] + api_v2_projects_project_id_attributes_templates_search_post_request (ApiV2ProjectsProjectIdAttributesTemplatesSearchPostRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ProjectCustomAttributeTemplateGetModel] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.api_v2_projects_project_id_attributes_templates_search_post_endpoint.call_with_http_info(**kwargs) + + def api_v2_projects_project_id_attributes_templates_template_id_delete( + self, + project_id, + template_id, + **kwargs + ): + """Delete CustomAttributeTemplate from Project # noqa: E501 + +
Use case
User sets project internal or global identifier
User sets attribute template internal identifier
User runs method execution
System delete attribute template from project # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.api_v2_projects_project_id_attributes_templates_template_id_delete(project_id, template_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + template_id (str): CustomAttributeTemplate internal (UUID) identifier + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + kwargs['template_id'] = \ + template_id + return self.api_v2_projects_project_id_attributes_templates_template_id_delete_endpoint.call_with_http_info(**kwargs) + + def api_v2_projects_project_id_attributes_templates_template_id_post( + self, + project_id, + template_id, + **kwargs + ): + """Add CustomAttributeTemplate to Project # noqa: E501 + +
Use case
User sets project internal or global identifier
User sets attribute template internal identifier
User runs method execution
System add attribute template to project # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.api_v2_projects_project_id_attributes_templates_template_id_post(project_id, template_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + template_id (str): CustomAttributeTemplate internal (UUID) identifier + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + kwargs['template_id'] = \ + template_id + return self.api_v2_projects_project_id_attributes_templates_template_id_post_endpoint.call_with_http_info(**kwargs) + diff --git a/src/testit_api_client/api/project_attributes_api.py b/src/testit_api_client/api/project_attributes_api.py new file mode 100644 index 0000000..459fed9 --- /dev/null +++ b/src/testit_api_client/api/project_attributes_api.py @@ -0,0 +1,923 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.api_client import ApiClient, Endpoint as _Endpoint +from testit_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from testit_api_client.model.create_projects_attribute_request import CreateProjectsAttributeRequest +from testit_api_client.model.custom_attribute_get_model import CustomAttributeGetModel +from testit_api_client.model.custom_attribute_model import CustomAttributeModel +from testit_api_client.model.deletion_state import DeletionState +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.search_attributes_in_project_request import SearchAttributesInProjectRequest +from testit_api_client.model.update_projects_attribute_request import UpdateProjectsAttributeRequest + + +class ProjectAttributesApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_projects_attribute_endpoint = _Endpoint( + settings={ + 'response_type': (CustomAttributeModel,), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/attributes', + 'operation_id': 'create_projects_attribute', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'create_projects_attribute_request', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'create_projects_attribute_request': + (CreateProjectsAttributeRequest,), + }, + 'attribute_map': { + 'project_id': 'projectId', + }, + 'location_map': { + 'project_id': 'path', + 'create_projects_attribute_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.delete_projects_attribute_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/attributes/{attributeId}', + 'operation_id': 'delete_projects_attribute', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'attribute_id', + ], + 'required': [ + 'project_id', + 'attribute_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'attribute_id': + (str,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'attribute_id': 'attributeId', + }, + 'location_map': { + 'project_id': 'path', + 'attribute_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_attribute_by_project_id_endpoint = _Endpoint( + settings={ + 'response_type': (CustomAttributeModel,), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/attributes/{attributeId}', + 'operation_id': 'get_attribute_by_project_id', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'attribute_id', + ], + 'required': [ + 'project_id', + 'attribute_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'attribute_id': + (str,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'attribute_id': 'attributeId', + }, + 'location_map': { + 'project_id': 'path', + 'attribute_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_attributes_by_project_id_endpoint = _Endpoint( + settings={ + 'response_type': ([CustomAttributeModel],), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/attributes', + 'operation_id': 'get_attributes_by_project_id', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'is_deleted', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'is_deleted': + (DeletionState,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'is_deleted': 'isDeleted', + }, + 'location_map': { + 'project_id': 'path', + 'is_deleted': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.search_attributes_in_project_endpoint = _Endpoint( + settings={ + 'response_type': ([CustomAttributeGetModel],), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/attributes/search', + 'operation_id': 'search_attributes_in_project', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'skip', + 'take', + 'order_by', + 'search_field', + 'search_value', + 'search_attributes_in_project_request', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'skip': + (int,), + 'take': + (int,), + 'order_by': + (str,), + 'search_field': + (str,), + 'search_value': + (str,), + 'search_attributes_in_project_request': + (SearchAttributesInProjectRequest,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'skip': 'Skip', + 'take': 'Take', + 'order_by': 'OrderBy', + 'search_field': 'SearchField', + 'search_value': 'SearchValue', + }, + 'location_map': { + 'project_id': 'path', + 'skip': 'query', + 'take': 'query', + 'order_by': 'query', + 'search_field': 'query', + 'search_value': 'query', + 'search_attributes_in_project_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_projects_attribute_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/attributes', + 'operation_id': 'update_projects_attribute', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'update_projects_attribute_request', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'update_projects_attribute_request': + (UpdateProjectsAttributeRequest,), + }, + 'attribute_map': { + 'project_id': 'projectId', + }, + 'location_map': { + 'project_id': 'path', + 'update_projects_attribute_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def create_projects_attribute( + self, + project_id, + **kwargs + ): + """Create project attribute # noqa: E501 + +
Use case
User sets attribute parameters (listed in request example) and runs method execution
System search project
System creates attribute and relates it to the project
System returns project attribute properties (example listed in response parameters) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_projects_attribute(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + + Keyword Args: + create_projects_attribute_request (CreateProjectsAttributeRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + CustomAttributeModel + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.create_projects_attribute_endpoint.call_with_http_info(**kwargs) + + def delete_projects_attribute( + self, + project_id, + attribute_id, + **kwargs + ): + """Delete project attribute # noqa: E501 + +
Use case
User sets project identifier and runs method execution
User sets attribute identifier
User runs method execution
System search project
System search and delete attribute
System returns no content response # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_projects_attribute(project_id, attribute_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + attribute_id (str): Project attribute internal (UUID) + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + kwargs['attribute_id'] = \ + attribute_id + return self.delete_projects_attribute_endpoint.call_with_http_info(**kwargs) + + def get_attribute_by_project_id( + self, + project_id, + attribute_id, + **kwargs + ): + """Get project attribute # noqa: E501 + +
Use case
User sets project internal or global identifier
User sets project attribute identifier
User runs method execution
System search project
System search project attribute
System returns project attribute (listed in response model) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_attribute_by_project_id(project_id, attribute_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + attribute_id (str): Project attribute internal (UUID) or global (integer) identifier + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + CustomAttributeModel + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + kwargs['attribute_id'] = \ + attribute_id + return self.get_attribute_by_project_id_endpoint.call_with_http_info(**kwargs) + + def get_attributes_by_project_id( + self, + project_id, + **kwargs + ): + """Get project attributes # noqa: E501 + +
Use case
User sets project internal or global identifier
[Optional] User sets isDeleted field value
User runs method execution
System search project
[Optional] If User sets isDeleted field value as true, System search all deleted attributes related to project
[Optional] If User sets isDeleted field value as false, System search all attributes related to project which are not deleted
[Optional] If User did not set isDeleted field value, System search all attributes related to project
System returns array of found attributes (listed in response model) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_attributes_by_project_id(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + + Keyword Args: + is_deleted (DeletionState): [optional] if omitted the server will use the default value of NotDeleted + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [CustomAttributeModel] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.get_attributes_by_project_id_endpoint.call_with_http_info(**kwargs) + + def search_attributes_in_project( + self, + project_id, + **kwargs + ): + """Search for attributes used in the project # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_attributes_in_project(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Unique or global project ID + + Keyword Args: + skip (int): Amount of items to be skipped (offset). [optional] + take (int): Amount of items to be taken (limit). [optional] + order_by (str): SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC). [optional] + search_field (str): Property name for searching. [optional] + search_value (str): Value for searching. [optional] + search_attributes_in_project_request (SearchAttributesInProjectRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [CustomAttributeGetModel] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.search_attributes_in_project_endpoint.call_with_http_info(**kwargs) + + def update_projects_attribute( + self, + project_id, + **kwargs + ): + """Edit attribute of the project # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_projects_attribute(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Unique or global project ID + + Keyword Args: + update_projects_attribute_request (UpdateProjectsAttributeRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.update_projects_attribute_endpoint.call_with_http_info(**kwargs) + diff --git a/src/testit_api_client/api/project_configurations_api.py b/src/testit_api_client/api/project_configurations_api.py new file mode 100644 index 0000000..90c73a1 --- /dev/null +++ b/src/testit_api_client/api/project_configurations_api.py @@ -0,0 +1,174 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.api_client import ApiClient, Endpoint as _Endpoint +from testit_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from testit_api_client.model.configuration_model import ConfigurationModel +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.validation_problem_details import ValidationProblemDetails + + +class ProjectConfigurationsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.get_configurations_by_project_id_endpoint = _Endpoint( + settings={ + 'response_type': ([ConfigurationModel],), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/configurations', + 'operation_id': 'get_configurations_by_project_id', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + }, + 'attribute_map': { + 'project_id': 'projectId', + }, + 'location_map': { + 'project_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def get_configurations_by_project_id( + self, + project_id, + **kwargs + ): + """Get project configurations # noqa: E501 + +
Use case
User sets project internal or global identifier
User runs method execution
System search project
System search all configurations related to project
System returns array of found configurations (listed in response model) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_configurations_by_project_id(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ConfigurationModel] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.get_configurations_by_project_id_endpoint.call_with_http_info(**kwargs) + diff --git a/src/testit_api_client/api/project_export_api.py b/src/testit_api_client/api/project_export_api.py new file mode 100644 index 0000000..37e7cc6 --- /dev/null +++ b/src/testit_api_client/api/project_export_api.py @@ -0,0 +1,771 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.api_client import ApiClient, Endpoint as _Endpoint +from testit_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from testit_api_client.model.export_project_json_request import ExportProjectJsonRequest +from testit_api_client.model.export_project_with_test_plans_json_request import ExportProjectWithTestPlansJsonRequest +from testit_api_client.model.problem_details import ProblemDetails + + +class ProjectExportApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.export_endpoint = _Endpoint( + settings={ + 'response_type': (file_type,), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/export', + 'operation_id': 'export', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'include_attachments', + 'export_project_json_request', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'include_attachments': + (bool,), + 'export_project_json_request': + (ExportProjectJsonRequest,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'include_attachments': 'includeAttachments', + }, + 'location_map': { + 'project_id': 'path', + 'include_attachments': 'query', + 'export_project_json_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.export_project_json_endpoint = _Endpoint( + settings={ + 'response_type': (str,), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/export/json', + 'operation_id': 'export_project_json', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'time_zone_offset_in_minutes', + 'export_project_json_request', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'time_zone_offset_in_minutes': + (int,), + 'export_project_json_request': + (ExportProjectJsonRequest,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'time_zone_offset_in_minutes': 'time-Zone-Offset-In-Minutes', + }, + 'location_map': { + 'project_id': 'path', + 'time_zone_offset_in_minutes': 'header', + 'export_project_json_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.export_project_with_test_plans_json_endpoint = _Endpoint( + settings={ + 'response_type': (str,), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/export/testPlans/json', + 'operation_id': 'export_project_with_test_plans_json', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'time_zone_offset_in_minutes', + 'export_project_with_test_plans_json_request', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'time_zone_offset_in_minutes': + (int,), + 'export_project_with_test_plans_json_request': + (ExportProjectWithTestPlansJsonRequest,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'time_zone_offset_in_minutes': 'time-Zone-Offset-In-Minutes', + }, + 'location_map': { + 'project_id': 'path', + 'time_zone_offset_in_minutes': 'header', + 'export_project_with_test_plans_json_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.export_project_with_test_plans_zip_endpoint = _Endpoint( + settings={ + 'response_type': (str,), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/export/testPlans/zip', + 'operation_id': 'export_project_with_test_plans_zip', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'time_zone_offset_in_minutes', + 'export_project_with_test_plans_json_request', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'time_zone_offset_in_minutes': + (int,), + 'export_project_with_test_plans_json_request': + (ExportProjectWithTestPlansJsonRequest,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'time_zone_offset_in_minutes': 'time-Zone-Offset-In-Minutes', + }, + 'location_map': { + 'project_id': 'path', + 'time_zone_offset_in_minutes': 'header', + 'export_project_with_test_plans_json_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.export_project_zip_endpoint = _Endpoint( + settings={ + 'response_type': (str,), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/export/zip', + 'operation_id': 'export_project_zip', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'time_zone_offset_in_minutes', + 'export_project_json_request', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'time_zone_offset_in_minutes': + (int,), + 'export_project_json_request': + (ExportProjectJsonRequest,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'time_zone_offset_in_minutes': 'time-Zone-Offset-In-Minutes', + }, + 'location_map': { + 'project_id': 'path', + 'time_zone_offset_in_minutes': 'header', + 'export_project_json_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def export( + self, + project_id, + **kwargs + ): + """Export project as JSON file # noqa: E501 + +
This method exports the selected project or its part (sections, work items) to a `.json` file.
In the request body, you can specify sections and test cases to be exported.
Example of a request to export two sections and two test cases:
``` curl -X POST \"http://{domain}.com/api/v2/projects/27a32ce6-d972-4ef8-bef5-51be4bf9e468/export\" \\ -H \"accept: application/json\" -H \"Authorization: PrivateToken {token}\" -H \"Content-Type: application/json-patch+json\" \\ -d \"{\\\"sectionIds\\\":[\\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\\"9fa85f64-5717-4562-b3fc-2c963f66a000\\\"],\\\"workItemIds\\\":[\\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\\"90085f64-5717-4562-b3fc-2c963f66a000\\\"]}\" ```
In the response, you get:
- A `.zip` file with attachments and a.json file if you enable attachments export.
- A `.json` file with the project if you do not enable attachments export. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.export(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Specifies the ID of the project you want to export. + + Keyword Args: + include_attachments (bool): Enables attachment export.. [optional] if omitted the server will use the default value of False + export_project_json_request (ExportProjectJsonRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + file_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.export_endpoint.call_with_http_info(**kwargs) + + def export_project_json( + self, + project_id, + **kwargs + ): + """Export project as JSON file in background job # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.export_project_json(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + + Keyword Args: + time_zone_offset_in_minutes (int): [optional] + export_project_json_request (ExportProjectJsonRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + str + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.export_project_json_endpoint.call_with_http_info(**kwargs) + + def export_project_with_test_plans_json( + self, + project_id, + **kwargs + ): + """Export project as JSON file with test plans in background job # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.export_project_with_test_plans_json(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + + Keyword Args: + time_zone_offset_in_minutes (int): [optional] + export_project_with_test_plans_json_request (ExportProjectWithTestPlansJsonRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + str + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.export_project_with_test_plans_json_endpoint.call_with_http_info(**kwargs) + + def export_project_with_test_plans_zip( + self, + project_id, + **kwargs + ): + """Export project as Zip file with test plans in background job # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.export_project_with_test_plans_zip(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + + Keyword Args: + time_zone_offset_in_minutes (int): [optional] + export_project_with_test_plans_json_request (ExportProjectWithTestPlansJsonRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + str + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.export_project_with_test_plans_zip_endpoint.call_with_http_info(**kwargs) + + def export_project_zip( + self, + project_id, + **kwargs + ): + """Export project as Zip file in background job # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.export_project_zip(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + + Keyword Args: + time_zone_offset_in_minutes (int): [optional] + export_project_json_request (ExportProjectJsonRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + str + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.export_project_zip_endpoint.call_with_http_info(**kwargs) + diff --git a/src/testit_api_client/api/project_import_api.py b/src/testit_api_client/api/project_import_api.py new file mode 100644 index 0000000..6b8b64a --- /dev/null +++ b/src/testit_api_client/api/project_import_api.py @@ -0,0 +1,468 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.api_client import ApiClient, Endpoint as _Endpoint +from testit_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from testit_api_client.model.problem_details import ProblemDetails + + +class ProjectImportApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.background_import_to_existing_project_endpoint = _Endpoint( + settings={ + 'response_type': (str,), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/import/json', + 'operation_id': 'background_import_to_existing_project', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'file', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'file': + (file_type,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'file': 'file', + }, + 'location_map': { + 'project_id': 'path', + 'file': 'form', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'multipart/form-data' + ] + }, + api_client=api_client + ) + self.background_import_zip_to_existing_project_endpoint = _Endpoint( + settings={ + 'response_type': (str,), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/import/zip', + 'operation_id': 'background_import_zip_to_existing_project', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'file', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'file': + (file_type,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'file': 'file', + }, + 'location_map': { + 'project_id': 'path', + 'file': 'form', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'multipart/form-data' + ] + }, + api_client=api_client + ) + self.import_to_existing_project_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/import', + 'operation_id': 'import_to_existing_project', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'include_attachments', + 'file', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'include_attachments': + (bool,), + 'file': + (file_type,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'include_attachments': 'includeAttachments', + 'file': 'file', + }, + 'location_map': { + 'project_id': 'path', + 'include_attachments': 'query', + 'file': 'form', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'multipart/form-data' + ] + }, + api_client=api_client + ) + + def background_import_to_existing_project( + self, + project_id, + **kwargs + ): + """Import project from JSON file into existing project in background job # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.background_import_to_existing_project(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + + Keyword Args: + file (file_type): Select file. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + str + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.background_import_to_existing_project_endpoint.call_with_http_info(**kwargs) + + def background_import_zip_to_existing_project( + self, + project_id, + **kwargs + ): + """Import project from Zip file into existing project in background job # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.background_import_zip_to_existing_project(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + + Keyword Args: + file (file_type): Select file. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + str + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.background_import_zip_to_existing_project_endpoint.call_with_http_info(**kwargs) + + def import_to_existing_project( + self, + project_id, + **kwargs + ): + """Import project from JSON file into existing project # noqa: E501 + +
Use case
User attaches project as json file taken from export or export-by-testPlans method
User runs method execution
System updates project
System returns no content response # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.import_to_existing_project(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + + Keyword Args: + include_attachments (bool): [optional] + file (file_type): Select file. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.import_to_existing_project_endpoint.call_with_http_info(**kwargs) + diff --git a/src/testit_api_client/api/project_sections_api.py b/src/testit_api_client/api/project_sections_api.py new file mode 100644 index 0000000..54cf97a --- /dev/null +++ b/src/testit_api_client/api/project_sections_api.py @@ -0,0 +1,203 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.api_client import ApiClient, Endpoint as _Endpoint +from testit_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.section_model import SectionModel + + +class ProjectSectionsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.get_sections_by_project_id_endpoint = _Endpoint( + settings={ + 'response_type': ([SectionModel],), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/sections', + 'operation_id': 'get_sections_by_project_id', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'skip', + 'take', + 'order_by', + 'search_field', + 'search_value', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'skip': + (int,), + 'take': + (int,), + 'order_by': + (str,), + 'search_field': + (str,), + 'search_value': + (str,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'skip': 'Skip', + 'take': 'Take', + 'order_by': 'OrderBy', + 'search_field': 'SearchField', + 'search_value': 'SearchValue', + }, + 'location_map': { + 'project_id': 'path', + 'skip': 'query', + 'take': 'query', + 'order_by': 'query', + 'search_field': 'query', + 'search_value': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def get_sections_by_project_id( + self, + project_id, + **kwargs + ): + """Get project sections # noqa: E501 + +
Use case
User sets project internal or global identifier and runs method execution
System search project
System search all sections related to the project
System returns array of sections (listed in response) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_sections_by_project_id(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + + Keyword Args: + skip (int): Amount of items to be skipped (offset). [optional] + take (int): Amount of items to be taken (limit). [optional] + order_by (str): SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC). [optional] + search_field (str): Property name for searching. [optional] + search_value (str): Value for searching. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [SectionModel] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.get_sections_by_project_id_endpoint.call_with_http_info(**kwargs) + diff --git a/src/testit_api_client/api/project_test_plan_attributes_api.py b/src/testit_api_client/api/project_test_plan_attributes_api.py new file mode 100644 index 0000000..c070ab9 --- /dev/null +++ b/src/testit_api_client/api/project_test_plan_attributes_api.py @@ -0,0 +1,776 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.api_client import ApiClient, Endpoint as _Endpoint +from testit_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from testit_api_client.model.custom_attribute_get_model import CustomAttributeGetModel +from testit_api_client.model.custom_attribute_model import CustomAttributeModel +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.search_attributes_in_project_request import SearchAttributesInProjectRequest +from testit_api_client.model.update_custom_attribute_test_plan_project_relations_request import UpdateCustomAttributeTestPlanProjectRelationsRequest + + +class ProjectTestPlanAttributesApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_custom_attribute_test_plan_project_relations_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/testPlans/attributes', + 'operation_id': 'create_custom_attribute_test_plan_project_relations', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'request_body', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'request_body', + ] + }, + root_map={ + 'validations': { + ('request_body',): { + + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'request_body': + ([str],), + }, + 'attribute_map': { + 'project_id': 'projectId', + }, + 'location_map': { + 'project_id': 'path', + 'request_body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.delete_custom_attribute_test_plan_project_relations_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/testPlans/attributes/{attributeId}', + 'operation_id': 'delete_custom_attribute_test_plan_project_relations', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'attribute_id', + ], + 'required': [ + 'project_id', + 'attribute_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'attribute_id': + (str,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'attribute_id': 'attributeId', + }, + 'location_map': { + 'project_id': 'path', + 'attribute_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_custom_attribute_test_plan_project_relations_endpoint = _Endpoint( + settings={ + 'response_type': ([CustomAttributeModel],), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/testPlans/attributes', + 'operation_id': 'get_custom_attribute_test_plan_project_relations', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + }, + 'attribute_map': { + 'project_id': 'projectId', + }, + 'location_map': { + 'project_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.search_test_plan_attributes_in_project_endpoint = _Endpoint( + settings={ + 'response_type': ([CustomAttributeGetModel],), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/testPlans/attributes/search', + 'operation_id': 'search_test_plan_attributes_in_project', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'skip', + 'take', + 'order_by', + 'search_field', + 'search_value', + 'search_attributes_in_project_request', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'skip': + (int,), + 'take': + (int,), + 'order_by': + (str,), + 'search_field': + (str,), + 'search_value': + (str,), + 'search_attributes_in_project_request': + (SearchAttributesInProjectRequest,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'skip': 'Skip', + 'take': 'Take', + 'order_by': 'OrderBy', + 'search_field': 'SearchField', + 'search_value': 'SearchValue', + }, + 'location_map': { + 'project_id': 'path', + 'skip': 'query', + 'take': 'query', + 'order_by': 'query', + 'search_field': 'query', + 'search_value': 'query', + 'search_attributes_in_project_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_custom_attribute_test_plan_project_relations_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/testPlans/attributes', + 'operation_id': 'update_custom_attribute_test_plan_project_relations', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'update_custom_attribute_test_plan_project_relations_request', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'update_custom_attribute_test_plan_project_relations_request': + (UpdateCustomAttributeTestPlanProjectRelationsRequest,), + }, + 'attribute_map': { + 'project_id': 'projectId', + }, + 'location_map': { + 'project_id': 'path', + 'update_custom_attribute_test_plan_project_relations_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def create_custom_attribute_test_plan_project_relations( + self, + project_id, + **kwargs + ): + """Add attributes to project's test plans # noqa: E501 + +
Use case
User sets project internal or global identifier and attributes identifiers
User runs method execution
System updates project and add attributes to project for test plans
System returns no content response # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_custom_attribute_test_plan_project_relations(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + + Keyword Args: + request_body ([str]): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.create_custom_attribute_test_plan_project_relations_endpoint.call_with_http_info(**kwargs) + + def delete_custom_attribute_test_plan_project_relations( + self, + project_id, + attribute_id, + **kwargs + ): + """Delete attribute from project's test plans # noqa: E501 + +
Use case
User sets project internal or global identifier and attribute identifier
User runs method execution
System updates project and delete attribute from project for test plans
System returns no content response # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_custom_attribute_test_plan_project_relations(project_id, attribute_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + attribute_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + kwargs['attribute_id'] = \ + attribute_id + return self.delete_custom_attribute_test_plan_project_relations_endpoint.call_with_http_info(**kwargs) + + def get_custom_attribute_test_plan_project_relations( + self, + project_id, + **kwargs + ): + """Get project's test plan attributes # noqa: E501 + +
Use case
User runs method execution
System returns project for test plans attributes by project identifier # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_custom_attribute_test_plan_project_relations(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [CustomAttributeModel] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.get_custom_attribute_test_plan_project_relations_endpoint.call_with_http_info(**kwargs) + + def search_test_plan_attributes_in_project( + self, + project_id, + **kwargs + ): + """Search for attributes used in the project test plans # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_test_plan_attributes_in_project(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Unique or global project ID + + Keyword Args: + skip (int): Amount of items to be skipped (offset). [optional] + take (int): Amount of items to be taken (limit). [optional] + order_by (str): SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC). [optional] + search_field (str): Property name for searching. [optional] + search_value (str): Value for searching. [optional] + search_attributes_in_project_request (SearchAttributesInProjectRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [CustomAttributeGetModel] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.search_test_plan_attributes_in_project_endpoint.call_with_http_info(**kwargs) + + def update_custom_attribute_test_plan_project_relations( + self, + project_id, + **kwargs + ): + """Update attribute of project's test plans # noqa: E501 + +
Use case
User sets project internal or global identifier and attribute model
User runs method execution
System updates project and project attribute for test plan
System returns no content response # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_custom_attribute_test_plan_project_relations(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + + Keyword Args: + update_custom_attribute_test_plan_project_relations_request (UpdateCustomAttributeTestPlanProjectRelationsRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.update_custom_attribute_test_plan_project_relations_endpoint.call_with_http_info(**kwargs) + diff --git a/src/testit_api_client/api/project_test_plans_api.py b/src/testit_api_client/api/project_test_plans_api.py new file mode 100644 index 0000000..9e4cf3d --- /dev/null +++ b/src/testit_api_client/api/project_test_plans_api.py @@ -0,0 +1,958 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.api_client import ApiClient, Endpoint as _Endpoint +from testit_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from testit_api_client.model.api_v2_projects_project_id_test_plans_delete_bulk_post_request import ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest +from testit_api_client.model.api_v2_projects_project_id_test_plans_search_post_request import ApiV2ProjectsProjectIdTestPlansSearchPostRequest +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.test_plan_with_analytic_model import TestPlanWithAnalyticModel + + +class ProjectTestPlansApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.api_v2_projects_project_id_test_plans_analytics_get_endpoint = _Endpoint( + settings={ + 'response_type': ([TestPlanWithAnalyticModel],), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/testPlans/analytics', + 'operation_id': 'api_v2_projects_project_id_test_plans_analytics_get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'is_deleted', + 'must_update_cache', + 'skip', + 'take', + 'order_by', + 'search_field', + 'search_value', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'is_deleted': + (bool,), + 'must_update_cache': + (bool,), + 'skip': + (int,), + 'take': + (int,), + 'order_by': + (str,), + 'search_field': + (str,), + 'search_value': + (str,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'is_deleted': 'isDeleted', + 'must_update_cache': 'mustUpdateCache', + 'skip': 'Skip', + 'take': 'Take', + 'order_by': 'OrderBy', + 'search_field': 'SearchField', + 'search_value': 'SearchValue', + }, + 'location_map': { + 'project_id': 'path', + 'is_deleted': 'query', + 'must_update_cache': 'query', + 'skip': 'query', + 'take': 'query', + 'order_by': 'query', + 'search_field': 'query', + 'search_value': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.api_v2_projects_project_id_test_plans_delete_bulk_post_endpoint = _Endpoint( + settings={ + 'response_type': ([str],), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/testPlans/delete/bulk', + 'operation_id': 'api_v2_projects_project_id_test_plans_delete_bulk_post', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'api_v2_projects_project_id_test_plans_delete_bulk_post_request', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'api_v2_projects_project_id_test_plans_delete_bulk_post_request': + (ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest,), + }, + 'attribute_map': { + 'project_id': 'projectId', + }, + 'location_map': { + 'project_id': 'path', + 'api_v2_projects_project_id_test_plans_delete_bulk_post_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.api_v2_projects_project_id_test_plans_name_exists_get_endpoint = _Endpoint( + settings={ + 'response_type': (bool,), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/testPlans/{name}/exists', + 'operation_id': 'api_v2_projects_project_id_test_plans_name_exists_get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'name', + ], + 'required': [ + 'project_id', + 'name', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'name': + (str,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'name': 'name', + }, + 'location_map': { + 'project_id': 'path', + 'name': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.api_v2_projects_project_id_test_plans_purge_bulk_post_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/testPlans/purge/bulk', + 'operation_id': 'api_v2_projects_project_id_test_plans_purge_bulk_post', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'api_v2_projects_project_id_test_plans_delete_bulk_post_request', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'api_v2_projects_project_id_test_plans_delete_bulk_post_request': + (ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest,), + }, + 'attribute_map': { + 'project_id': 'projectId', + }, + 'location_map': { + 'project_id': 'path', + 'api_v2_projects_project_id_test_plans_delete_bulk_post_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.api_v2_projects_project_id_test_plans_restore_bulk_post_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/testPlans/restore/bulk', + 'operation_id': 'api_v2_projects_project_id_test_plans_restore_bulk_post', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'api_v2_projects_project_id_test_plans_delete_bulk_post_request', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'api_v2_projects_project_id_test_plans_delete_bulk_post_request': + (ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest,), + }, + 'attribute_map': { + 'project_id': 'projectId', + }, + 'location_map': { + 'project_id': 'path', + 'api_v2_projects_project_id_test_plans_delete_bulk_post_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.api_v2_projects_project_id_test_plans_search_post_endpoint = _Endpoint( + settings={ + 'response_type': ([TestPlanWithAnalyticModel],), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/testPlans/search', + 'operation_id': 'api_v2_projects_project_id_test_plans_search_post', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'must_update_cache', + 'skip', + 'take', + 'order_by', + 'search_field', + 'search_value', + 'api_v2_projects_project_id_test_plans_search_post_request', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'must_update_cache': + (bool,), + 'skip': + (int,), + 'take': + (int,), + 'order_by': + (str,), + 'search_field': + (str,), + 'search_value': + (str,), + 'api_v2_projects_project_id_test_plans_search_post_request': + (ApiV2ProjectsProjectIdTestPlansSearchPostRequest,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'must_update_cache': 'mustUpdateCache', + 'skip': 'Skip', + 'take': 'Take', + 'order_by': 'OrderBy', + 'search_field': 'SearchField', + 'search_value': 'SearchValue', + }, + 'location_map': { + 'project_id': 'path', + 'must_update_cache': 'query', + 'skip': 'query', + 'take': 'query', + 'order_by': 'query', + 'search_field': 'query', + 'search_value': 'query', + 'api_v2_projects_project_id_test_plans_search_post_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def api_v2_projects_project_id_test_plans_analytics_get( + self, + project_id, + **kwargs + ): + """Get TestPlans analytics # noqa: E501 + +
Use case
User sets project internal identifier
User sets query params
User runs method execution
System return analytics # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.api_v2_projects_project_id_test_plans_analytics_get(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) identifier + + Keyword Args: + is_deleted (bool): [optional] + must_update_cache (bool): [optional] if omitted the server will use the default value of False + skip (int): Amount of items to be skipped (offset). [optional] + take (int): Amount of items to be taken (limit). [optional] + order_by (str): SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC). [optional] + search_field (str): Property name for searching. [optional] + search_value (str): Value for searching. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [TestPlanWithAnalyticModel] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.api_v2_projects_project_id_test_plans_analytics_get_endpoint.call_with_http_info(**kwargs) + + def api_v2_projects_project_id_test_plans_delete_bulk_post( + self, + project_id, + **kwargs + ): + """Delete multiple test plans # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.api_v2_projects_project_id_test_plans_delete_bulk_post(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Unique or global ID of the project + + Keyword Args: + api_v2_projects_project_id_test_plans_delete_bulk_post_request (ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [str] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.api_v2_projects_project_id_test_plans_delete_bulk_post_endpoint.call_with_http_info(**kwargs) + + def api_v2_projects_project_id_test_plans_name_exists_get( + self, + project_id, + name, + **kwargs + ): + """Checks if TestPlan exists with the specified name exists for the project # noqa: E501 + +
Use case
User sets project internal or global identifier
User runs method execution
System purge delete project workitems # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.api_v2_projects_project_id_test_plans_name_exists_get(project_id, name, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + name (str): TestPlan name to check + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + bool + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + kwargs['name'] = \ + name + return self.api_v2_projects_project_id_test_plans_name_exists_get_endpoint.call_with_http_info(**kwargs) + + def api_v2_projects_project_id_test_plans_purge_bulk_post( + self, + project_id, + **kwargs + ): + """Permanently delete multiple archived test plans # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.api_v2_projects_project_id_test_plans_purge_bulk_post(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Unique or global ID of the project + + Keyword Args: + api_v2_projects_project_id_test_plans_delete_bulk_post_request (ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.api_v2_projects_project_id_test_plans_purge_bulk_post_endpoint.call_with_http_info(**kwargs) + + def api_v2_projects_project_id_test_plans_restore_bulk_post( + self, + project_id, + **kwargs + ): + """Restore multiple test plans # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.api_v2_projects_project_id_test_plans_restore_bulk_post(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Unique or global ID of the project + + Keyword Args: + api_v2_projects_project_id_test_plans_delete_bulk_post_request (ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.api_v2_projects_project_id_test_plans_restore_bulk_post_endpoint.call_with_http_info(**kwargs) + + def api_v2_projects_project_id_test_plans_search_post( + self, + project_id, + **kwargs + ): + """Get Project TestPlans with analytics # noqa: E501 + +
Use case
User sets project internal or global identifier
User sets request body
User runs method execution
System returns project testplans with analytics # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.api_v2_projects_project_id_test_plans_search_post(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + + Keyword Args: + must_update_cache (bool): [optional] if omitted the server will use the default value of False + skip (int): Amount of items to be skipped (offset). [optional] + take (int): Amount of items to be taken (limit). [optional] + order_by (str): SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC). [optional] + search_field (str): Property name for searching. [optional] + search_value (str): Value for searching. [optional] + api_v2_projects_project_id_test_plans_search_post_request (ApiV2ProjectsProjectIdTestPlansSearchPostRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [TestPlanWithAnalyticModel] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.api_v2_projects_project_id_test_plans_search_post_endpoint.call_with_http_info(**kwargs) + diff --git a/src/testit_api_client/api/project_work_items_api.py b/src/testit_api_client/api/project_work_items_api.py new file mode 100644 index 0000000..5cfb772 --- /dev/null +++ b/src/testit_api_client/api/project_work_items_api.py @@ -0,0 +1,876 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.api_client import ApiClient, Endpoint as _Endpoint +from testit_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from testit_api_client.model.api_v2_projects_project_id_work_items_search_grouped_post_request import ApiV2ProjectsProjectIdWorkItemsSearchGroupedPostRequest +from testit_api_client.model.api_v2_projects_project_id_work_items_search_post_request import ApiV2ProjectsProjectIdWorkItemsSearchPostRequest +from testit_api_client.model.problem_details import ProblemDetails +from testit_api_client.model.tag_short_model import TagShortModel +from testit_api_client.model.work_item_group_model import WorkItemGroupModel +from testit_api_client.model.work_item_short_model import WorkItemShortModel + + +class ProjectWorkItemsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.api_v2_projects_project_id_work_items_search_grouped_post_endpoint = _Endpoint( + settings={ + 'response_type': ([WorkItemGroupModel],), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/workItems/search/grouped', + 'operation_id': 'api_v2_projects_project_id_work_items_search_grouped_post', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'skip', + 'take', + 'order_by', + 'search_field', + 'search_value', + 'api_v2_projects_project_id_work_items_search_grouped_post_request', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'skip': + (int,), + 'take': + (int,), + 'order_by': + (str,), + 'search_field': + (str,), + 'search_value': + (str,), + 'api_v2_projects_project_id_work_items_search_grouped_post_request': + (ApiV2ProjectsProjectIdWorkItemsSearchGroupedPostRequest,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'skip': 'Skip', + 'take': 'Take', + 'order_by': 'OrderBy', + 'search_field': 'SearchField', + 'search_value': 'SearchValue', + }, + 'location_map': { + 'project_id': 'path', + 'skip': 'query', + 'take': 'query', + 'order_by': 'query', + 'search_field': 'query', + 'search_value': 'query', + 'api_v2_projects_project_id_work_items_search_grouped_post_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.api_v2_projects_project_id_work_items_search_id_post_endpoint = _Endpoint( + settings={ + 'response_type': ([str],), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/workItems/search/id', + 'operation_id': 'api_v2_projects_project_id_work_items_search_id_post', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'skip', + 'take', + 'order_by', + 'search_field', + 'search_value', + 'api_v2_projects_project_id_work_items_search_post_request', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'skip': + (int,), + 'take': + (int,), + 'order_by': + (str,), + 'search_field': + (str,), + 'search_value': + (str,), + 'api_v2_projects_project_id_work_items_search_post_request': + (ApiV2ProjectsProjectIdWorkItemsSearchPostRequest,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'skip': 'Skip', + 'take': 'Take', + 'order_by': 'OrderBy', + 'search_field': 'SearchField', + 'search_value': 'SearchValue', + }, + 'location_map': { + 'project_id': 'path', + 'skip': 'query', + 'take': 'query', + 'order_by': 'query', + 'search_field': 'query', + 'search_value': 'query', + 'api_v2_projects_project_id_work_items_search_post_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.api_v2_projects_project_id_work_items_search_post_endpoint = _Endpoint( + settings={ + 'response_type': ([WorkItemShortModel],), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/workItems/search', + 'operation_id': 'api_v2_projects_project_id_work_items_search_post', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'skip', + 'take', + 'order_by', + 'search_field', + 'search_value', + 'api_v2_projects_project_id_work_items_search_post_request', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'skip': + (int,), + 'take': + (int,), + 'order_by': + (str,), + 'search_field': + (str,), + 'search_value': + (str,), + 'api_v2_projects_project_id_work_items_search_post_request': + (ApiV2ProjectsProjectIdWorkItemsSearchPostRequest,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'skip': 'Skip', + 'take': 'Take', + 'order_by': 'OrderBy', + 'search_field': 'SearchField', + 'search_value': 'SearchValue', + }, + 'location_map': { + 'project_id': 'path', + 'skip': 'query', + 'take': 'query', + 'order_by': 'query', + 'search_field': 'query', + 'search_value': 'query', + 'api_v2_projects_project_id_work_items_search_post_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.api_v2_projects_project_id_work_items_tags_get_endpoint = _Endpoint( + settings={ + 'response_type': ([TagShortModel],), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/workItems/tags', + 'operation_id': 'api_v2_projects_project_id_work_items_tags_get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'is_deleted', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'is_deleted': + (bool,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'is_deleted': 'isDeleted', + }, + 'location_map': { + 'project_id': 'path', + 'is_deleted': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_work_items_by_project_id_endpoint = _Endpoint( + settings={ + 'response_type': ([WorkItemShortModel],), + 'auth': [ + 'Bearer or PrivateToken' + ], + 'endpoint_path': '/api/v2/projects/{projectId}/workItems', + 'operation_id': 'get_work_items_by_project_id', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'project_id', + 'is_deleted', + 'tag_names', + 'include_iterations', + 'skip', + 'take', + 'order_by', + 'search_field', + 'search_value', + ], + 'required': [ + 'project_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'project_id': + (str,), + 'is_deleted': + (bool,), + 'tag_names': + ([str],), + 'include_iterations': + (bool,), + 'skip': + (int,), + 'take': + (int,), + 'order_by': + (str,), + 'search_field': + (str,), + 'search_value': + (str,), + }, + 'attribute_map': { + 'project_id': 'projectId', + 'is_deleted': 'isDeleted', + 'tag_names': 'tagNames', + 'include_iterations': 'includeIterations', + 'skip': 'Skip', + 'take': 'Take', + 'order_by': 'OrderBy', + 'search_field': 'SearchField', + 'search_value': 'SearchValue', + }, + 'location_map': { + 'project_id': 'path', + 'is_deleted': 'query', + 'tag_names': 'query', + 'include_iterations': 'query', + 'skip': 'query', + 'take': 'query', + 'order_by': 'query', + 'search_field': 'query', + 'search_value': 'query', + }, + 'collection_format_map': { + 'tag_names': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def api_v2_projects_project_id_work_items_search_grouped_post( + self, + project_id, + **kwargs + ): + """Search for work items and group results by attribute # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.api_v2_projects_project_id_work_items_search_grouped_post(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Unique or global ID of the project + + Keyword Args: + skip (int): Amount of items to be skipped (offset). [optional] + take (int): Amount of items to be taken (limit). [optional] + order_by (str): SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC). [optional] + search_field (str): Property name for searching. [optional] + search_value (str): Value for searching. [optional] + api_v2_projects_project_id_work_items_search_grouped_post_request (ApiV2ProjectsProjectIdWorkItemsSearchGroupedPostRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [WorkItemGroupModel] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.api_v2_projects_project_id_work_items_search_grouped_post_endpoint.call_with_http_info(**kwargs) + + def api_v2_projects_project_id_work_items_search_id_post( + self, + project_id, + **kwargs + ): + """Search for work items and extract IDs only # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.api_v2_projects_project_id_work_items_search_id_post(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Unique or global ID of the project + + Keyword Args: + skip (int): Amount of items to be skipped (offset). [optional] + take (int): Amount of items to be taken (limit). [optional] + order_by (str): SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC). [optional] + search_field (str): Property name for searching. [optional] + search_value (str): Value for searching. [optional] + api_v2_projects_project_id_work_items_search_post_request (ApiV2ProjectsProjectIdWorkItemsSearchPostRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [str] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.api_v2_projects_project_id_work_items_search_id_post_endpoint.call_with_http_info(**kwargs) + + def api_v2_projects_project_id_work_items_search_post( + self, + project_id, + **kwargs + ): + """Search for work items # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.api_v2_projects_project_id_work_items_search_post(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Unique or global ID of the project + + Keyword Args: + skip (int): Amount of items to be skipped (offset). [optional] + take (int): Amount of items to be taken (limit). [optional] + order_by (str): SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC). [optional] + search_field (str): Property name for searching. [optional] + search_value (str): Value for searching. [optional] + api_v2_projects_project_id_work_items_search_post_request (ApiV2ProjectsProjectIdWorkItemsSearchPostRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [WorkItemShortModel] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.api_v2_projects_project_id_work_items_search_post_endpoint.call_with_http_info(**kwargs) + + def api_v2_projects_project_id_work_items_tags_get( + self, + project_id, + **kwargs + ): + """Get WorkItems Tags # noqa: E501 + +
Use case
User sets project internal identifier
User runs method execution
System returns work items tags # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.api_v2_projects_project_id_work_items_tags_get(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) identifier + + Keyword Args: + is_deleted (bool): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [TagShortModel] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.api_v2_projects_project_id_work_items_tags_get_endpoint.call_with_http_info(**kwargs) + + def get_work_items_by_project_id( + self, + project_id, + **kwargs + ): + """Get project work items # noqa: E501 + +
Use case
User sets project internal or global identifier
[Optional] User sets isDeleted field value
User runs method execution
System search project
[Optional] If User sets isDeleted field value as true, System search all deleted workitems related to project
[Optional] If User sets isDeleted field value as false, System search all workitems related to project which are not deleted
If User did not set isDeleted field value, System search all workitems related to project
System returns array of found workitems (listed in response model) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_work_items_by_project_id(project_id, async_req=True) + >>> result = thread.get() + + Args: + project_id (str): Project internal (UUID) or global (integer) identifier + + Keyword Args: + is_deleted (bool): If result must consist of only actual/deleted work items. [optional] if omitted the server will use the default value of False + tag_names ([str]): List of tags to filter by. [optional] + include_iterations (bool): [optional] if omitted the server will use the default value of True + skip (int): Amount of items to be skipped (offset). [optional] + take (int): Amount of items to be taken (limit). [optional] + order_by (str): SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC). [optional] + search_field (str): Property name for searching. [optional] + search_value (str): Value for searching. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [WorkItemShortModel] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['project_id'] = \ + project_id + return self.get_work_items_by_project_id_endpoint.call_with_http_info(**kwargs) + diff --git a/src/testit_api_client/model/api_v2_projects_project_id_attributes_templates_search_post_request.py b/src/testit_api_client/model/api_v2_projects_project_id_attributes_templates_search_post_request.py new file mode 100644 index 0000000..30c17aa --- /dev/null +++ b/src/testit_api_client/model/api_v2_projects_project_id_attributes_templates_search_post_request.py @@ -0,0 +1,327 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.custom_attribute_types_enum import CustomAttributeTypesEnum + from testit_api_client.model.project_custom_attributes_templates_filter_model import ProjectCustomAttributesTemplatesFilterModel + globals()['CustomAttributeTypesEnum'] = CustomAttributeTypesEnum + globals()['ProjectCustomAttributesTemplatesFilterModel'] = ProjectCustomAttributesTemplatesFilterModel + + +class ApiV2ProjectsProjectIdAttributesTemplatesSearchPostRequest(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('custom_attribute_types',): { + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str, none_type,), # noqa: E501 + 'custom_attribute_types': ([CustomAttributeTypesEnum], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'custom_attribute_types': 'customAttributeTypes', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApiV2ProjectsProjectIdAttributesTemplatesSearchPostRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str, none_type): Name of custom attribute template. [optional] # noqa: E501 + custom_attribute_types ([CustomAttributeTypesEnum], none_type): Collection of custom attributes types. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApiV2ProjectsProjectIdAttributesTemplatesSearchPostRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str, none_type): Name of custom attribute template. [optional] # noqa: E501 + custom_attribute_types ([CustomAttributeTypesEnum], none_type): Collection of custom attributes types. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + ProjectCustomAttributesTemplatesFilterModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/api_v2_projects_project_id_test_plans_delete_bulk_post_request.py b/src/testit_api_client/model/api_v2_projects_project_id_test_plans_delete_bulk_post_request.py new file mode 100644 index 0000000..b473aea --- /dev/null +++ b/src/testit_api_client/model/api_v2_projects_project_id_test_plans_delete_bulk_post_request.py @@ -0,0 +1,327 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.api_v2_projects_project_id_test_plans_search_post_request import ApiV2ProjectsProjectIdTestPlansSearchPostRequest + from testit_api_client.model.test_plan_extraction_model import TestPlanExtractionModel + from testit_api_client.model.test_plan_select_model import TestPlanSelectModel + globals()['ApiV2ProjectsProjectIdTestPlansSearchPostRequest'] = ApiV2ProjectsProjectIdTestPlansSearchPostRequest + globals()['TestPlanExtractionModel'] = TestPlanExtractionModel + globals()['TestPlanSelectModel'] = TestPlanSelectModel + + +class ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'filter': (ApiV2ProjectsProjectIdTestPlansSearchPostRequest,), # noqa: E501 + 'extraction_model': (TestPlanExtractionModel,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'filter': 'filter', # noqa: E501 + 'extraction_model': 'extractionModel', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest - a model defined in OpenAPI + + Keyword Args: + filter (ApiV2ProjectsProjectIdTestPlansSearchPostRequest): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + extraction_model (TestPlanExtractionModel): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApiV2ProjectsProjectIdTestPlansDeleteBulkPostRequest - a model defined in OpenAPI + + Keyword Args: + filter (ApiV2ProjectsProjectIdTestPlansSearchPostRequest): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + extraction_model (TestPlanExtractionModel): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + TestPlanSelectModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/api_v2_projects_project_id_test_plans_search_post_request.py b/src/testit_api_client/model/api_v2_projects_project_id_test_plans_search_post_request.py new file mode 100644 index 0000000..71519d3 --- /dev/null +++ b/src/testit_api_client/model/api_v2_projects_project_id_test_plans_search_post_request.py @@ -0,0 +1,409 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.date_time_range_selector_model import DateTimeRangeSelectorModel + from testit_api_client.model.project_test_plans_filter_model import ProjectTestPlansFilterModel + from testit_api_client.model.test_plan_status_model import TestPlanStatusModel + globals()['DateTimeRangeSelectorModel'] = DateTimeRangeSelectorModel + globals()['ProjectTestPlansFilterModel'] = ProjectTestPlansFilterModel + globals()['TestPlanStatusModel'] = TestPlanStatusModel + + +class ApiV2ProjectsProjectIdTestPlansSearchPostRequest(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('name',): { + 'max_length': 255, + 'min_length': 0, + }, + ('description',): { + 'max_length': 255, + 'min_length': 0, + }, + ('build',): { + 'max_length': 255, + 'min_length': 0, + }, + ('product_name',): { + 'max_length': 255, + 'min_length': 0, + }, + ('status',): { + }, + ('global_ids',): { + }, + ('automatic_duration_timer',): { + }, + ('created_by_ids',): { + }, + ('tag_names',): { + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str, none_type,), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + 'build': (str, none_type,), # noqa: E501 + 'product_name': (str, none_type,), # noqa: E501 + 'status': ([TestPlanStatusModel], none_type,), # noqa: E501 + 'global_ids': ([int], none_type,), # noqa: E501 + 'is_locked': (bool, none_type,), # noqa: E501 + 'locked_date': (DateTimeRangeSelectorModel,), # noqa: E501 + 'automatic_duration_timer': ([bool], none_type,), # noqa: E501 + 'created_by_ids': ([str], none_type,), # noqa: E501 + 'created_date': (DateTimeRangeSelectorModel,), # noqa: E501 + 'start_date': (DateTimeRangeSelectorModel,), # noqa: E501 + 'end_date': (DateTimeRangeSelectorModel,), # noqa: E501 + 'tag_names': ([str], none_type,), # noqa: E501 + 'attributes': ({str: ([str], none_type)}, none_type,), # noqa: E501 + 'is_deleted': (bool, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'description': 'description', # noqa: E501 + 'build': 'build', # noqa: E501 + 'product_name': 'productName', # noqa: E501 + 'status': 'status', # noqa: E501 + 'global_ids': 'globalIds', # noqa: E501 + 'is_locked': 'isLocked', # noqa: E501 + 'locked_date': 'lockedDate', # noqa: E501 + 'automatic_duration_timer': 'automaticDurationTimer', # noqa: E501 + 'created_by_ids': 'createdByIds', # noqa: E501 + 'created_date': 'createdDate', # noqa: E501 + 'start_date': 'startDate', # noqa: E501 + 'end_date': 'endDate', # noqa: E501 + 'tag_names': 'tagNames', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'is_deleted': 'isDeleted', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApiV2ProjectsProjectIdTestPlansSearchPostRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str, none_type): [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + build (str, none_type): [optional] # noqa: E501 + product_name (str, none_type): [optional] # noqa: E501 + status ([TestPlanStatusModel], none_type): [optional] # noqa: E501 + global_ids ([int], none_type): [optional] # noqa: E501 + is_locked (bool, none_type): [optional] # noqa: E501 + locked_date (DateTimeRangeSelectorModel): [optional] # noqa: E501 + automatic_duration_timer ([bool], none_type): [optional] # noqa: E501 + created_by_ids ([str], none_type): [optional] # noqa: E501 + created_date (DateTimeRangeSelectorModel): [optional] # noqa: E501 + start_date (DateTimeRangeSelectorModel): [optional] # noqa: E501 + end_date (DateTimeRangeSelectorModel): [optional] # noqa: E501 + tag_names ([str], none_type): [optional] # noqa: E501 + attributes ({str: ([str], none_type)}, none_type): [optional] # noqa: E501 + is_deleted (bool, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApiV2ProjectsProjectIdTestPlansSearchPostRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str, none_type): [optional] # noqa: E501 + description (str, none_type): [optional] # noqa: E501 + build (str, none_type): [optional] # noqa: E501 + product_name (str, none_type): [optional] # noqa: E501 + status ([TestPlanStatusModel], none_type): [optional] # noqa: E501 + global_ids ([int], none_type): [optional] # noqa: E501 + is_locked (bool, none_type): [optional] # noqa: E501 + locked_date (DateTimeRangeSelectorModel): [optional] # noqa: E501 + automatic_duration_timer ([bool], none_type): [optional] # noqa: E501 + created_by_ids ([str], none_type): [optional] # noqa: E501 + created_date (DateTimeRangeSelectorModel): [optional] # noqa: E501 + start_date (DateTimeRangeSelectorModel): [optional] # noqa: E501 + end_date (DateTimeRangeSelectorModel): [optional] # noqa: E501 + tag_names ([str], none_type): [optional] # noqa: E501 + attributes ({str: ([str], none_type)}, none_type): [optional] # noqa: E501 + is_deleted (bool, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + ProjectTestPlansFilterModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/api_v2_projects_project_id_work_items_search_grouped_post_request.py b/src/testit_api_client/model/api_v2_projects_project_id_work_items_search_grouped_post_request.py new file mode 100644 index 0000000..94150f9 --- /dev/null +++ b/src/testit_api_client/model/api_v2_projects_project_id_work_items_search_grouped_post_request.py @@ -0,0 +1,331 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.work_item_group_get_model import WorkItemGroupGetModel + from testit_api_client.model.work_item_group_get_model_select_model import WorkItemGroupGetModelSelectModel + from testit_api_client.model.work_item_group_type import WorkItemGroupType + globals()['WorkItemGroupGetModel'] = WorkItemGroupGetModel + globals()['WorkItemGroupGetModelSelectModel'] = WorkItemGroupGetModelSelectModel + globals()['WorkItemGroupType'] = WorkItemGroupType + + +class ApiV2ProjectsProjectIdWorkItemsSearchGroupedPostRequest(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'group_type': (WorkItemGroupType,), # noqa: E501 + 'select_model': (WorkItemGroupGetModelSelectModel,), # noqa: E501 + 'custom_attribute_id': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'group_type': 'groupType', # noqa: E501 + 'select_model': 'selectModel', # noqa: E501 + 'custom_attribute_id': 'customAttributeId', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApiV2ProjectsProjectIdWorkItemsSearchGroupedPostRequest - a model defined in OpenAPI + + Keyword Args: + group_type (WorkItemGroupType): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + select_model (WorkItemGroupGetModelSelectModel): [optional] # noqa: E501 + custom_attribute_id (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApiV2ProjectsProjectIdWorkItemsSearchGroupedPostRequest - a model defined in OpenAPI + + Keyword Args: + group_type (WorkItemGroupType): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + select_model (WorkItemGroupGetModelSelectModel): [optional] # noqa: E501 + custom_attribute_id (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + WorkItemGroupGetModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/api_v2_projects_project_id_work_items_search_post_request.py b/src/testit_api_client/model/api_v2_projects_project_id_work_items_search_post_request.py new file mode 100644 index 0000000..aac3bad --- /dev/null +++ b/src/testit_api_client/model/api_v2_projects_project_id_work_items_search_post_request.py @@ -0,0 +1,327 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.work_item_local_select_model_extraction_model import WorkItemLocalSelectModelExtractionModel + from testit_api_client.model.work_item_select_model import WorkItemSelectModel + from testit_api_client.model.work_item_select_model_filter import WorkItemSelectModelFilter + globals()['WorkItemLocalSelectModelExtractionModel'] = WorkItemLocalSelectModelExtractionModel + globals()['WorkItemSelectModel'] = WorkItemSelectModel + globals()['WorkItemSelectModelFilter'] = WorkItemSelectModelFilter + + +class ApiV2ProjectsProjectIdWorkItemsSearchPostRequest(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'filter': (WorkItemSelectModelFilter,), # noqa: E501 + 'extraction_model': (WorkItemLocalSelectModelExtractionModel,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'filter': 'filter', # noqa: E501 + 'extraction_model': 'extractionModel', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApiV2ProjectsProjectIdWorkItemsSearchPostRequest - a model defined in OpenAPI + + Keyword Args: + filter (WorkItemSelectModelFilter): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + extraction_model (WorkItemLocalSelectModelExtractionModel): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApiV2ProjectsProjectIdWorkItemsSearchPostRequest - a model defined in OpenAPI + + Keyword Args: + filter (WorkItemSelectModelFilter): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + extraction_model (WorkItemLocalSelectModelExtractionModel): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + WorkItemSelectModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/autotest_select_model_extraction_model.py b/src/testit_api_client/model/autotest_select_model_extraction_model.py new file mode 100644 index 0000000..22fa0f9 --- /dev/null +++ b/src/testit_api_client/model/autotest_select_model_extraction_model.py @@ -0,0 +1,321 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.autotests_extraction_model import AutotestsExtractionModel + from testit_api_client.model.autotests_extraction_model_ids import AutotestsExtractionModelIds + globals()['AutotestsExtractionModel'] = AutotestsExtractionModel + globals()['AutotestsExtractionModelIds'] = AutotestsExtractionModelIds + + +class AutotestSelectModelExtractionModel(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'ids': (AutotestsExtractionModelIds,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'ids': 'ids', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AutotestSelectModelExtractionModel - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + ids (AutotestsExtractionModelIds): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AutotestSelectModelExtractionModel - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + ids (AutotestsExtractionModelIds): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + AutotestsExtractionModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/autotest_select_model_filter.py b/src/testit_api_client/model/autotest_select_model_filter.py new file mode 100644 index 0000000..64e55b6 --- /dev/null +++ b/src/testit_api_client/model/autotest_select_model_filter.py @@ -0,0 +1,409 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.autotest_filter_model import AutotestFilterModel + from testit_api_client.model.autotest_filter_model_created_date import AutotestFilterModelCreatedDate + from testit_api_client.model.autotest_filter_model_modified_date import AutotestFilterModelModifiedDate + from testit_api_client.model.autotest_filter_model_stability_percentage import AutotestFilterModelStabilityPercentage + from testit_api_client.model.autotest_result_outcome import AutotestResultOutcome + globals()['AutotestFilterModel'] = AutotestFilterModel + globals()['AutotestFilterModelCreatedDate'] = AutotestFilterModelCreatedDate + globals()['AutotestFilterModelModifiedDate'] = AutotestFilterModelModifiedDate + globals()['AutotestFilterModelStabilityPercentage'] = AutotestFilterModelStabilityPercentage + globals()['AutotestResultOutcome'] = AutotestResultOutcome + + +class AutotestSelectModelFilter(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('project_ids',): { + }, + ('external_ids',): { + }, + ('global_ids',): { + }, + ('name',): { + 'max_length': 255, + 'min_length': 0, + }, + ('created_by_ids',): { + }, + ('modified_by_ids',): { + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'project_ids': ([str], none_type,), # noqa: E501 + 'external_ids': ([str], none_type,), # noqa: E501 + 'global_ids': ([int], none_type,), # noqa: E501 + 'name': (str, none_type,), # noqa: E501 + 'is_flaky': (bool, none_type,), # noqa: E501 + 'must_be_approved': (bool, none_type,), # noqa: E501 + 'stability_percentage': (AutotestFilterModelStabilityPercentage,), # noqa: E501 + 'created_date': (AutotestFilterModelCreatedDate,), # noqa: E501 + 'created_by_ids': ([str], none_type,), # noqa: E501 + 'modified_date': (AutotestFilterModelModifiedDate,), # noqa: E501 + 'modified_by_ids': ([str], none_type,), # noqa: E501 + 'is_deleted': (bool, none_type,), # noqa: E501 + 'namespace': (str, none_type,), # noqa: E501 + 'is_empty_namespace': (bool, none_type,), # noqa: E501 + 'class_name': (str, none_type,), # noqa: E501 + 'is_empty_class_name': (bool, none_type,), # noqa: E501 + 'last_test_result_outcome': (AutotestResultOutcome,), # noqa: E501 + 'external_key': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'project_ids': 'projectIds', # noqa: E501 + 'external_ids': 'externalIds', # noqa: E501 + 'global_ids': 'globalIds', # noqa: E501 + 'name': 'name', # noqa: E501 + 'is_flaky': 'isFlaky', # noqa: E501 + 'must_be_approved': 'mustBeApproved', # noqa: E501 + 'stability_percentage': 'stabilityPercentage', # noqa: E501 + 'created_date': 'createdDate', # noqa: E501 + 'created_by_ids': 'createdByIds', # noqa: E501 + 'modified_date': 'modifiedDate', # noqa: E501 + 'modified_by_ids': 'modifiedByIds', # noqa: E501 + 'is_deleted': 'isDeleted', # noqa: E501 + 'namespace': 'namespace', # noqa: E501 + 'is_empty_namespace': 'isEmptyNamespace', # noqa: E501 + 'class_name': 'className', # noqa: E501 + 'is_empty_class_name': 'isEmptyClassName', # noqa: E501 + 'last_test_result_outcome': 'lastTestResultOutcome', # noqa: E501 + 'external_key': 'externalKey', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AutotestSelectModelFilter - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + project_ids ([str], none_type): Specifies an autotest projects IDs to search for. [optional] # noqa: E501 + external_ids ([str], none_type): Specifies an autotest external IDs to search for. [optional] # noqa: E501 + global_ids ([int], none_type): Specifies an autotest global IDs to search for. [optional] # noqa: E501 + name (str, none_type): Specifies an autotest name to search for. [optional] # noqa: E501 + is_flaky (bool, none_type): Specifies an autotest flaky status to search for. [optional] # noqa: E501 + must_be_approved (bool, none_type): Specifies an autotest unapproved changes status to search for. [optional] # noqa: E501 + stability_percentage (AutotestFilterModelStabilityPercentage): [optional] # noqa: E501 + created_date (AutotestFilterModelCreatedDate): [optional] # noqa: E501 + created_by_ids ([str], none_type): Specifies an autotest creator IDs to search for. [optional] # noqa: E501 + modified_date (AutotestFilterModelModifiedDate): [optional] # noqa: E501 + modified_by_ids ([str], none_type): Specifies an autotest last editor IDs to search for. [optional] # noqa: E501 + is_deleted (bool, none_type): Specifies an autotest deleted status to search for. [optional] # noqa: E501 + namespace (str, none_type): Specifies an autotest namespace to search for. [optional] # noqa: E501 + is_empty_namespace (bool, none_type): Specifies an autotest namespace name presence status to search for. [optional] # noqa: E501 + class_name (str, none_type): Specifies an autotest class name to search for. [optional] # noqa: E501 + is_empty_class_name (bool, none_type): Specifies an autotest class name presence status to search for. [optional] # noqa: E501 + last_test_result_outcome (AutotestResultOutcome): [optional] # noqa: E501 + external_key (str, none_type): Specifies an autotest external key to search for. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AutotestSelectModelFilter - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + project_ids ([str], none_type): Specifies an autotest projects IDs to search for. [optional] # noqa: E501 + external_ids ([str], none_type): Specifies an autotest external IDs to search for. [optional] # noqa: E501 + global_ids ([int], none_type): Specifies an autotest global IDs to search for. [optional] # noqa: E501 + name (str, none_type): Specifies an autotest name to search for. [optional] # noqa: E501 + is_flaky (bool, none_type): Specifies an autotest flaky status to search for. [optional] # noqa: E501 + must_be_approved (bool, none_type): Specifies an autotest unapproved changes status to search for. [optional] # noqa: E501 + stability_percentage (AutotestFilterModelStabilityPercentage): [optional] # noqa: E501 + created_date (AutotestFilterModelCreatedDate): [optional] # noqa: E501 + created_by_ids ([str], none_type): Specifies an autotest creator IDs to search for. [optional] # noqa: E501 + modified_date (AutotestFilterModelModifiedDate): [optional] # noqa: E501 + modified_by_ids ([str], none_type): Specifies an autotest last editor IDs to search for. [optional] # noqa: E501 + is_deleted (bool, none_type): Specifies an autotest deleted status to search for. [optional] # noqa: E501 + namespace (str, none_type): Specifies an autotest namespace to search for. [optional] # noqa: E501 + is_empty_namespace (bool, none_type): Specifies an autotest namespace name presence status to search for. [optional] # noqa: E501 + class_name (str, none_type): Specifies an autotest class name to search for. [optional] # noqa: E501 + is_empty_class_name (bool, none_type): Specifies an autotest class name presence status to search for. [optional] # noqa: E501 + last_test_result_outcome (AutotestResultOutcome): [optional] # noqa: E501 + external_key (str, none_type): Specifies an autotest external key to search for. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + AutotestFilterModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/filter_model_data.py b/src/testit_api_client/model/filter_model_data.py new file mode 100644 index 0000000..527e116 --- /dev/null +++ b/src/testit_api_client/model/filter_model_data.py @@ -0,0 +1,431 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.test_point_filter_model_work_item_created_date import TestPointFilterModelWorkItemCreatedDate + from testit_api_client.model.test_point_filter_model_work_item_modified_date import TestPointFilterModelWorkItemModifiedDate + from testit_api_client.model.test_suite_work_items_search_model_duration import TestSuiteWorkItemsSearchModelDuration + from testit_api_client.model.test_suite_work_items_search_model_median_duration import TestSuiteWorkItemsSearchModelMedianDuration + from testit_api_client.model.work_item_entity_types import WorkItemEntityTypes + from testit_api_client.model.work_item_priority_model import WorkItemPriorityModel + from testit_api_client.model.work_item_search_query_model import WorkItemSearchQueryModel + from testit_api_client.model.work_item_states import WorkItemStates + globals()['TestPointFilterModelWorkItemCreatedDate'] = TestPointFilterModelWorkItemCreatedDate + globals()['TestPointFilterModelWorkItemModifiedDate'] = TestPointFilterModelWorkItemModifiedDate + globals()['TestSuiteWorkItemsSearchModelDuration'] = TestSuiteWorkItemsSearchModelDuration + globals()['TestSuiteWorkItemsSearchModelMedianDuration'] = TestSuiteWorkItemsSearchModelMedianDuration + globals()['WorkItemEntityTypes'] = WorkItemEntityTypes + globals()['WorkItemPriorityModel'] = WorkItemPriorityModel + globals()['WorkItemSearchQueryModel'] = WorkItemSearchQueryModel + globals()['WorkItemStates'] = WorkItemStates + + +class FilterModelData(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('project_ids',): { + }, + ('name',): { + 'max_length': 255, + 'min_length': 0, + }, + ('ids',): { + }, + ('global_ids',): { + }, + ('section_ids',): { + }, + ('created_by_ids',): { + }, + ('modified_by_ids',): { + }, + ('states',): { + }, + ('priorities',): { + }, + ('types',): { + }, + ('tags',): { + }, + ('auto_test_ids',): { + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'project_ids': ([str], none_type,), # noqa: E501 + 'name': (str, none_type,), # noqa: E501 + 'ids': ([str], none_type,), # noqa: E501 + 'global_ids': ([int], none_type,), # noqa: E501 + 'attributes': ({str: ([str], none_type)}, none_type,), # noqa: E501 + 'is_deleted': (bool, none_type,), # noqa: E501 + 'section_ids': ([str], none_type,), # noqa: E501 + 'created_by_ids': ([str], none_type,), # noqa: E501 + 'modified_by_ids': ([str], none_type,), # noqa: E501 + 'states': ([WorkItemStates], none_type,), # noqa: E501 + 'priorities': ([WorkItemPriorityModel], none_type,), # noqa: E501 + 'types': ([WorkItemEntityTypes], none_type,), # noqa: E501 + 'created_date': (TestPointFilterModelWorkItemCreatedDate,), # noqa: E501 + 'modified_date': (TestPointFilterModelWorkItemModifiedDate,), # noqa: E501 + 'duration': (TestSuiteWorkItemsSearchModelDuration,), # noqa: E501 + 'median_duration': (TestSuiteWorkItemsSearchModelMedianDuration,), # noqa: E501 + 'is_automated': (bool, none_type,), # noqa: E501 + 'tags': ([str], none_type,), # noqa: E501 + 'auto_test_ids': ([str], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'project_ids': 'projectIds', # noqa: E501 + 'name': 'name', # noqa: E501 + 'ids': 'ids', # noqa: E501 + 'global_ids': 'globalIds', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'is_deleted': 'isDeleted', # noqa: E501 + 'section_ids': 'sectionIds', # noqa: E501 + 'created_by_ids': 'createdByIds', # noqa: E501 + 'modified_by_ids': 'modifiedByIds', # noqa: E501 + 'states': 'states', # noqa: E501 + 'priorities': 'priorities', # noqa: E501 + 'types': 'types', # noqa: E501 + 'created_date': 'createdDate', # noqa: E501 + 'modified_date': 'modifiedDate', # noqa: E501 + 'duration': 'duration', # noqa: E501 + 'median_duration': 'medianDuration', # noqa: E501 + 'is_automated': 'isAutomated', # noqa: E501 + 'tags': 'tags', # noqa: E501 + 'auto_test_ids': 'autoTestIds', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FilterModelData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + project_ids ([str], none_type): Collection of project identifiers. [optional] # noqa: E501 + name (str, none_type): Name of work item. [optional] # noqa: E501 + ids ([str], none_type): Specifies a work item unique IDs to search for. [optional] # noqa: E501 + global_ids ([int], none_type): Collection of global (integer) identifiers. [optional] # noqa: E501 + attributes ({str: ([str], none_type)}, none_type): Custom attributes of work item. [optional] # noqa: E501 + is_deleted (bool, none_type): Is result must consist of only actual/deleted work items. [optional] # noqa: E501 + section_ids ([str], none_type): Collection of section identifiers. [optional] # noqa: E501 + created_by_ids ([str], none_type): Collection of identifiers of users who created work item. [optional] # noqa: E501 + modified_by_ids ([str], none_type): Collection of identifiers of users who applied last modification to work item. [optional] # noqa: E501 + states ([WorkItemStates], none_type): Collection of states of work item. [optional] # noqa: E501 + priorities ([WorkItemPriorityModel], none_type): Collection of priorities of work item. [optional] # noqa: E501 + types ([WorkItemEntityTypes], none_type): Collection of types of work item. [optional] # noqa: E501 + created_date (TestPointFilterModelWorkItemCreatedDate): [optional] # noqa: E501 + modified_date (TestPointFilterModelWorkItemModifiedDate): [optional] # noqa: E501 + duration (TestSuiteWorkItemsSearchModelDuration): [optional] # noqa: E501 + median_duration (TestSuiteWorkItemsSearchModelMedianDuration): [optional] # noqa: E501 + is_automated (bool, none_type): Is result must consist of only manual/automated work items. [optional] # noqa: E501 + tags ([str], none_type): Collection of tags. [optional] # noqa: E501 + auto_test_ids ([str], none_type): Collection of identifiers of linked autotests. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """FilterModelData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + project_ids ([str], none_type): Collection of project identifiers. [optional] # noqa: E501 + name (str, none_type): Name of work item. [optional] # noqa: E501 + ids ([str], none_type): Specifies a work item unique IDs to search for. [optional] # noqa: E501 + global_ids ([int], none_type): Collection of global (integer) identifiers. [optional] # noqa: E501 + attributes ({str: ([str], none_type)}, none_type): Custom attributes of work item. [optional] # noqa: E501 + is_deleted (bool, none_type): Is result must consist of only actual/deleted work items. [optional] # noqa: E501 + section_ids ([str], none_type): Collection of section identifiers. [optional] # noqa: E501 + created_by_ids ([str], none_type): Collection of identifiers of users who created work item. [optional] # noqa: E501 + modified_by_ids ([str], none_type): Collection of identifiers of users who applied last modification to work item. [optional] # noqa: E501 + states ([WorkItemStates], none_type): Collection of states of work item. [optional] # noqa: E501 + priorities ([WorkItemPriorityModel], none_type): Collection of priorities of work item. [optional] # noqa: E501 + types ([WorkItemEntityTypes], none_type): Collection of types of work item. [optional] # noqa: E501 + created_date (TestPointFilterModelWorkItemCreatedDate): [optional] # noqa: E501 + modified_date (TestPointFilterModelWorkItemModifiedDate): [optional] # noqa: E501 + duration (TestSuiteWorkItemsSearchModelDuration): [optional] # noqa: E501 + median_duration (TestSuiteWorkItemsSearchModelMedianDuration): [optional] # noqa: E501 + is_automated (bool, none_type): Is result must consist of only manual/automated work items. [optional] # noqa: E501 + tags ([str], none_type): Collection of tags. [optional] # noqa: E501 + auto_test_ids ([str], none_type): Collection of identifiers of linked autotests. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + WorkItemSearchQueryModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/flaky_bulk_model_autotest_select.py b/src/testit_api_client/model/flaky_bulk_model_autotest_select.py new file mode 100644 index 0000000..e056e64 --- /dev/null +++ b/src/testit_api_client/model/flaky_bulk_model_autotest_select.py @@ -0,0 +1,327 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.autotest_select_model import AutotestSelectModel + from testit_api_client.model.autotest_select_model_extraction_model import AutotestSelectModelExtractionModel + from testit_api_client.model.autotest_select_model_filter import AutotestSelectModelFilter + globals()['AutotestSelectModel'] = AutotestSelectModel + globals()['AutotestSelectModelExtractionModel'] = AutotestSelectModelExtractionModel + globals()['AutotestSelectModelFilter'] = AutotestSelectModelFilter + + +class FlakyBulkModelAutotestSelect(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'filter': (AutotestSelectModelFilter,), # noqa: E501 + 'extraction_model': (AutotestSelectModelExtractionModel,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'filter': 'filter', # noqa: E501 + 'extraction_model': 'extractionModel', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FlakyBulkModelAutotestSelect - a model defined in OpenAPI + + Keyword Args: + filter (AutotestSelectModelFilter): + extraction_model (AutotestSelectModelExtractionModel): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """FlakyBulkModelAutotestSelect - a model defined in OpenAPI + + Keyword Args: + filter (AutotestSelectModelFilter): + extraction_model (AutotestSelectModelExtractionModel): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + AutotestSelectModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/test_plan_change_model_test_plan_changed_fields.py b/src/testit_api_client/model/test_plan_change_model_test_plan_changed_fields.py new file mode 100644 index 0000000..1c45152 --- /dev/null +++ b/src/testit_api_client/model/test_plan_change_model_test_plan_changed_fields.py @@ -0,0 +1,387 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.boolean_changed_field_view_model import BooleanChangedFieldViewModel + from testit_api_client.model.boolean_nullable_changed_field_view_model import BooleanNullableChangedFieldViewModel + from testit_api_client.model.custom_attribute_change_model import CustomAttributeChangeModel + from testit_api_client.model.period_view_model_changed_field_view_model import PeriodViewModelChangedFieldViewModel + from testit_api_client.model.string_array_changed_field_view_model import StringArrayChangedFieldViewModel + from testit_api_client.model.string_changed_field_view_model import StringChangedFieldViewModel + from testit_api_client.model.string_changed_field_with_diffs_view_model import StringChangedFieldWithDiffsViewModel + from testit_api_client.model.test_plan_changed_fields_view_model import TestPlanChangedFieldsViewModel + from testit_api_client.model.test_point_change_view_model_changed_field_view_model import TestPointChangeViewModelChangedFieldViewModel + from testit_api_client.model.test_result_change_view_model_changed_field_view_model import TestResultChangeViewModelChangedFieldViewModel + from testit_api_client.model.test_suite_change_view_model_changed_field_view_model import TestSuiteChangeViewModelChangedFieldViewModel + globals()['BooleanChangedFieldViewModel'] = BooleanChangedFieldViewModel + globals()['BooleanNullableChangedFieldViewModel'] = BooleanNullableChangedFieldViewModel + globals()['CustomAttributeChangeModel'] = CustomAttributeChangeModel + globals()['PeriodViewModelChangedFieldViewModel'] = PeriodViewModelChangedFieldViewModel + globals()['StringArrayChangedFieldViewModel'] = StringArrayChangedFieldViewModel + globals()['StringChangedFieldViewModel'] = StringChangedFieldViewModel + globals()['StringChangedFieldWithDiffsViewModel'] = StringChangedFieldWithDiffsViewModel + globals()['TestPlanChangedFieldsViewModel'] = TestPlanChangedFieldsViewModel + globals()['TestPointChangeViewModelChangedFieldViewModel'] = TestPointChangeViewModelChangedFieldViewModel + globals()['TestResultChangeViewModelChangedFieldViewModel'] = TestResultChangeViewModelChangedFieldViewModel + globals()['TestSuiteChangeViewModelChangedFieldViewModel'] = TestSuiteChangeViewModelChangedFieldViewModel + + +class TestPlanChangeModelTestPlanChangedFields(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (StringChangedFieldWithDiffsViewModel,), # noqa: E501 + 'description': (StringChangedFieldWithDiffsViewModel,), # noqa: E501 + 'product_name': (StringChangedFieldViewModel,), # noqa: E501 + 'build': (StringChangedFieldViewModel,), # noqa: E501 + 'period': (PeriodViewModelChangedFieldViewModel,), # noqa: E501 + 'status': (StringChangedFieldViewModel,), # noqa: E501 + 'tags': (StringArrayChangedFieldViewModel,), # noqa: E501 + 'test_suite': (TestSuiteChangeViewModelChangedFieldViewModel,), # noqa: E501 + 'test_points': (TestPointChangeViewModelChangedFieldViewModel,), # noqa: E501 + 'test_results': (TestResultChangeViewModelChangedFieldViewModel,), # noqa: E501 + 'locking': (BooleanChangedFieldViewModel,), # noqa: E501 + 'has_automatic_duration_timer': (BooleanNullableChangedFieldViewModel,), # noqa: E501 + 'attributes': ({str: (CustomAttributeChangeModel,)}, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'description': 'description', # noqa: E501 + 'product_name': 'productName', # noqa: E501 + 'build': 'build', # noqa: E501 + 'period': 'period', # noqa: E501 + 'status': 'status', # noqa: E501 + 'tags': 'tags', # noqa: E501 + 'test_suite': 'testSuite', # noqa: E501 + 'test_points': 'testPoints', # noqa: E501 + 'test_results': 'testResults', # noqa: E501 + 'locking': 'locking', # noqa: E501 + 'has_automatic_duration_timer': 'hasAutomaticDurationTimer', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TestPlanChangeModelTestPlanChangedFields - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (StringChangedFieldWithDiffsViewModel): [optional] # noqa: E501 + description (StringChangedFieldWithDiffsViewModel): [optional] # noqa: E501 + product_name (StringChangedFieldViewModel): [optional] # noqa: E501 + build (StringChangedFieldViewModel): [optional] # noqa: E501 + period (PeriodViewModelChangedFieldViewModel): [optional] # noqa: E501 + status (StringChangedFieldViewModel): [optional] # noqa: E501 + tags (StringArrayChangedFieldViewModel): [optional] # noqa: E501 + test_suite (TestSuiteChangeViewModelChangedFieldViewModel): [optional] # noqa: E501 + test_points (TestPointChangeViewModelChangedFieldViewModel): [optional] # noqa: E501 + test_results (TestResultChangeViewModelChangedFieldViewModel): [optional] # noqa: E501 + locking (BooleanChangedFieldViewModel): [optional] # noqa: E501 + has_automatic_duration_timer (BooleanNullableChangedFieldViewModel): [optional] # noqa: E501 + attributes ({str: (CustomAttributeChangeModel,)}, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TestPlanChangeModelTestPlanChangedFields - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (StringChangedFieldWithDiffsViewModel): [optional] # noqa: E501 + description (StringChangedFieldWithDiffsViewModel): [optional] # noqa: E501 + product_name (StringChangedFieldViewModel): [optional] # noqa: E501 + build (StringChangedFieldViewModel): [optional] # noqa: E501 + period (PeriodViewModelChangedFieldViewModel): [optional] # noqa: E501 + status (StringChangedFieldViewModel): [optional] # noqa: E501 + tags (StringArrayChangedFieldViewModel): [optional] # noqa: E501 + test_suite (TestSuiteChangeViewModelChangedFieldViewModel): [optional] # noqa: E501 + test_points (TestPointChangeViewModelChangedFieldViewModel): [optional] # noqa: E501 + test_results (TestResultChangeViewModelChangedFieldViewModel): [optional] # noqa: E501 + locking (BooleanChangedFieldViewModel): [optional] # noqa: E501 + has_automatic_duration_timer (BooleanNullableChangedFieldViewModel): [optional] # noqa: E501 + attributes ({str: (CustomAttributeChangeModel,)}, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + TestPlanChangedFieldsViewModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/test_plan_with_analytic_model_analytic.py b/src/testit_api_client/model/test_plan_with_analytic_model_analytic.py new file mode 100644 index 0000000..526c893 --- /dev/null +++ b/src/testit_api_client/model/test_plan_with_analytic_model_analytic.py @@ -0,0 +1,343 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.test_plan_group_by_status import TestPlanGroupByStatus + from testit_api_client.model.test_plan_group_by_test_suite import TestPlanGroupByTestSuite + from testit_api_client.model.test_plan_group_by_tester import TestPlanGroupByTester + from testit_api_client.model.test_plan_group_by_tester_and_status import TestPlanGroupByTesterAndStatus + from testit_api_client.model.test_point_analytic_result import TestPointAnalyticResult + globals()['TestPlanGroupByStatus'] = TestPlanGroupByStatus + globals()['TestPlanGroupByTestSuite'] = TestPlanGroupByTestSuite + globals()['TestPlanGroupByTester'] = TestPlanGroupByTester + globals()['TestPlanGroupByTesterAndStatus'] = TestPlanGroupByTesterAndStatus + globals()['TestPointAnalyticResult'] = TestPointAnalyticResult + + +class TestPlanWithAnalyticModelAnalytic(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'count_group_by_status': ([TestPlanGroupByStatus],), # noqa: E501 + 'sum_group_by_tester': ([TestPlanGroupByTester],), # noqa: E501 + 'count_group_by_tester': ([TestPlanGroupByTester],), # noqa: E501 + 'count_group_by_test_suite': ([TestPlanGroupByTestSuite],), # noqa: E501 + 'count_group_by_tester_and_status': ([TestPlanGroupByTesterAndStatus],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'count_group_by_status': 'countGroupByStatus', # noqa: E501 + 'sum_group_by_tester': 'sumGroupByTester', # noqa: E501 + 'count_group_by_tester': 'countGroupByTester', # noqa: E501 + 'count_group_by_test_suite': 'countGroupByTestSuite', # noqa: E501 + 'count_group_by_tester_and_status': 'countGroupByTesterAndStatus', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TestPlanWithAnalyticModelAnalytic - a model defined in OpenAPI + + Keyword Args: + count_group_by_status ([TestPlanGroupByStatus]): + sum_group_by_tester ([TestPlanGroupByTester]): + count_group_by_tester ([TestPlanGroupByTester]): + count_group_by_test_suite ([TestPlanGroupByTestSuite]): + count_group_by_tester_and_status ([TestPlanGroupByTesterAndStatus]): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TestPlanWithAnalyticModelAnalytic - a model defined in OpenAPI + + Keyword Args: + count_group_by_status ([TestPlanGroupByStatus]): + sum_group_by_tester ([TestPlanGroupByTester]): + count_group_by_tester ([TestPlanGroupByTester]): + count_group_by_test_suite ([TestPlanGroupByTestSuite]): + count_group_by_tester_and_status ([TestPlanGroupByTesterAndStatus]): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + TestPointAnalyticResult, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/test_run_model_analytic.py b/src/testit_api_client/model/test_run_model_analytic.py new file mode 100644 index 0000000..866179f --- /dev/null +++ b/src/testit_api_client/model/test_run_model_analytic.py @@ -0,0 +1,327 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.test_run_analytic_result_model import TestRunAnalyticResultModel + from testit_api_client.model.test_run_group_by_failure_class_model import TestRunGroupByFailureClassModel + from testit_api_client.model.test_run_group_by_status_model import TestRunGroupByStatusModel + globals()['TestRunAnalyticResultModel'] = TestRunAnalyticResultModel + globals()['TestRunGroupByFailureClassModel'] = TestRunGroupByFailureClassModel + globals()['TestRunGroupByStatusModel'] = TestRunGroupByStatusModel + + +class TestRunModelAnalytic(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'count_group_by_status': ([TestRunGroupByStatusModel], none_type,), # noqa: E501 + 'count_group_by_failure_class': ([TestRunGroupByFailureClassModel], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'count_group_by_status': 'countGroupByStatus', # noqa: E501 + 'count_group_by_failure_class': 'countGroupByFailureClass', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TestRunModelAnalytic - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + count_group_by_status ([TestRunGroupByStatusModel], none_type): [optional] # noqa: E501 + count_group_by_failure_class ([TestRunGroupByFailureClassModel], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TestRunModelAnalytic - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + count_group_by_status ([TestRunGroupByStatusModel], none_type): [optional] # noqa: E501 + count_group_by_failure_class ([TestRunGroupByFailureClassModel], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + TestRunAnalyticResultModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/user_with_rank_model_user_rank.py b/src/testit_api_client/model/user_with_rank_model_user_rank.py new file mode 100644 index 0000000..26cd612 --- /dev/null +++ b/src/testit_api_client/model/user_with_rank_model_user_rank.py @@ -0,0 +1,339 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.user_rank_model import UserRankModel + globals()['UserRankModel'] = UserRankModel + + +class UserWithRankModelUserRank(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'score': (int,), # noqa: E501 + 'work_items_created': (int,), # noqa: E501 + 'passed_test_points': (int,), # noqa: E501 + 'failed_test_points': (int,), # noqa: E501 + 'skipped_test_points': (int,), # noqa: E501 + 'blocked_test_points': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'score': 'score', # noqa: E501 + 'work_items_created': 'workItemsCreated', # noqa: E501 + 'passed_test_points': 'passedTestPoints', # noqa: E501 + 'failed_test_points': 'failedTestPoints', # noqa: E501 + 'skipped_test_points': 'skippedTestPoints', # noqa: E501 + 'blocked_test_points': 'blockedTestPoints', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UserWithRankModelUserRank - a model defined in OpenAPI + + Keyword Args: + score (int): + work_items_created (int): + passed_test_points (int): + failed_test_points (int): + skipped_test_points (int): + blocked_test_points (int): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UserWithRankModelUserRank - a model defined in OpenAPI + + Keyword Args: + score (int): + work_items_created (int): + passed_test_points (int): + failed_test_points (int): + skipped_test_points (int): + blocked_test_points (int): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + UserRankModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/work_item_change_model_work_item_changed_fields.py b/src/testit_api_client/model/work_item_change_model_work_item_changed_fields.py new file mode 100644 index 0000000..841a4d9 --- /dev/null +++ b/src/testit_api_client/model/work_item_change_model_work_item_changed_fields.py @@ -0,0 +1,419 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.string_changed_field_with_diffs_view_model import StringChangedFieldWithDiffsViewModel + from testit_api_client.model.work_item_changed_attribute_view_model import WorkItemChangedAttributeViewModel + from testit_api_client.model.work_item_changed_fields_view_model import WorkItemChangedFieldsViewModel + from testit_api_client.model.work_item_changed_fields_view_model_attachments import WorkItemChangedFieldsViewModelAttachments + from testit_api_client.model.work_item_changed_fields_view_model_auto_tests import WorkItemChangedFieldsViewModelAutoTests + from testit_api_client.model.work_item_changed_fields_view_model_duration import WorkItemChangedFieldsViewModelDuration + from testit_api_client.model.work_item_changed_fields_view_model_global_id import WorkItemChangedFieldsViewModelGlobalId + from testit_api_client.model.work_item_changed_fields_view_model_is_deleted import WorkItemChangedFieldsViewModelIsDeleted + from testit_api_client.model.work_item_changed_fields_view_model_links import WorkItemChangedFieldsViewModelLinks + from testit_api_client.model.work_item_changed_fields_view_model_project_id import WorkItemChangedFieldsViewModelProjectId + from testit_api_client.model.work_item_changed_fields_view_model_state import WorkItemChangedFieldsViewModelState + from testit_api_client.model.work_item_changed_fields_view_model_steps import WorkItemChangedFieldsViewModelSteps + from testit_api_client.model.work_item_changed_fields_view_model_tags import WorkItemChangedFieldsViewModelTags + globals()['StringChangedFieldWithDiffsViewModel'] = StringChangedFieldWithDiffsViewModel + globals()['WorkItemChangedAttributeViewModel'] = WorkItemChangedAttributeViewModel + globals()['WorkItemChangedFieldsViewModel'] = WorkItemChangedFieldsViewModel + globals()['WorkItemChangedFieldsViewModelAttachments'] = WorkItemChangedFieldsViewModelAttachments + globals()['WorkItemChangedFieldsViewModelAutoTests'] = WorkItemChangedFieldsViewModelAutoTests + globals()['WorkItemChangedFieldsViewModelDuration'] = WorkItemChangedFieldsViewModelDuration + globals()['WorkItemChangedFieldsViewModelGlobalId'] = WorkItemChangedFieldsViewModelGlobalId + globals()['WorkItemChangedFieldsViewModelIsDeleted'] = WorkItemChangedFieldsViewModelIsDeleted + globals()['WorkItemChangedFieldsViewModelLinks'] = WorkItemChangedFieldsViewModelLinks + globals()['WorkItemChangedFieldsViewModelProjectId'] = WorkItemChangedFieldsViewModelProjectId + globals()['WorkItemChangedFieldsViewModelState'] = WorkItemChangedFieldsViewModelState + globals()['WorkItemChangedFieldsViewModelSteps'] = WorkItemChangedFieldsViewModelSteps + globals()['WorkItemChangedFieldsViewModelTags'] = WorkItemChangedFieldsViewModelTags + + +class WorkItemChangeModelWorkItemChangedFields(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'is_deleted': (WorkItemChangedFieldsViewModelIsDeleted,), # noqa: E501 + 'project_id': (WorkItemChangedFieldsViewModelProjectId,), # noqa: E501 + 'is_automated': (WorkItemChangedFieldsViewModelIsDeleted,), # noqa: E501 + 'section_id': (WorkItemChangedFieldsViewModelProjectId,), # noqa: E501 + 'state': (WorkItemChangedFieldsViewModelState,), # noqa: E501 + 'priority': (WorkItemChangedFieldsViewModelState,), # noqa: E501 + 'duration': (WorkItemChangedFieldsViewModelDuration,), # noqa: E501 + 'attributes': ({str: (WorkItemChangedAttributeViewModel,)},), # noqa: E501 + 'steps': (WorkItemChangedFieldsViewModelSteps,), # noqa: E501 + 'precondition_steps': (WorkItemChangedFieldsViewModelSteps,), # noqa: E501 + 'postcondition_steps': (WorkItemChangedFieldsViewModelSteps,), # noqa: E501 + 'auto_tests': (WorkItemChangedFieldsViewModelAutoTests,), # noqa: E501 + 'attachments': (WorkItemChangedFieldsViewModelAttachments,), # noqa: E501 + 'tags': (WorkItemChangedFieldsViewModelTags,), # noqa: E501 + 'links': (WorkItemChangedFieldsViewModelLinks,), # noqa: E501 + 'global_id': (WorkItemChangedFieldsViewModelGlobalId,), # noqa: E501 + 'version_number': (WorkItemChangedFieldsViewModelDuration,), # noqa: E501 + 'entity_type_name': (WorkItemChangedFieldsViewModelState,), # noqa: E501 + 'name': (StringChangedFieldWithDiffsViewModel,), # noqa: E501 + 'description': (StringChangedFieldWithDiffsViewModel,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'is_deleted': 'isDeleted', # noqa: E501 + 'project_id': 'projectId', # noqa: E501 + 'is_automated': 'isAutomated', # noqa: E501 + 'section_id': 'sectionId', # noqa: E501 + 'state': 'state', # noqa: E501 + 'priority': 'priority', # noqa: E501 + 'duration': 'duration', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'steps': 'steps', # noqa: E501 + 'precondition_steps': 'preconditionSteps', # noqa: E501 + 'postcondition_steps': 'postconditionSteps', # noqa: E501 + 'auto_tests': 'autoTests', # noqa: E501 + 'attachments': 'attachments', # noqa: E501 + 'tags': 'tags', # noqa: E501 + 'links': 'links', # noqa: E501 + 'global_id': 'globalId', # noqa: E501 + 'version_number': 'versionNumber', # noqa: E501 + 'entity_type_name': 'entityTypeName', # noqa: E501 + 'name': 'name', # noqa: E501 + 'description': 'description', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemChangeModelWorkItemChangedFields - a model defined in OpenAPI + + Keyword Args: + is_deleted (WorkItemChangedFieldsViewModelIsDeleted): + project_id (WorkItemChangedFieldsViewModelProjectId): + is_automated (WorkItemChangedFieldsViewModelIsDeleted): + section_id (WorkItemChangedFieldsViewModelProjectId): + state (WorkItemChangedFieldsViewModelState): + priority (WorkItemChangedFieldsViewModelState): + duration (WorkItemChangedFieldsViewModelDuration): + attributes ({str: (WorkItemChangedAttributeViewModel,)}): + steps (WorkItemChangedFieldsViewModelSteps): + precondition_steps (WorkItemChangedFieldsViewModelSteps): + postcondition_steps (WorkItemChangedFieldsViewModelSteps): + auto_tests (WorkItemChangedFieldsViewModelAutoTests): + attachments (WorkItemChangedFieldsViewModelAttachments): + tags (WorkItemChangedFieldsViewModelTags): + links (WorkItemChangedFieldsViewModelLinks): + global_id (WorkItemChangedFieldsViewModelGlobalId): + version_number (WorkItemChangedFieldsViewModelDuration): + entity_type_name (WorkItemChangedFieldsViewModelState): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (StringChangedFieldWithDiffsViewModel): [optional] # noqa: E501 + description (StringChangedFieldWithDiffsViewModel): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemChangeModelWorkItemChangedFields - a model defined in OpenAPI + + Keyword Args: + is_deleted (WorkItemChangedFieldsViewModelIsDeleted): + project_id (WorkItemChangedFieldsViewModelProjectId): + is_automated (WorkItemChangedFieldsViewModelIsDeleted): + section_id (WorkItemChangedFieldsViewModelProjectId): + state (WorkItemChangedFieldsViewModelState): + priority (WorkItemChangedFieldsViewModelState): + duration (WorkItemChangedFieldsViewModelDuration): + attributes ({str: (WorkItemChangedAttributeViewModel,)}): + steps (WorkItemChangedFieldsViewModelSteps): + precondition_steps (WorkItemChangedFieldsViewModelSteps): + postcondition_steps (WorkItemChangedFieldsViewModelSteps): + auto_tests (WorkItemChangedFieldsViewModelAutoTests): + attachments (WorkItemChangedFieldsViewModelAttachments): + tags (WorkItemChangedFieldsViewModelTags): + links (WorkItemChangedFieldsViewModelLinks): + global_id (WorkItemChangedFieldsViewModelGlobalId): + version_number (WorkItemChangedFieldsViewModelDuration): + entity_type_name (WorkItemChangedFieldsViewModelState): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (StringChangedFieldWithDiffsViewModel): [optional] # noqa: E501 + description (StringChangedFieldWithDiffsViewModel): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + WorkItemChangedFieldsViewModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/work_item_changed_fields_view_model_attachments.py b/src/testit_api_client/model/work_item_changed_fields_view_model_attachments.py new file mode 100644 index 0000000..62003f3 --- /dev/null +++ b/src/testit_api_client/model/work_item_changed_fields_view_model_attachments.py @@ -0,0 +1,325 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.attachment_change_view_model import AttachmentChangeViewModel + from testit_api_client.model.attachment_change_view_model_array_changed_field_view_model import AttachmentChangeViewModelArrayChangedFieldViewModel + globals()['AttachmentChangeViewModel'] = AttachmentChangeViewModel + globals()['AttachmentChangeViewModelArrayChangedFieldViewModel'] = AttachmentChangeViewModelArrayChangedFieldViewModel + + +class WorkItemChangedFieldsViewModelAttachments(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'old_value': ([AttachmentChangeViewModel], none_type,), # noqa: E501 + 'new_value': ([AttachmentChangeViewModel], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'old_value': 'oldValue', # noqa: E501 + 'new_value': 'newValue', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelAttachments - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + old_value ([AttachmentChangeViewModel], none_type): [optional] # noqa: E501 + new_value ([AttachmentChangeViewModel], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelAttachments - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + old_value ([AttachmentChangeViewModel], none_type): [optional] # noqa: E501 + new_value ([AttachmentChangeViewModel], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + AttachmentChangeViewModelArrayChangedFieldViewModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/work_item_changed_fields_view_model_auto_tests.py b/src/testit_api_client/model/work_item_changed_fields_view_model_auto_tests.py new file mode 100644 index 0000000..287df8d --- /dev/null +++ b/src/testit_api_client/model/work_item_changed_fields_view_model_auto_tests.py @@ -0,0 +1,325 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.auto_test_change_view_model import AutoTestChangeViewModel + from testit_api_client.model.auto_test_change_view_model_array_changed_field_view_model import AutoTestChangeViewModelArrayChangedFieldViewModel + globals()['AutoTestChangeViewModel'] = AutoTestChangeViewModel + globals()['AutoTestChangeViewModelArrayChangedFieldViewModel'] = AutoTestChangeViewModelArrayChangedFieldViewModel + + +class WorkItemChangedFieldsViewModelAutoTests(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'old_value': ([AutoTestChangeViewModel], none_type,), # noqa: E501 + 'new_value': ([AutoTestChangeViewModel], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'old_value': 'oldValue', # noqa: E501 + 'new_value': 'newValue', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelAutoTests - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + old_value ([AutoTestChangeViewModel], none_type): [optional] # noqa: E501 + new_value ([AutoTestChangeViewModel], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelAutoTests - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + old_value ([AutoTestChangeViewModel], none_type): [optional] # noqa: E501 + new_value ([AutoTestChangeViewModel], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + AutoTestChangeViewModelArrayChangedFieldViewModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/work_item_changed_fields_view_model_duration.py b/src/testit_api_client/model/work_item_changed_fields_view_model_duration.py new file mode 100644 index 0000000..2d0dbda --- /dev/null +++ b/src/testit_api_client/model/work_item_changed_fields_view_model_duration.py @@ -0,0 +1,323 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.int32_changed_field_view_model import Int32ChangedFieldViewModel + globals()['Int32ChangedFieldViewModel'] = Int32ChangedFieldViewModel + + +class WorkItemChangedFieldsViewModelDuration(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'old_value': (int,), # noqa: E501 + 'new_value': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'old_value': 'oldValue', # noqa: E501 + 'new_value': 'newValue', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelDuration - a model defined in OpenAPI + + Keyword Args: + old_value (int): + new_value (int): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelDuration - a model defined in OpenAPI + + Keyword Args: + old_value (int): + new_value (int): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Int32ChangedFieldViewModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/work_item_changed_fields_view_model_global_id.py b/src/testit_api_client/model/work_item_changed_fields_view_model_global_id.py new file mode 100644 index 0000000..4767710 --- /dev/null +++ b/src/testit_api_client/model/work_item_changed_fields_view_model_global_id.py @@ -0,0 +1,323 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.int64_changed_field_view_model import Int64ChangedFieldViewModel + globals()['Int64ChangedFieldViewModel'] = Int64ChangedFieldViewModel + + +class WorkItemChangedFieldsViewModelGlobalId(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'old_value': (int,), # noqa: E501 + 'new_value': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'old_value': 'oldValue', # noqa: E501 + 'new_value': 'newValue', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelGlobalId - a model defined in OpenAPI + + Keyword Args: + old_value (int): + new_value (int): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelGlobalId - a model defined in OpenAPI + + Keyword Args: + old_value (int): + new_value (int): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Int64ChangedFieldViewModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/work_item_changed_fields_view_model_is_deleted.py b/src/testit_api_client/model/work_item_changed_fields_view_model_is_deleted.py new file mode 100644 index 0000000..a636343 --- /dev/null +++ b/src/testit_api_client/model/work_item_changed_fields_view_model_is_deleted.py @@ -0,0 +1,323 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.boolean_changed_field_view_model import BooleanChangedFieldViewModel + globals()['BooleanChangedFieldViewModel'] = BooleanChangedFieldViewModel + + +class WorkItemChangedFieldsViewModelIsDeleted(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'old_value': (bool,), # noqa: E501 + 'new_value': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'old_value': 'oldValue', # noqa: E501 + 'new_value': 'newValue', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelIsDeleted - a model defined in OpenAPI + + Keyword Args: + old_value (bool): + new_value (bool): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelIsDeleted - a model defined in OpenAPI + + Keyword Args: + old_value (bool): + new_value (bool): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + BooleanChangedFieldViewModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/work_item_changed_fields_view_model_links.py b/src/testit_api_client/model/work_item_changed_fields_view_model_links.py new file mode 100644 index 0000000..eccd3c6 --- /dev/null +++ b/src/testit_api_client/model/work_item_changed_fields_view_model_links.py @@ -0,0 +1,325 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.work_item_link_change_view_model import WorkItemLinkChangeViewModel + from testit_api_client.model.work_item_link_change_view_model_array_changed_field_view_model import WorkItemLinkChangeViewModelArrayChangedFieldViewModel + globals()['WorkItemLinkChangeViewModel'] = WorkItemLinkChangeViewModel + globals()['WorkItemLinkChangeViewModelArrayChangedFieldViewModel'] = WorkItemLinkChangeViewModelArrayChangedFieldViewModel + + +class WorkItemChangedFieldsViewModelLinks(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'old_value': ([WorkItemLinkChangeViewModel], none_type,), # noqa: E501 + 'new_value': ([WorkItemLinkChangeViewModel], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'old_value': 'oldValue', # noqa: E501 + 'new_value': 'newValue', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelLinks - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + old_value ([WorkItemLinkChangeViewModel], none_type): [optional] # noqa: E501 + new_value ([WorkItemLinkChangeViewModel], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelLinks - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + old_value ([WorkItemLinkChangeViewModel], none_type): [optional] # noqa: E501 + new_value ([WorkItemLinkChangeViewModel], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + WorkItemLinkChangeViewModelArrayChangedFieldViewModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/work_item_changed_fields_view_model_project_id.py b/src/testit_api_client/model/work_item_changed_fields_view_model_project_id.py new file mode 100644 index 0000000..d91d9dd --- /dev/null +++ b/src/testit_api_client/model/work_item_changed_fields_view_model_project_id.py @@ -0,0 +1,323 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.guid_changed_field_view_model import GuidChangedFieldViewModel + globals()['GuidChangedFieldViewModel'] = GuidChangedFieldViewModel + + +class WorkItemChangedFieldsViewModelProjectId(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'old_value': (str,), # noqa: E501 + 'new_value': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'old_value': 'oldValue', # noqa: E501 + 'new_value': 'newValue', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelProjectId - a model defined in OpenAPI + + Keyword Args: + old_value (str): + new_value (str): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelProjectId - a model defined in OpenAPI + + Keyword Args: + old_value (str): + new_value (str): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + GuidChangedFieldViewModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/work_item_changed_fields_view_model_state.py b/src/testit_api_client/model/work_item_changed_fields_view_model_state.py new file mode 100644 index 0000000..4fef60c --- /dev/null +++ b/src/testit_api_client/model/work_item_changed_fields_view_model_state.py @@ -0,0 +1,323 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.string_changed_field_view_model import StringChangedFieldViewModel + globals()['StringChangedFieldViewModel'] = StringChangedFieldViewModel + + +class WorkItemChangedFieldsViewModelState(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'old_value': (str, none_type,), # noqa: E501 + 'new_value': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'old_value': 'oldValue', # noqa: E501 + 'new_value': 'newValue', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelState - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + old_value (str, none_type): [optional] # noqa: E501 + new_value (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelState - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + old_value (str, none_type): [optional] # noqa: E501 + new_value (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + StringChangedFieldViewModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/work_item_changed_fields_view_model_steps.py b/src/testit_api_client/model/work_item_changed_fields_view_model_steps.py new file mode 100644 index 0000000..ed9ad9a --- /dev/null +++ b/src/testit_api_client/model/work_item_changed_fields_view_model_steps.py @@ -0,0 +1,329 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.work_item_step_change_view_model import WorkItemStepChangeViewModel + from testit_api_client.model.work_item_step_change_view_model_array_changed_field_with_diffs_view_model import WorkItemStepChangeViewModelArrayChangedFieldWithDiffsViewModel + globals()['WorkItemStepChangeViewModel'] = WorkItemStepChangeViewModel + globals()['WorkItemStepChangeViewModelArrayChangedFieldWithDiffsViewModel'] = WorkItemStepChangeViewModelArrayChangedFieldWithDiffsViewModel + + +class WorkItemChangedFieldsViewModelSteps(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'diff_value': ([WorkItemStepChangeViewModel], none_type,), # noqa: E501 + 'old_value': ([WorkItemStepChangeViewModel], none_type,), # noqa: E501 + 'new_value': ([WorkItemStepChangeViewModel], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'diff_value': 'diffValue', # noqa: E501 + 'old_value': 'oldValue', # noqa: E501 + 'new_value': 'newValue', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelSteps - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + diff_value ([WorkItemStepChangeViewModel], none_type): [optional] # noqa: E501 + old_value ([WorkItemStepChangeViewModel], none_type): [optional] # noqa: E501 + new_value ([WorkItemStepChangeViewModel], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelSteps - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + diff_value ([WorkItemStepChangeViewModel], none_type): [optional] # noqa: E501 + old_value ([WorkItemStepChangeViewModel], none_type): [optional] # noqa: E501 + new_value ([WorkItemStepChangeViewModel], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + WorkItemStepChangeViewModelArrayChangedFieldWithDiffsViewModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/work_item_changed_fields_view_model_tags.py b/src/testit_api_client/model/work_item_changed_fields_view_model_tags.py new file mode 100644 index 0000000..35e6aee --- /dev/null +++ b/src/testit_api_client/model/work_item_changed_fields_view_model_tags.py @@ -0,0 +1,323 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.string_array_changed_field_view_model import StringArrayChangedFieldViewModel + globals()['StringArrayChangedFieldViewModel'] = StringArrayChangedFieldViewModel + + +class WorkItemChangedFieldsViewModelTags(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'old_value': ([str], none_type,), # noqa: E501 + 'new_value': ([str], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'old_value': 'oldValue', # noqa: E501 + 'new_value': 'newValue', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelTags - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + old_value ([str], none_type): [optional] # noqa: E501 + new_value ([str], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemChangedFieldsViewModelTags - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + old_value ([str], none_type): [optional] # noqa: E501 + new_value ([str], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + StringArrayChangedFieldViewModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/work_item_comment_model_user.py b/src/testit_api_client/model/work_item_comment_model_user.py new file mode 100644 index 0000000..88af3a4 --- /dev/null +++ b/src/testit_api_client/model/work_item_comment_model_user.py @@ -0,0 +1,373 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.user_with_rank_model import UserWithRankModel + from testit_api_client.model.user_with_rank_model_user_rank import UserWithRankModelUserRank + globals()['UserWithRankModel'] = UserWithRankModel + globals()['UserWithRankModelUserRank'] = UserWithRankModelUserRank + + +class WorkItemCommentModelUser(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'first_name': (str,), # noqa: E501 + 'last_name': (str,), # noqa: E501 + 'middle_name': (str,), # noqa: E501 + 'user_name': (str,), # noqa: E501 + 'display_name': (str,), # noqa: E501 + 'user_type': (str,), # noqa: E501 + 'avatar_url': (str,), # noqa: E501 + 'avatar_metadata': (str,), # noqa: E501 + 'is_deleted': (bool,), # noqa: E501 + 'is_disabled': (bool,), # noqa: E501 + 'is_active_status_by_entity': (bool,), # noqa: E501 + 'user_rank': (UserWithRankModelUserRank,), # noqa: E501 + 'provider_id': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'first_name': 'firstName', # noqa: E501 + 'last_name': 'lastName', # noqa: E501 + 'middle_name': 'middleName', # noqa: E501 + 'user_name': 'userName', # noqa: E501 + 'display_name': 'displayName', # noqa: E501 + 'user_type': 'userType', # noqa: E501 + 'avatar_url': 'avatarUrl', # noqa: E501 + 'avatar_metadata': 'avatarMetadata', # noqa: E501 + 'is_deleted': 'isDeleted', # noqa: E501 + 'is_disabled': 'isDisabled', # noqa: E501 + 'is_active_status_by_entity': 'isActiveStatusByEntity', # noqa: E501 + 'user_rank': 'userRank', # noqa: E501 + 'provider_id': 'providerId', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemCommentModelUser - a model defined in OpenAPI + + Keyword Args: + id (str): + first_name (str): + last_name (str): + middle_name (str): + user_name (str): + display_name (str): + user_type (str): + avatar_url (str): + avatar_metadata (str): + is_deleted (bool): + is_disabled (bool): + is_active_status_by_entity (bool): + user_rank (UserWithRankModelUserRank): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + provider_id (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemCommentModelUser - a model defined in OpenAPI + + Keyword Args: + id (str): + first_name (str): + last_name (str): + middle_name (str): + user_name (str): + display_name (str): + user_type (str): + avatar_url (str): + avatar_metadata (str): + is_deleted (bool): + is_disabled (bool): + is_active_status_by_entity (bool): + user_rank (UserWithRankModelUserRank): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + provider_id (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + UserWithRankModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/work_item_extraction_model.py b/src/testit_api_client/model/work_item_extraction_model.py new file mode 100644 index 0000000..d63b3f0 --- /dev/null +++ b/src/testit_api_client/model/work_item_extraction_model.py @@ -0,0 +1,274 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.configuration_extraction_model_project_ids import ConfigurationExtractionModelProjectIds + from testit_api_client.model.work_item_extraction_model_ids import WorkItemExtractionModelIds + from testit_api_client.model.work_item_extraction_model_section_ids import WorkItemExtractionModelSectionIds + globals()['ConfigurationExtractionModelProjectIds'] = ConfigurationExtractionModelProjectIds + globals()['WorkItemExtractionModelIds'] = WorkItemExtractionModelIds + globals()['WorkItemExtractionModelSectionIds'] = WorkItemExtractionModelSectionIds + + +class WorkItemExtractionModel(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'project_ids': (ConfigurationExtractionModelProjectIds,), # noqa: E501 + 'ids': (WorkItemExtractionModelIds,), # noqa: E501 + 'section_ids': (WorkItemExtractionModelSectionIds,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'project_ids': 'projectIds', # noqa: E501 + 'ids': 'ids', # noqa: E501 + 'section_ids': 'sectionIds', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemExtractionModel - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + project_ids (ConfigurationExtractionModelProjectIds): [optional] # noqa: E501 + ids (WorkItemExtractionModelIds): [optional] # noqa: E501 + section_ids (WorkItemExtractionModelSectionIds): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemExtractionModel - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + project_ids (ConfigurationExtractionModelProjectIds): [optional] # noqa: E501 + ids (WorkItemExtractionModelIds): [optional] # noqa: E501 + section_ids (WorkItemExtractionModelSectionIds): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/src/testit_api_client/model/work_item_extraction_model_ids.py b/src/testit_api_client/model/work_item_extraction_model_ids.py new file mode 100644 index 0000000..0b5f8e3 --- /dev/null +++ b/src/testit_api_client/model/work_item_extraction_model_ids.py @@ -0,0 +1,323 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.guid_extraction_model import GuidExtractionModel + globals()['GuidExtractionModel'] = GuidExtractionModel + + +class WorkItemExtractionModelIds(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'include': ([str], none_type,), # noqa: E501 + 'exclude': ([str], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'include': 'include', # noqa: E501 + 'exclude': 'exclude', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemExtractionModelIds - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + include ([str], none_type): [optional] # noqa: E501 + exclude ([str], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemExtractionModelIds - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + include ([str], none_type): [optional] # noqa: E501 + exclude ([str], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + GuidExtractionModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/work_item_extraction_model_section_ids.py b/src/testit_api_client/model/work_item_extraction_model_section_ids.py new file mode 100644 index 0000000..7e77bd7 --- /dev/null +++ b/src/testit_api_client/model/work_item_extraction_model_section_ids.py @@ -0,0 +1,323 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.guid_extraction_model import GuidExtractionModel + globals()['GuidExtractionModel'] = GuidExtractionModel + + +class WorkItemExtractionModelSectionIds(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'include': ([str], none_type,), # noqa: E501 + 'exclude': ([str], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'include': 'include', # noqa: E501 + 'exclude': 'exclude', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemExtractionModelSectionIds - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + include ([str], none_type): [optional] # noqa: E501 + exclude ([str], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemExtractionModelSectionIds - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + include ([str], none_type): [optional] # noqa: E501 + exclude ([str], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + GuidExtractionModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/work_item_group_get_model.py b/src/testit_api_client/model/work_item_group_get_model.py new file mode 100644 index 0000000..e645257 --- /dev/null +++ b/src/testit_api_client/model/work_item_group_get_model.py @@ -0,0 +1,278 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.work_item_group_get_model_select_model import WorkItemGroupGetModelSelectModel + from testit_api_client.model.work_item_group_type import WorkItemGroupType + globals()['WorkItemGroupGetModelSelectModel'] = WorkItemGroupGetModelSelectModel + globals()['WorkItemGroupType'] = WorkItemGroupType + + +class WorkItemGroupGetModel(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'group_type': (WorkItemGroupType,), # noqa: E501 + 'select_model': (WorkItemGroupGetModelSelectModel,), # noqa: E501 + 'custom_attribute_id': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'group_type': 'groupType', # noqa: E501 + 'select_model': 'selectModel', # noqa: E501 + 'custom_attribute_id': 'customAttributeId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, group_type, *args, **kwargs): # noqa: E501 + """WorkItemGroupGetModel - a model defined in OpenAPI + + Args: + group_type (WorkItemGroupType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + select_model (WorkItemGroupGetModelSelectModel): [optional] # noqa: E501 + custom_attribute_id (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.group_type = group_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, group_type, *args, **kwargs): # noqa: E501 + """WorkItemGroupGetModel - a model defined in OpenAPI + + Args: + group_type (WorkItemGroupType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + select_model (WorkItemGroupGetModelSelectModel): [optional] # noqa: E501 + custom_attribute_id (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.group_type = group_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/src/testit_api_client/model/work_item_group_get_model_select_model.py b/src/testit_api_client/model/work_item_group_get_model_select_model.py new file mode 100644 index 0000000..1432b81 --- /dev/null +++ b/src/testit_api_client/model/work_item_group_get_model_select_model.py @@ -0,0 +1,327 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.work_item_local_select_model import WorkItemLocalSelectModel + from testit_api_client.model.work_item_local_select_model_extraction_model import WorkItemLocalSelectModelExtractionModel + from testit_api_client.model.work_item_local_select_model_filter import WorkItemLocalSelectModelFilter + globals()['WorkItemLocalSelectModel'] = WorkItemLocalSelectModel + globals()['WorkItemLocalSelectModelExtractionModel'] = WorkItemLocalSelectModelExtractionModel + globals()['WorkItemLocalSelectModelFilter'] = WorkItemLocalSelectModelFilter + + +class WorkItemGroupGetModelSelectModel(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'filter': (WorkItemLocalSelectModelFilter,), # noqa: E501 + 'extraction_model': (WorkItemLocalSelectModelExtractionModel,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'filter': 'filter', # noqa: E501 + 'extraction_model': 'extractionModel', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemGroupGetModelSelectModel - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + filter (WorkItemLocalSelectModelFilter): [optional] # noqa: E501 + extraction_model (WorkItemLocalSelectModelExtractionModel): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemGroupGetModelSelectModel - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + filter (WorkItemLocalSelectModelFilter): [optional] # noqa: E501 + extraction_model (WorkItemLocalSelectModelExtractionModel): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + WorkItemLocalSelectModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/work_item_group_model.py b/src/testit_api_client/model/work_item_group_model.py new file mode 100644 index 0000000..956e7e2 --- /dev/null +++ b/src/testit_api_client/model/work_item_group_model.py @@ -0,0 +1,278 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.work_item_short_model import WorkItemShortModel + globals()['WorkItemShortModel'] = WorkItemShortModel + + +class WorkItemGroupModel(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'size': (int,), # noqa: E501 + 'work_items': ([WorkItemShortModel],), # noqa: E501 + 'key': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'size': 'size', # noqa: E501 + 'work_items': 'workItems', # noqa: E501 + 'key': 'key', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, size, work_items, *args, **kwargs): # noqa: E501 + """WorkItemGroupModel - a model defined in OpenAPI + + Args: + size (int): + work_items ([WorkItemShortModel]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + key (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.size = size + self.work_items = work_items + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, size, work_items, *args, **kwargs): # noqa: E501 + """WorkItemGroupModel - a model defined in OpenAPI + + Args: + size (int): + work_items ([WorkItemShortModel]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + key (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.size = size + self.work_items = work_items + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/src/testit_api_client/model/work_item_group_type.py b/src/testit_api_client/model/work_item_group_type.py new file mode 100644 index 0000000..50e7da6 --- /dev/null +++ b/src/testit_api_client/model/work_item_group_type.py @@ -0,0 +1,295 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + + +class WorkItemGroupType(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'TYPE': "Type", + 'PRIORITY': "Priority", + 'STATUS': "Status", + 'AUTOMATIONSTATUS': "AutomationStatus", + 'CREATOR': "Creator", + 'LASTEDITOR': "LastEditor", + 'CUSTOMATTRIBUTE': "CustomAttribute", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """WorkItemGroupType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["Type", "Priority", "Status", "AutomationStatus", "Creator", "LastEditor", "CustomAttribute", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["Type", "Priority", "Status", "AutomationStatus", "Creator", "LastEditor", "CustomAttribute", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """WorkItemGroupType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["Type", "Priority", "Status", "AutomationStatus", "Creator", "LastEditor", "CustomAttribute", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["Type", "Priority", "Status", "AutomationStatus", "Creator", "LastEditor", "CustomAttribute", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/src/testit_api_client/model/work_item_local_filter_model.py b/src/testit_api_client/model/work_item_local_filter_model.py new file mode 100644 index 0000000..b6f3b1f --- /dev/null +++ b/src/testit_api_client/model/work_item_local_filter_model.py @@ -0,0 +1,366 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.test_point_filter_model_work_item_created_date import TestPointFilterModelWorkItemCreatedDate + from testit_api_client.model.test_point_filter_model_work_item_modified_date import TestPointFilterModelWorkItemModifiedDate + from testit_api_client.model.test_suite_work_items_search_model_duration import TestSuiteWorkItemsSearchModelDuration + from testit_api_client.model.test_suite_work_items_search_model_median_duration import TestSuiteWorkItemsSearchModelMedianDuration + from testit_api_client.model.work_item_entity_types import WorkItemEntityTypes + from testit_api_client.model.work_item_priority_model import WorkItemPriorityModel + from testit_api_client.model.work_item_states import WorkItemStates + globals()['TestPointFilterModelWorkItemCreatedDate'] = TestPointFilterModelWorkItemCreatedDate + globals()['TestPointFilterModelWorkItemModifiedDate'] = TestPointFilterModelWorkItemModifiedDate + globals()['TestSuiteWorkItemsSearchModelDuration'] = TestSuiteWorkItemsSearchModelDuration + globals()['TestSuiteWorkItemsSearchModelMedianDuration'] = TestSuiteWorkItemsSearchModelMedianDuration + globals()['WorkItemEntityTypes'] = WorkItemEntityTypes + globals()['WorkItemPriorityModel'] = WorkItemPriorityModel + globals()['WorkItemStates'] = WorkItemStates + + +class WorkItemLocalFilterModel(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('name',): { + 'max_length': 255, + 'min_length': 0, + }, + ('ids',): { + }, + ('global_ids',): { + }, + ('section_ids',): { + }, + ('created_by_ids',): { + }, + ('modified_by_ids',): { + }, + ('states',): { + }, + ('priorities',): { + }, + ('types',): { + }, + ('tags',): { + }, + ('auto_test_ids',): { + }, + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str, none_type,), # noqa: E501 + 'ids': ([str], none_type,), # noqa: E501 + 'global_ids': ([int], none_type,), # noqa: E501 + 'attributes': ({str: ([str], none_type)}, none_type,), # noqa: E501 + 'is_deleted': (bool, none_type,), # noqa: E501 + 'section_ids': ([str], none_type,), # noqa: E501 + 'created_by_ids': ([str], none_type,), # noqa: E501 + 'modified_by_ids': ([str], none_type,), # noqa: E501 + 'states': ([WorkItemStates], none_type,), # noqa: E501 + 'priorities': ([WorkItemPriorityModel], none_type,), # noqa: E501 + 'types': ([WorkItemEntityTypes], none_type,), # noqa: E501 + 'created_date': (TestPointFilterModelWorkItemCreatedDate,), # noqa: E501 + 'modified_date': (TestPointFilterModelWorkItemModifiedDate,), # noqa: E501 + 'duration': (TestSuiteWorkItemsSearchModelDuration,), # noqa: E501 + 'median_duration': (TestSuiteWorkItemsSearchModelMedianDuration,), # noqa: E501 + 'is_automated': (bool, none_type,), # noqa: E501 + 'tags': ([str], none_type,), # noqa: E501 + 'auto_test_ids': ([str], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'ids': 'ids', # noqa: E501 + 'global_ids': 'globalIds', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'is_deleted': 'isDeleted', # noqa: E501 + 'section_ids': 'sectionIds', # noqa: E501 + 'created_by_ids': 'createdByIds', # noqa: E501 + 'modified_by_ids': 'modifiedByIds', # noqa: E501 + 'states': 'states', # noqa: E501 + 'priorities': 'priorities', # noqa: E501 + 'types': 'types', # noqa: E501 + 'created_date': 'createdDate', # noqa: E501 + 'modified_date': 'modifiedDate', # noqa: E501 + 'duration': 'duration', # noqa: E501 + 'median_duration': 'medianDuration', # noqa: E501 + 'is_automated': 'isAutomated', # noqa: E501 + 'tags': 'tags', # noqa: E501 + 'auto_test_ids': 'autoTestIds', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemLocalFilterModel - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str, none_type): Name of work item. [optional] # noqa: E501 + ids ([str], none_type): Specifies a work item unique IDs to search for. [optional] # noqa: E501 + global_ids ([int], none_type): Collection of global (integer) identifiers. [optional] # noqa: E501 + attributes ({str: ([str], none_type)}, none_type): Custom attributes of work item. [optional] # noqa: E501 + is_deleted (bool, none_type): Is result must consist of only actual/deleted work items. [optional] # noqa: E501 + section_ids ([str], none_type): Collection of section identifiers. [optional] # noqa: E501 + created_by_ids ([str], none_type): Collection of identifiers of users who created work item. [optional] # noqa: E501 + modified_by_ids ([str], none_type): Collection of identifiers of users who applied last modification to work item. [optional] # noqa: E501 + states ([WorkItemStates], none_type): Collection of states of work item. [optional] # noqa: E501 + priorities ([WorkItemPriorityModel], none_type): Collection of priorities of work item. [optional] # noqa: E501 + types ([WorkItemEntityTypes], none_type): Collection of types of work item. [optional] # noqa: E501 + created_date (TestPointFilterModelWorkItemCreatedDate): [optional] # noqa: E501 + modified_date (TestPointFilterModelWorkItemModifiedDate): [optional] # noqa: E501 + duration (TestSuiteWorkItemsSearchModelDuration): [optional] # noqa: E501 + median_duration (TestSuiteWorkItemsSearchModelMedianDuration): [optional] # noqa: E501 + is_automated (bool, none_type): Is result must consist of only manual/automated work items. [optional] # noqa: E501 + tags ([str], none_type): Collection of tags. [optional] # noqa: E501 + auto_test_ids ([str], none_type): Collection of identifiers of linked autotests. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemLocalFilterModel - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str, none_type): Name of work item. [optional] # noqa: E501 + ids ([str], none_type): Specifies a work item unique IDs to search for. [optional] # noqa: E501 + global_ids ([int], none_type): Collection of global (integer) identifiers. [optional] # noqa: E501 + attributes ({str: ([str], none_type)}, none_type): Custom attributes of work item. [optional] # noqa: E501 + is_deleted (bool, none_type): Is result must consist of only actual/deleted work items. [optional] # noqa: E501 + section_ids ([str], none_type): Collection of section identifiers. [optional] # noqa: E501 + created_by_ids ([str], none_type): Collection of identifiers of users who created work item. [optional] # noqa: E501 + modified_by_ids ([str], none_type): Collection of identifiers of users who applied last modification to work item. [optional] # noqa: E501 + states ([WorkItemStates], none_type): Collection of states of work item. [optional] # noqa: E501 + priorities ([WorkItemPriorityModel], none_type): Collection of priorities of work item. [optional] # noqa: E501 + types ([WorkItemEntityTypes], none_type): Collection of types of work item. [optional] # noqa: E501 + created_date (TestPointFilterModelWorkItemCreatedDate): [optional] # noqa: E501 + modified_date (TestPointFilterModelWorkItemModifiedDate): [optional] # noqa: E501 + duration (TestSuiteWorkItemsSearchModelDuration): [optional] # noqa: E501 + median_duration (TestSuiteWorkItemsSearchModelMedianDuration): [optional] # noqa: E501 + is_automated (bool, none_type): Is result must consist of only manual/automated work items. [optional] # noqa: E501 + tags ([str], none_type): Collection of tags. [optional] # noqa: E501 + auto_test_ids ([str], none_type): Collection of identifiers of linked autotests. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/src/testit_api_client/model/work_item_local_select_model.py b/src/testit_api_client/model/work_item_local_select_model.py new file mode 100644 index 0000000..c0c55c8 --- /dev/null +++ b/src/testit_api_client/model/work_item_local_select_model.py @@ -0,0 +1,268 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.work_item_local_select_model_extraction_model import WorkItemLocalSelectModelExtractionModel + from testit_api_client.model.work_item_local_select_model_filter import WorkItemLocalSelectModelFilter + globals()['WorkItemLocalSelectModelExtractionModel'] = WorkItemLocalSelectModelExtractionModel + globals()['WorkItemLocalSelectModelFilter'] = WorkItemLocalSelectModelFilter + + +class WorkItemLocalSelectModel(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'filter': (WorkItemLocalSelectModelFilter,), # noqa: E501 + 'extraction_model': (WorkItemLocalSelectModelExtractionModel,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'filter': 'filter', # noqa: E501 + 'extraction_model': 'extractionModel', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemLocalSelectModel - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + filter (WorkItemLocalSelectModelFilter): [optional] # noqa: E501 + extraction_model (WorkItemLocalSelectModelExtractionModel): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemLocalSelectModel - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + filter (WorkItemLocalSelectModelFilter): [optional] # noqa: E501 + extraction_model (WorkItemLocalSelectModelExtractionModel): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/src/testit_api_client/model/work_item_local_select_model_extraction_model.py b/src/testit_api_client/model/work_item_local_select_model_extraction_model.py new file mode 100644 index 0000000..5fb3d17 --- /dev/null +++ b/src/testit_api_client/model/work_item_local_select_model_extraction_model.py @@ -0,0 +1,333 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.configuration_extraction_model_project_ids import ConfigurationExtractionModelProjectIds + from testit_api_client.model.work_item_extraction_model import WorkItemExtractionModel + from testit_api_client.model.work_item_extraction_model_ids import WorkItemExtractionModelIds + from testit_api_client.model.work_item_extraction_model_section_ids import WorkItemExtractionModelSectionIds + globals()['ConfigurationExtractionModelProjectIds'] = ConfigurationExtractionModelProjectIds + globals()['WorkItemExtractionModel'] = WorkItemExtractionModel + globals()['WorkItemExtractionModelIds'] = WorkItemExtractionModelIds + globals()['WorkItemExtractionModelSectionIds'] = WorkItemExtractionModelSectionIds + + +class WorkItemLocalSelectModelExtractionModel(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'project_ids': (ConfigurationExtractionModelProjectIds,), # noqa: E501 + 'ids': (WorkItemExtractionModelIds,), # noqa: E501 + 'section_ids': (WorkItemExtractionModelSectionIds,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'project_ids': 'projectIds', # noqa: E501 + 'ids': 'ids', # noqa: E501 + 'section_ids': 'sectionIds', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemLocalSelectModelExtractionModel - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + project_ids (ConfigurationExtractionModelProjectIds): [optional] # noqa: E501 + ids (WorkItemExtractionModelIds): [optional] # noqa: E501 + section_ids (WorkItemExtractionModelSectionIds): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemLocalSelectModelExtractionModel - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + project_ids (ConfigurationExtractionModelProjectIds): [optional] # noqa: E501 + ids (WorkItemExtractionModelIds): [optional] # noqa: E501 + section_ids (WorkItemExtractionModelSectionIds): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + WorkItemExtractionModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/work_item_local_select_model_filter.py b/src/testit_api_client/model/work_item_local_select_model_filter.py new file mode 100644 index 0000000..4a38582 --- /dev/null +++ b/src/testit_api_client/model/work_item_local_select_model_filter.py @@ -0,0 +1,425 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.test_point_filter_model_work_item_created_date import TestPointFilterModelWorkItemCreatedDate + from testit_api_client.model.test_point_filter_model_work_item_modified_date import TestPointFilterModelWorkItemModifiedDate + from testit_api_client.model.test_suite_work_items_search_model_duration import TestSuiteWorkItemsSearchModelDuration + from testit_api_client.model.test_suite_work_items_search_model_median_duration import TestSuiteWorkItemsSearchModelMedianDuration + from testit_api_client.model.work_item_entity_types import WorkItemEntityTypes + from testit_api_client.model.work_item_local_filter_model import WorkItemLocalFilterModel + from testit_api_client.model.work_item_priority_model import WorkItemPriorityModel + from testit_api_client.model.work_item_states import WorkItemStates + globals()['TestPointFilterModelWorkItemCreatedDate'] = TestPointFilterModelWorkItemCreatedDate + globals()['TestPointFilterModelWorkItemModifiedDate'] = TestPointFilterModelWorkItemModifiedDate + globals()['TestSuiteWorkItemsSearchModelDuration'] = TestSuiteWorkItemsSearchModelDuration + globals()['TestSuiteWorkItemsSearchModelMedianDuration'] = TestSuiteWorkItemsSearchModelMedianDuration + globals()['WorkItemEntityTypes'] = WorkItemEntityTypes + globals()['WorkItemLocalFilterModel'] = WorkItemLocalFilterModel + globals()['WorkItemPriorityModel'] = WorkItemPriorityModel + globals()['WorkItemStates'] = WorkItemStates + + +class WorkItemLocalSelectModelFilter(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + ('name',): { + 'max_length': 255, + 'min_length': 0, + }, + ('ids',): { + }, + ('global_ids',): { + }, + ('section_ids',): { + }, + ('created_by_ids',): { + }, + ('modified_by_ids',): { + }, + ('states',): { + }, + ('priorities',): { + }, + ('types',): { + }, + ('tags',): { + }, + ('auto_test_ids',): { + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str, none_type,), # noqa: E501 + 'ids': ([str], none_type,), # noqa: E501 + 'global_ids': ([int], none_type,), # noqa: E501 + 'attributes': ({str: ([str], none_type)}, none_type,), # noqa: E501 + 'is_deleted': (bool, none_type,), # noqa: E501 + 'section_ids': ([str], none_type,), # noqa: E501 + 'created_by_ids': ([str], none_type,), # noqa: E501 + 'modified_by_ids': ([str], none_type,), # noqa: E501 + 'states': ([WorkItemStates], none_type,), # noqa: E501 + 'priorities': ([WorkItemPriorityModel], none_type,), # noqa: E501 + 'types': ([WorkItemEntityTypes], none_type,), # noqa: E501 + 'created_date': (TestPointFilterModelWorkItemCreatedDate,), # noqa: E501 + 'modified_date': (TestPointFilterModelWorkItemModifiedDate,), # noqa: E501 + 'duration': (TestSuiteWorkItemsSearchModelDuration,), # noqa: E501 + 'median_duration': (TestSuiteWorkItemsSearchModelMedianDuration,), # noqa: E501 + 'is_automated': (bool, none_type,), # noqa: E501 + 'tags': ([str], none_type,), # noqa: E501 + 'auto_test_ids': ([str], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'ids': 'ids', # noqa: E501 + 'global_ids': 'globalIds', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'is_deleted': 'isDeleted', # noqa: E501 + 'section_ids': 'sectionIds', # noqa: E501 + 'created_by_ids': 'createdByIds', # noqa: E501 + 'modified_by_ids': 'modifiedByIds', # noqa: E501 + 'states': 'states', # noqa: E501 + 'priorities': 'priorities', # noqa: E501 + 'types': 'types', # noqa: E501 + 'created_date': 'createdDate', # noqa: E501 + 'modified_date': 'modifiedDate', # noqa: E501 + 'duration': 'duration', # noqa: E501 + 'median_duration': 'medianDuration', # noqa: E501 + 'is_automated': 'isAutomated', # noqa: E501 + 'tags': 'tags', # noqa: E501 + 'auto_test_ids': 'autoTestIds', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemLocalSelectModelFilter - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str, none_type): Name of work item. [optional] # noqa: E501 + ids ([str], none_type): Specifies a work item unique IDs to search for. [optional] # noqa: E501 + global_ids ([int], none_type): Collection of global (integer) identifiers. [optional] # noqa: E501 + attributes ({str: ([str], none_type)}, none_type): Custom attributes of work item. [optional] # noqa: E501 + is_deleted (bool, none_type): Is result must consist of only actual/deleted work items. [optional] # noqa: E501 + section_ids ([str], none_type): Collection of section identifiers. [optional] # noqa: E501 + created_by_ids ([str], none_type): Collection of identifiers of users who created work item. [optional] # noqa: E501 + modified_by_ids ([str], none_type): Collection of identifiers of users who applied last modification to work item. [optional] # noqa: E501 + states ([WorkItemStates], none_type): Collection of states of work item. [optional] # noqa: E501 + priorities ([WorkItemPriorityModel], none_type): Collection of priorities of work item. [optional] # noqa: E501 + types ([WorkItemEntityTypes], none_type): Collection of types of work item. [optional] # noqa: E501 + created_date (TestPointFilterModelWorkItemCreatedDate): [optional] # noqa: E501 + modified_date (TestPointFilterModelWorkItemModifiedDate): [optional] # noqa: E501 + duration (TestSuiteWorkItemsSearchModelDuration): [optional] # noqa: E501 + median_duration (TestSuiteWorkItemsSearchModelMedianDuration): [optional] # noqa: E501 + is_automated (bool, none_type): Is result must consist of only manual/automated work items. [optional] # noqa: E501 + tags ([str], none_type): Collection of tags. [optional] # noqa: E501 + auto_test_ids ([str], none_type): Collection of identifiers of linked autotests. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemLocalSelectModelFilter - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str, none_type): Name of work item. [optional] # noqa: E501 + ids ([str], none_type): Specifies a work item unique IDs to search for. [optional] # noqa: E501 + global_ids ([int], none_type): Collection of global (integer) identifiers. [optional] # noqa: E501 + attributes ({str: ([str], none_type)}, none_type): Custom attributes of work item. [optional] # noqa: E501 + is_deleted (bool, none_type): Is result must consist of only actual/deleted work items. [optional] # noqa: E501 + section_ids ([str], none_type): Collection of section identifiers. [optional] # noqa: E501 + created_by_ids ([str], none_type): Collection of identifiers of users who created work item. [optional] # noqa: E501 + modified_by_ids ([str], none_type): Collection of identifiers of users who applied last modification to work item. [optional] # noqa: E501 + states ([WorkItemStates], none_type): Collection of states of work item. [optional] # noqa: E501 + priorities ([WorkItemPriorityModel], none_type): Collection of priorities of work item. [optional] # noqa: E501 + types ([WorkItemEntityTypes], none_type): Collection of types of work item. [optional] # noqa: E501 + created_date (TestPointFilterModelWorkItemCreatedDate): [optional] # noqa: E501 + modified_date (TestPointFilterModelWorkItemModifiedDate): [optional] # noqa: E501 + duration (TestSuiteWorkItemsSearchModelDuration): [optional] # noqa: E501 + median_duration (TestSuiteWorkItemsSearchModelMedianDuration): [optional] # noqa: E501 + is_automated (bool, none_type): Is result must consist of only manual/automated work items. [optional] # noqa: E501 + tags ([str], none_type): Collection of tags. [optional] # noqa: E501 + auto_test_ids ([str], none_type): Collection of identifiers of linked autotests. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + WorkItemLocalFilterModel, + ], + 'oneOf': [ + ], + } diff --git a/src/testit_api_client/model/work_item_step_change_view_model_work_item.py b/src/testit_api_client/model/work_item_step_change_view_model_work_item.py new file mode 100644 index 0000000..79ad8af --- /dev/null +++ b/src/testit_api_client/model/work_item_step_change_view_model_work_item.py @@ -0,0 +1,333 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v2.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from testit_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from testit_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from testit_api_client.model.shared_step_change_view_model import SharedStepChangeViewModel + from testit_api_client.model.work_item_step_change_view_model import WorkItemStepChangeViewModel + globals()['SharedStepChangeViewModel'] = SharedStepChangeViewModel + globals()['WorkItemStepChangeViewModel'] = WorkItemStepChangeViewModel + + +class WorkItemStepChangeViewModelWorkItem(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'global_id': (int,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'steps': ([WorkItemStepChangeViewModel],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'global_id': 'globalId', # noqa: E501 + 'name': 'name', # noqa: E501 + 'steps': 'steps', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """WorkItemStepChangeViewModelWorkItem - a model defined in OpenAPI + + Keyword Args: + id (str): + global_id (int): + name (str): + steps ([WorkItemStepChangeViewModel]): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """WorkItemStepChangeViewModelWorkItem - a model defined in OpenAPI + + Keyword Args: + id (str): + global_id (int): + name (str): + steps ([WorkItemStepChangeViewModel]): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + SharedStepChangeViewModel, + ], + 'oneOf': [ + ], + }