From 5e5c91a8db1966d865a785ab2b7ef63c0c789370 Mon Sep 17 00:00:00 2001 From: Dmitry Ermakovich Date: Fri, 21 Aug 2026 17:59:59 +0300 Subject: [PATCH] feat: cloud support --- testit-adapter-behave/setup.py | 2 +- testit-adapter-nose/setup.py | 2 +- testit-adapter-pytest/setup.py | 2 +- testit-adapter-robotframework/setup.py | 2 +- testit-python-commons/setup.py | 2 +- .../adapters_api/api/custom_attributes_api.py | 607 ++++++++++++++++++ .../src/adapters_api/apis/__init__.py | 1 + .../model/adapters_auto_tests_post_request.py | 6 + .../model/adapters_auto_tests_put_request.py | 10 + ...custom_attributes_global_id_put_request.py | 337 ++++++++++ ...s_custom_attributes_global_post_request.py | 343 ++++++++++ ...s_custom_attributes_search_post_request.py | 351 ++++++++++ ...apters_test_results_search_post_request.py | 6 + .../model/auto_test_api_result.py | 6 + .../model/auto_test_api_result_layer.py | 325 ++++++++++ .../model/auto_test_create_api_model.py | 6 + .../model/auto_test_create_api_model_layer.py | 328 ++++++++++ .../model/auto_test_update_api_model.py | 16 +- .../model/custom_attribute_api_result.py | 26 +- .../custom_attribute_option_post_api_model.py | 271 ++++++++ ...ustom_attribute_option_update_api_model.py | 283 ++++++++ .../custom_attribute_search_api_model.py | 292 +++++++++ .../custom_attribute_search_api_result.py | 348 ++++++++++ .../global_custom_attribute_post_api_model.py | 292 +++++++++ ...lobal_custom_attribute_update_api_model.py | 284 ++++++++ .../src/adapters_api/model/layer_api_model.py | 277 ++++++++ .../adapters_api/model/layer_api_result.py | 274 ++++++++ .../src/adapters_api/model/layer_source.py | 291 +++++++++ ...un_select_test_results_api_model_filter.py | 6 + .../model/project_shortest_api_result.py | 292 +++++++++ .../projects_filter_model_autotests_count.py | 6 +- .../projects_filter_model_checklists_count.py | 6 +- ...rojects_filter_model_shared_steps_count.py | 6 +- .../projects_filter_model_test_cases_count.py | 6 +- .../model/test_result_short_response.py | 10 +- .../model/test_results_filter_api_model.py | 6 + .../adapters_api/model/test_run_api_result.py | 18 +- .../src/adapters_api/models/__init__.py | 15 + update_versions.sh | 2 +- 39 files changed, 5337 insertions(+), 26 deletions(-) create mode 100644 testit-python-commons/src/adapters_api/api/custom_attributes_api.py create mode 100644 testit-python-commons/src/adapters_api/model/adapters_custom_attributes_global_id_put_request.py create mode 100644 testit-python-commons/src/adapters_api/model/adapters_custom_attributes_global_post_request.py create mode 100644 testit-python-commons/src/adapters_api/model/adapters_custom_attributes_search_post_request.py create mode 100644 testit-python-commons/src/adapters_api/model/auto_test_api_result_layer.py create mode 100644 testit-python-commons/src/adapters_api/model/auto_test_create_api_model_layer.py create mode 100644 testit-python-commons/src/adapters_api/model/custom_attribute_option_post_api_model.py create mode 100644 testit-python-commons/src/adapters_api/model/custom_attribute_option_update_api_model.py create mode 100644 testit-python-commons/src/adapters_api/model/custom_attribute_search_api_model.py create mode 100644 testit-python-commons/src/adapters_api/model/custom_attribute_search_api_result.py create mode 100644 testit-python-commons/src/adapters_api/model/global_custom_attribute_post_api_model.py create mode 100644 testit-python-commons/src/adapters_api/model/global_custom_attribute_update_api_model.py create mode 100644 testit-python-commons/src/adapters_api/model/layer_api_model.py create mode 100644 testit-python-commons/src/adapters_api/model/layer_api_result.py create mode 100644 testit-python-commons/src/adapters_api/model/layer_source.py create mode 100644 testit-python-commons/src/adapters_api/model/project_shortest_api_result.py diff --git a/testit-adapter-behave/setup.py b/testit-adapter-behave/setup.py index 41526a8..4fc079b 100644 --- a/testit-adapter-behave/setup.py +++ b/testit-adapter-behave/setup.py @@ -1,6 +1,6 @@ from setuptools import find_packages, setup -VERSION = "5.1.3" +VERSION = "5.1.4" setup( name='testit-adapter-behave', diff --git a/testit-adapter-nose/setup.py b/testit-adapter-nose/setup.py index 631dbbb..9e346cc 100644 --- a/testit-adapter-nose/setup.py +++ b/testit-adapter-nose/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -VERSION = "5.1.3" +VERSION = "5.1.4" setup( name='testit-adapter-nose', diff --git a/testit-adapter-pytest/setup.py b/testit-adapter-pytest/setup.py index b0749ef..8a5eb50 100644 --- a/testit-adapter-pytest/setup.py +++ b/testit-adapter-pytest/setup.py @@ -1,6 +1,6 @@ from setuptools import find_packages, setup -VERSION = "5.1.3" +VERSION = "5.1.4" setup( name='testit-adapter-pytest', diff --git a/testit-adapter-robotframework/setup.py b/testit-adapter-robotframework/setup.py index 8ddbfdd..184a682 100644 --- a/testit-adapter-robotframework/setup.py +++ b/testit-adapter-robotframework/setup.py @@ -1,6 +1,6 @@ from setuptools import find_packages, setup -VERSION = "5.1.3" +VERSION = "5.1.4" setup( name='testit-adapter-robotframework', diff --git a/testit-python-commons/setup.py b/testit-python-commons/setup.py index 0b3eb5e..9797638 100644 --- a/testit-python-commons/setup.py +++ b/testit-python-commons/setup.py @@ -1,6 +1,6 @@ from setuptools import find_packages, setup -VERSION = "5.1.3" +VERSION = "5.1.4" setup( name='testit-python-commons', diff --git a/testit-python-commons/src/adapters_api/api/custom_attributes_api.py b/testit-python-commons/src/adapters_api/api/custom_attributes_api.py new file mode 100644 index 0000000..0b885d9 --- /dev/null +++ b/testit-python-commons/src/adapters_api/api/custom_attributes_api.py @@ -0,0 +1,607 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: adapters + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from adapters_api.api_client import ApiClient, Endpoint as _Endpoint +from adapters_api.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from adapters_api.model.adapters_custom_attributes_global_id_put_request import AdaptersCustomAttributesGlobalIdPutRequest +from adapters_api.model.adapters_custom_attributes_global_post_request import AdaptersCustomAttributesGlobalPostRequest +from adapters_api.model.adapters_custom_attributes_search_post_request import AdaptersCustomAttributesSearchPostRequest +from adapters_api.model.custom_attribute_api_result import CustomAttributeApiResult +from adapters_api.model.custom_attribute_search_api_result import CustomAttributeSearchApiResult +from adapters_api.model.problem_details import ProblemDetails +from adapters_api.model.validation_problem_details import ValidationProblemDetails + + +class CustomAttributesApi(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.adapters_custom_attributes_global_id_put_endpoint = _Endpoint( + settings={ + 'response_type': (CustomAttributeApiResult,), + 'auth': [ + 'PrivateToken', + 'Identity.Application' + ], + 'endpoint_path': '/adapters/customAttributes/global/{id}', + 'operation_id': 'adapters_custom_attributes_global_id_put', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'adapters_custom_attributes_global_id_put_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'adapters_custom_attributes_global_id_put_request': + (AdaptersCustomAttributesGlobalIdPutRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'adapters_custom_attributes_global_id_put_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.adapters_custom_attributes_global_post_endpoint = _Endpoint( + settings={ + 'response_type': (CustomAttributeApiResult,), + 'auth': [ + 'PrivateToken', + 'Identity.Application' + ], + 'endpoint_path': '/adapters/customAttributes/global', + 'operation_id': 'adapters_custom_attributes_global_post', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'adapters_custom_attributes_global_post_request', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'adapters_custom_attributes_global_post_request': + (AdaptersCustomAttributesGlobalPostRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'adapters_custom_attributes_global_post_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.adapters_custom_attributes_id_get_endpoint = _Endpoint( + settings={ + 'response_type': (CustomAttributeApiResult,), + 'auth': [ + 'PrivateToken', + 'Identity.Application' + ], + 'endpoint_path': '/adapters/customAttributes/{id}', + 'operation_id': 'adapters_custom_attributes_id_get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.adapters_custom_attributes_search_post_endpoint = _Endpoint( + settings={ + 'response_type': ([CustomAttributeSearchApiResult],), + 'auth': [ + 'PrivateToken', + 'Identity.Application' + ], + 'endpoint_path': '/adapters/customAttributes/search', + 'operation_id': 'adapters_custom_attributes_search_post', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'skip', + 'take', + 'order_by', + 'search_field', + 'search_value', + 'adapters_custom_attributes_search_post_request', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'skip': + (int,), + 'take': + (int,), + 'order_by': + (str,), + 'search_field': + (str,), + 'search_value': + (str,), + 'adapters_custom_attributes_search_post_request': + (AdaptersCustomAttributesSearchPostRequest,), + }, + 'attribute_map': { + 'skip': 'Skip', + 'take': 'Take', + 'order_by': 'OrderBy', + 'search_field': 'SearchField', + 'search_value': 'SearchValue', + }, + 'location_map': { + 'skip': 'query', + 'take': 'query', + 'order_by': 'query', + 'search_field': 'query', + 'search_value': 'query', + 'adapters_custom_attributes_search_post_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def adapters_custom_attributes_global_id_put( + self, + id, + **kwargs + ): + """Update global 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.adapters_custom_attributes_global_id_put(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): Unique ID of attribute + + Keyword Args: + adapters_custom_attributes_global_id_put_request (AdaptersCustomAttributesGlobalIdPutRequest): [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: + CustomAttributeApiResult + 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['id'] = \ + id + return self.adapters_custom_attributes_global_id_put_endpoint.call_with_http_info(**kwargs) + + def adapters_custom_attributes_global_post( + self, + **kwargs + ): + """Create global 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.adapters_custom_attributes_global_post(async_req=True) + >>> result = thread.get() + + + Keyword Args: + adapters_custom_attributes_global_post_request (AdaptersCustomAttributesGlobalPostRequest): [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: + CustomAttributeApiResult + 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) + return self.adapters_custom_attributes_global_post_endpoint.call_with_http_info(**kwargs) + + def adapters_custom_attributes_id_get( + self, + id, + **kwargs + ): + """Get attribute by ID # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.adapters_custom_attributes_id_get(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): Unique ID of attribute + + 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: + CustomAttributeApiResult + 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['id'] = \ + id + return self.adapters_custom_attributes_id_get_endpoint.call_with_http_info(**kwargs) + + def adapters_custom_attributes_search_post( + self, + **kwargs + ): + """Search for attributes # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.adapters_custom_attributes_search_post(async_req=True) + >>> result = thread.get() + + + 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] + adapters_custom_attributes_search_post_request (AdaptersCustomAttributesSearchPostRequest): [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: + [CustomAttributeSearchApiResult] + 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) + return self.adapters_custom_attributes_search_post_endpoint.call_with_http_info(**kwargs) + diff --git a/testit-python-commons/src/adapters_api/apis/__init__.py b/testit-python-commons/src/adapters_api/apis/__init__.py index 37704dc..c0b6ce0 100644 --- a/testit-python-commons/src/adapters_api/apis/__init__.py +++ b/testit-python-commons/src/adapters_api/apis/__init__.py @@ -17,6 +17,7 @@ from adapters_api.api.attachments_api import AttachmentsApi from adapters_api.api.auto_tests_api import AutoTestsApi from adapters_api.api.configurations_api import ConfigurationsApi +from adapters_api.api.custom_attributes_api import CustomAttributesApi from adapters_api.api.parameters_api import ParametersApi from adapters_api.api.project_attributes_api import ProjectAttributesApi from adapters_api.api.project_sections_api import ProjectSectionsApi diff --git a/testit-python-commons/src/adapters_api/model/adapters_auto_tests_post_request.py b/testit-python-commons/src/adapters_api/model/adapters_auto_tests_post_request.py index d0ec235..a33da6e 100644 --- a/testit-python-commons/src/adapters_api/model/adapters_auto_tests_post_request.py +++ b/testit-python-commons/src/adapters_api/model/adapters_auto_tests_post_request.py @@ -31,10 +31,12 @@ def lazy_import(): from adapters_api.model.auto_test_create_api_model import AutoTestCreateApiModel + from adapters_api.model.auto_test_create_api_model_layer import AutoTestCreateApiModelLayer from adapters_api.model.auto_test_step_api_model import AutoTestStepApiModel from adapters_api.model.label_api_model import LabelApiModel from adapters_api.model.link_create_api_model import LinkCreateApiModel globals()['AutoTestCreateApiModel'] = AutoTestCreateApiModel + globals()['AutoTestCreateApiModelLayer'] = AutoTestCreateApiModelLayer globals()['AutoTestStepApiModel'] = AutoTestStepApiModel globals()['LabelApiModel'] = LabelApiModel globals()['LinkCreateApiModel'] = LinkCreateApiModel @@ -108,6 +110,7 @@ def openapi_types(): 'title': (str, none_type,), # noqa: E501 'description': (str, none_type,), # noqa: E501 'is_flaky': (bool, none_type,), # noqa: E501 + 'layer': (AutoTestCreateApiModelLayer,), # noqa: E501 'steps': ([AutoTestStepApiModel], none_type,), # noqa: E501 'setup': ([AutoTestStepApiModel], none_type,), # noqa: E501 'teardown': ([AutoTestStepApiModel], none_type,), # noqa: E501 @@ -132,6 +135,7 @@ def discriminator(): 'title': 'title', # noqa: E501 'description': 'description', # noqa: E501 'is_flaky': 'isFlaky', # noqa: E501 + 'layer': 'layer', # noqa: E501 'steps': 'steps', # noqa: E501 'setup': 'setup', # noqa: E501 'teardown': 'teardown', # noqa: E501 @@ -189,6 +193,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 title (str, none_type): Name of the autotest in autotest's card. [optional] # noqa: E501 description (str, none_type): Description of the autotest in autotest's card. [optional] # noqa: E501 is_flaky (bool, none_type): Indicates if the autotest is marked as flaky. [optional] # noqa: E501 + layer (AutoTestCreateApiModelLayer): [optional] # noqa: E501 steps ([AutoTestStepApiModel], none_type): Collection of the autotest steps. [optional] # noqa: E501 setup ([AutoTestStepApiModel], none_type): Collection of the autotest setup steps. [optional] # noqa: E501 teardown ([AutoTestStepApiModel], none_type): Collection of the autotest teardown steps. [optional] # noqa: E501 @@ -308,6 +313,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 title (str, none_type): Name of the autotest in autotest's card. [optional] # noqa: E501 description (str, none_type): Description of the autotest in autotest's card. [optional] # noqa: E501 is_flaky (bool, none_type): Indicates if the autotest is marked as flaky. [optional] # noqa: E501 + layer (AutoTestCreateApiModelLayer): [optional] # noqa: E501 steps ([AutoTestStepApiModel], none_type): Collection of the autotest steps. [optional] # noqa: E501 setup ([AutoTestStepApiModel], none_type): Collection of the autotest setup steps. [optional] # noqa: E501 teardown ([AutoTestStepApiModel], none_type): Collection of the autotest teardown steps. [optional] # noqa: E501 diff --git a/testit-python-commons/src/adapters_api/model/adapters_auto_tests_put_request.py b/testit-python-commons/src/adapters_api/model/adapters_auto_tests_put_request.py index 12449b9..4e22f7d 100644 --- a/testit-python-commons/src/adapters_api/model/adapters_auto_tests_put_request.py +++ b/testit-python-commons/src/adapters_api/model/adapters_auto_tests_put_request.py @@ -30,10 +30,12 @@ def lazy_import(): + from adapters_api.model.auto_test_create_api_model_layer import AutoTestCreateApiModelLayer from adapters_api.model.auto_test_step_api_model import AutoTestStepApiModel from adapters_api.model.auto_test_update_api_model import AutoTestUpdateApiModel from adapters_api.model.label_api_model import LabelApiModel from adapters_api.model.link_update_api_model import LinkUpdateApiModel + globals()['AutoTestCreateApiModelLayer'] = AutoTestCreateApiModelLayer globals()['AutoTestStepApiModel'] = AutoTestStepApiModel globals()['AutoTestUpdateApiModel'] = AutoTestUpdateApiModel globals()['LabelApiModel'] = LabelApiModel @@ -102,6 +104,7 @@ def openapi_types(): 'project_id': (str,), # noqa: E501 'external_id': (str,), # noqa: E501 'name': (str,), # noqa: E501 + 'reset_layer': (bool,), # noqa: E501 'id': (str, none_type,), # noqa: E501 'external_key': (str, none_type,), # noqa: E501 'namespace': (str, none_type,), # noqa: E501 @@ -109,6 +112,7 @@ def openapi_types(): 'title': (str, none_type,), # noqa: E501 'description': (str, none_type,), # noqa: E501 'is_flaky': (bool, none_type,), # noqa: E501 + 'layer': (AutoTestCreateApiModelLayer,), # noqa: E501 'steps': ([AutoTestStepApiModel], none_type,), # noqa: E501 'setup': ([AutoTestStepApiModel], none_type,), # noqa: E501 'teardown': ([AutoTestStepApiModel], none_type,), # noqa: E501 @@ -126,6 +130,7 @@ def discriminator(): 'project_id': 'projectId', # noqa: E501 'external_id': 'externalId', # noqa: E501 'name': 'name', # noqa: E501 + 'reset_layer': 'resetLayer', # noqa: E501 'id': 'id', # noqa: E501 'external_key': 'externalKey', # noqa: E501 'namespace': 'namespace', # noqa: E501 @@ -133,6 +138,7 @@ def discriminator(): 'title': 'title', # noqa: E501 'description': 'description', # noqa: E501 'is_flaky': 'isFlaky', # noqa: E501 + 'layer': 'layer', # noqa: E501 'steps': 'steps', # noqa: E501 'setup': 'setup', # noqa: E501 'teardown': 'teardown', # noqa: E501 @@ -153,6 +159,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 project_id (str): Unique ID of the autotest project external_id (str): External ID of the autotest name (str): Name of the autotest + reset_layer (bool): Indicates if the autotest layer should be reset. _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. @@ -190,6 +197,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 title (str, none_type): Name of the autotest in autotest's card. [optional] # noqa: E501 description (str, none_type): Description of the autotest in autotest's card. [optional] # noqa: E501 is_flaky (bool, none_type): Indicates if the autotest is marked as flaky. [optional] # noqa: E501 + layer (AutoTestCreateApiModelLayer): [optional] # noqa: E501 steps ([AutoTestStepApiModel], none_type): Collection of the autotest steps. [optional] # noqa: E501 setup ([AutoTestStepApiModel], none_type): Collection of the autotest setup steps. [optional] # noqa: E501 teardown ([AutoTestStepApiModel], none_type): Collection of the autotest teardown steps. [optional] # noqa: E501 @@ -272,6 +280,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 project_id (str): Unique ID of the autotest project external_id (str): External ID of the autotest name (str): Name of the autotest + reset_layer (bool): Indicates if the autotest layer should be reset. _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. @@ -309,6 +318,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 title (str, none_type): Name of the autotest in autotest's card. [optional] # noqa: E501 description (str, none_type): Description of the autotest in autotest's card. [optional] # noqa: E501 is_flaky (bool, none_type): Indicates if the autotest is marked as flaky. [optional] # noqa: E501 + layer (AutoTestCreateApiModelLayer): [optional] # noqa: E501 steps ([AutoTestStepApiModel], none_type): Collection of the autotest steps. [optional] # noqa: E501 setup ([AutoTestStepApiModel], none_type): Collection of the autotest setup steps. [optional] # noqa: E501 teardown ([AutoTestStepApiModel], none_type): Collection of the autotest teardown steps. [optional] # noqa: E501 diff --git a/testit-python-commons/src/adapters_api/model/adapters_custom_attributes_global_id_put_request.py b/testit-python-commons/src/adapters_api/model/adapters_custom_attributes_global_id_put_request.py new file mode 100644 index 0000000..99665f3 --- /dev/null +++ b/testit-python-commons/src/adapters_api/model/adapters_custom_attributes_global_id_put_request.py @@ -0,0 +1,337 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: adapters + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from adapters_api.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 adapters_api.exceptions import ApiAttributeError + + +def lazy_import(): + from adapters_api.model.custom_attribute_option_update_api_model import CustomAttributeOptionUpdateApiModel + from adapters_api.model.global_custom_attribute_update_api_model import GlobalCustomAttributeUpdateApiModel + globals()['CustomAttributeOptionUpdateApiModel'] = CustomAttributeOptionUpdateApiModel + globals()['GlobalCustomAttributeUpdateApiModel'] = GlobalCustomAttributeUpdateApiModel + + +class AdaptersCustomAttributesGlobalIdPutRequest(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, + }, + } + + @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,), # noqa: E501 + 'options': ([CustomAttributeOptionUpdateApiModel], none_type,), # noqa: E501 + 'is_enabled': (bool, none_type,), # noqa: E501 + 'is_required': (bool, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'options': 'options', # noqa: E501 + 'is_enabled': 'isEnabled', # noqa: E501 + 'is_required': 'isRequired', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdaptersCustomAttributesGlobalIdPutRequest - a model defined in OpenAPI + + Keyword Args: + name (str): Name of attribute + _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,) + options ([CustomAttributeOptionUpdateApiModel], none_type): Collection of attribute options Available for attributes of type `options` and `multiple options` only. [optional] # noqa: E501 + is_enabled (bool, none_type): Indicates whether the attribute is available. [optional] # noqa: E501 + is_required (bool, none_type): Indicates whether the attribute value is mandatory to specify. [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 + """AdaptersCustomAttributesGlobalIdPutRequest - a model defined in OpenAPI + + Keyword Args: + name (str): Name of attribute + _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,) + options ([CustomAttributeOptionUpdateApiModel], none_type): Collection of attribute options Available for attributes of type `options` and `multiple options` only. [optional] # noqa: E501 + is_enabled (bool, none_type): Indicates whether the attribute is available. [optional] # noqa: E501 + is_required (bool, none_type): Indicates whether the attribute value is mandatory to specify. [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': [ + GlobalCustomAttributeUpdateApiModel, + ], + 'oneOf': [ + ], + } diff --git a/testit-python-commons/src/adapters_api/model/adapters_custom_attributes_global_post_request.py b/testit-python-commons/src/adapters_api/model/adapters_custom_attributes_global_post_request.py new file mode 100644 index 0000000..5789612 --- /dev/null +++ b/testit-python-commons/src/adapters_api/model/adapters_custom_attributes_global_post_request.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: adapters + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from adapters_api.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 adapters_api.exceptions import ApiAttributeError + + +def lazy_import(): + from adapters_api.model.custom_attribute_option_post_api_model import CustomAttributeOptionPostApiModel + from adapters_api.model.custom_attribute_type import CustomAttributeType + from adapters_api.model.global_custom_attribute_post_api_model import GlobalCustomAttributePostApiModel + globals()['CustomAttributeOptionPostApiModel'] = CustomAttributeOptionPostApiModel + globals()['CustomAttributeType'] = CustomAttributeType + globals()['GlobalCustomAttributePostApiModel'] = GlobalCustomAttributePostApiModel + + +class AdaptersCustomAttributesGlobalPostRequest(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, + }, + } + + @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,), # noqa: E501 + 'type': (CustomAttributeType,), # noqa: E501 + 'is_enabled': (bool, none_type,), # noqa: E501 + 'is_required': (bool, none_type,), # noqa: E501 + 'options': ([CustomAttributeOptionPostApiModel], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'type': 'type', # noqa: E501 + 'is_enabled': 'isEnabled', # noqa: E501 + 'is_required': 'isRequired', # noqa: E501 + 'options': 'options', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdaptersCustomAttributesGlobalPostRequest - a model defined in OpenAPI + + Keyword Args: + name (str): Name of attribute + type (CustomAttributeType): + _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,) + is_enabled (bool, none_type): Indicates whether the attribute is available. [optional] # noqa: E501 + is_required (bool, none_type): Indicates whether the attribute value is mandatory to specify. [optional] # noqa: E501 + options ([CustomAttributeOptionPostApiModel], none_type): Collection of attribute options Available for attributes of type `options` and `multiple options` only. [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 + """AdaptersCustomAttributesGlobalPostRequest - a model defined in OpenAPI + + Keyword Args: + name (str): Name of attribute + type (CustomAttributeType): + _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,) + is_enabled (bool, none_type): Indicates whether the attribute is available. [optional] # noqa: E501 + is_required (bool, none_type): Indicates whether the attribute value is mandatory to specify. [optional] # noqa: E501 + options ([CustomAttributeOptionPostApiModel], none_type): Collection of attribute options Available for attributes of type `options` and `multiple options` only. [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': [ + GlobalCustomAttributePostApiModel, + ], + 'oneOf': [ + ], + } diff --git a/testit-python-commons/src/adapters_api/model/adapters_custom_attributes_search_post_request.py b/testit-python-commons/src/adapters_api/model/adapters_custom_attributes_search_post_request.py new file mode 100644 index 0000000..21e0ce1 --- /dev/null +++ b/testit-python-commons/src/adapters_api/model/adapters_custom_attributes_search_post_request.py @@ -0,0 +1,351 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: adapters + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from adapters_api.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 adapters_api.exceptions import ApiAttributeError + + +def lazy_import(): + from adapters_api.model.custom_attribute_search_api_model import CustomAttributeSearchApiModel + from adapters_api.model.custom_attribute_type import CustomAttributeType + globals()['CustomAttributeSearchApiModel'] = CustomAttributeSearchApiModel + globals()['CustomAttributeType'] = CustomAttributeType + + +class AdaptersCustomAttributesSearchPostRequest(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, + }, + ('project_ids',): { + }, + ('custom_attribute_ids',): { + }, + ('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 + 'project_ids': ([str], none_type,), # noqa: E501 + 'custom_attribute_ids': ([str], none_type,), # noqa: E501 + 'custom_attribute_types': ([CustomAttributeType], none_type,), # noqa: E501 + 'is_global': (bool, none_type,), # noqa: E501 + 'is_deleted': (bool, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'project_ids': 'projectIds', # noqa: E501 + 'custom_attribute_ids': 'customAttributeIds', # noqa: E501 + 'custom_attribute_types': 'customAttributeTypes', # noqa: E501 + 'is_global': 'isGlobal', # 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 + """AdaptersCustomAttributesSearchPostRequest - 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 attribute. [optional] # noqa: E501 + project_ids ([str], none_type): Unique IDs of projects where attribute is in use. [optional] # noqa: E501 + custom_attribute_ids ([str], none_type): Unique IDs of attributes for search restriction. [optional] # noqa: E501 + custom_attribute_types ([CustomAttributeType], none_type): Collection of attribute types. [optional] # noqa: E501 + is_global (bool, none_type): Indicates whether the attribute is available across all projects. [optional] # noqa: E501 + is_deleted (bool, none_type): Indicates whether the attribute is deleted. [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 + """AdaptersCustomAttributesSearchPostRequest - 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 attribute. [optional] # noqa: E501 + project_ids ([str], none_type): Unique IDs of projects where attribute is in use. [optional] # noqa: E501 + custom_attribute_ids ([str], none_type): Unique IDs of attributes for search restriction. [optional] # noqa: E501 + custom_attribute_types ([CustomAttributeType], none_type): Collection of attribute types. [optional] # noqa: E501 + is_global (bool, none_type): Indicates whether the attribute is available across all projects. [optional] # noqa: E501 + is_deleted (bool, none_type): Indicates whether the attribute is deleted. [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': [ + CustomAttributeSearchApiModel, + ], + 'oneOf': [ + ], + } diff --git a/testit-python-commons/src/adapters_api/model/adapters_test_results_search_post_request.py b/testit-python-commons/src/adapters_api/model/adapters_test_results_search_post_request.py index 467ebe4..2a4ff88 100644 --- a/testit-python-commons/src/adapters_api/model/adapters_test_results_search_post_request.py +++ b/testit-python-commons/src/adapters_api/model/adapters_test_results_search_post_request.py @@ -30,10 +30,12 @@ def lazy_import(): + from adapters_api.model.failure_category_model import FailureCategoryModel from adapters_api.model.test_result_outcome import TestResultOutcome from adapters_api.model.test_results_filter_api_model import TestResultsFilterApiModel from adapters_api.model.test_results_filter_api_model_duration import TestResultsFilterApiModelDuration from adapters_api.model.test_status_api_type import TestStatusApiType + globals()['FailureCategoryModel'] = FailureCategoryModel globals()['TestResultOutcome'] = TestResultOutcome globals()['TestResultsFilterApiModel'] = TestResultsFilterApiModel globals()['TestResultsFilterApiModelDuration'] = TestResultsFilterApiModelDuration @@ -105,6 +107,7 @@ def openapi_types(): 'outcomes': ([TestResultOutcome], none_type,), # noqa: E501 'status_codes': ([str], none_type,), # noqa: E501 'status_types': ([TestStatusApiType], none_type,), # noqa: E501 + 'failure_categories': ([FailureCategoryModel], none_type,), # noqa: E501 'namespace': (str, none_type,), # noqa: E501 'class_name': (str, none_type,), # noqa: E501 'auto_test_global_ids': ([int], none_type,), # noqa: E501 @@ -125,6 +128,7 @@ def discriminator(): 'outcomes': 'outcomes', # noqa: E501 'status_codes': 'statusCodes', # noqa: E501 'status_types': 'statusTypes', # noqa: E501 + 'failure_categories': 'failureCategories', # noqa: E501 'namespace': 'namespace', # noqa: E501 'class_name': 'className', # noqa: E501 'auto_test_global_ids': 'autoTestGlobalIds', # noqa: E501 @@ -178,6 +182,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 outcomes ([TestResultOutcome], none_type): Specifies a test result outcomes to search for. [optional] # noqa: E501 status_codes ([str], none_type): Specifies a test result status codes to search for. [optional] # noqa: E501 status_types ([TestStatusApiType], none_type): Specifies a test result status types to search for. [optional] # noqa: E501 + failure_categories ([FailureCategoryModel], none_type): Specifies a test result failure categories to search for. [optional] # noqa: E501 namespace (str, none_type): Specifies a test result namespace to search for. [optional] # noqa: E501 class_name (str, none_type): Specifies a test result class name to search for. [optional] # noqa: E501 auto_test_global_ids ([int], none_type): Specifies an autotest global IDs to search results for. [optional] # noqa: E501 @@ -293,6 +298,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 outcomes ([TestResultOutcome], none_type): Specifies a test result outcomes to search for. [optional] # noqa: E501 status_codes ([str], none_type): Specifies a test result status codes to search for. [optional] # noqa: E501 status_types ([TestStatusApiType], none_type): Specifies a test result status types to search for. [optional] # noqa: E501 + failure_categories ([FailureCategoryModel], none_type): Specifies a test result failure categories to search for. [optional] # noqa: E501 namespace (str, none_type): Specifies a test result namespace to search for. [optional] # noqa: E501 class_name (str, none_type): Specifies a test result class name to search for. [optional] # noqa: E501 auto_test_global_ids ([int], none_type): Specifies an autotest global IDs to search results for. [optional] # noqa: E501 diff --git a/testit-python-commons/src/adapters_api/model/auto_test_api_result.py b/testit-python-commons/src/adapters_api/model/auto_test_api_result.py index 198061c..f6ad966 100644 --- a/testit-python-commons/src/adapters_api/model/auto_test_api_result.py +++ b/testit-python-commons/src/adapters_api/model/auto_test_api_result.py @@ -30,9 +30,11 @@ def lazy_import(): + from adapters_api.model.auto_test_api_result_layer import AutoTestApiResultLayer from adapters_api.model.auto_test_step_api_result import AutoTestStepApiResult from adapters_api.model.label_api_result import LabelApiResult from adapters_api.model.link_api_result import LinkApiResult + globals()['AutoTestApiResultLayer'] = AutoTestApiResultLayer globals()['AutoTestStepApiResult'] = AutoTestStepApiResult globals()['LabelApiResult'] = LabelApiResult globals()['LinkApiResult'] = LinkApiResult @@ -98,6 +100,7 @@ def openapi_types(): 'title': (str, none_type,), # noqa: E501 'description': (str, none_type,), # noqa: E501 'external_key': (str, none_type,), # noqa: E501 + 'layer': (AutoTestApiResultLayer,), # noqa: E501 'links': ([LinkApiResult], none_type,), # noqa: E501 'labels': ([LabelApiResult], none_type,), # noqa: E501 'tags': ([str], none_type,), # noqa: E501 @@ -123,6 +126,7 @@ def discriminator(): 'title': 'title', # noqa: E501 'description': 'description', # noqa: E501 'external_key': 'externalKey', # noqa: E501 + 'layer': 'layer', # noqa: E501 'links': 'links', # noqa: E501 'labels': 'labels', # noqa: E501 'tags': 'tags', # noqa: E501 @@ -185,6 +189,7 @@ def _from_openapi_data(cls, id, project_id, name, is_flaky, global_id, *args, ** title (str, none_type): [optional] # noqa: E501 description (str, none_type): [optional] # noqa: E501 external_key (str, none_type): [optional] # noqa: E501 + layer (AutoTestApiResultLayer): [optional] # noqa: E501 links ([LinkApiResult], none_type): [optional] # noqa: E501 labels ([LabelApiResult], none_type): [optional] # noqa: E501 tags ([str], none_type): [optional] # noqa: E501 @@ -294,6 +299,7 @@ def __init__(self, id, project_id, name, is_flaky, global_id, *args, **kwargs): title (str, none_type): [optional] # noqa: E501 description (str, none_type): [optional] # noqa: E501 external_key (str, none_type): [optional] # noqa: E501 + layer (AutoTestApiResultLayer): [optional] # noqa: E501 links ([LinkApiResult], none_type): [optional] # noqa: E501 labels ([LabelApiResult], none_type): [optional] # noqa: E501 tags ([str], none_type): [optional] # noqa: E501 diff --git a/testit-python-commons/src/adapters_api/model/auto_test_api_result_layer.py b/testit-python-commons/src/adapters_api/model/auto_test_api_result_layer.py new file mode 100644 index 0000000..a2769d9 --- /dev/null +++ b/testit-python-commons/src/adapters_api/model/auto_test_api_result_layer.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: adapters + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from adapters_api.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 adapters_api.exceptions import ApiAttributeError + + +def lazy_import(): + from adapters_api.model.layer_api_result import LayerApiResult + from adapters_api.model.layer_source import LayerSource + globals()['LayerApiResult'] = LayerApiResult + globals()['LayerSource'] = LayerSource + + +class AutoTestApiResultLayer(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 { + 'name': (str,), # noqa: E501 + 'source': (LayerSource,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'source': 'source', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AutoTestApiResultLayer - a model defined in OpenAPI + + Keyword Args: + name (str): Name of the test pyramid layer. + source (LayerSource): + _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 + """AutoTestApiResultLayer - a model defined in OpenAPI + + Keyword Args: + name (str): Name of the test pyramid layer. + source (LayerSource): + _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': [ + LayerApiResult, + ], + 'oneOf': [ + ], + } diff --git a/testit-python-commons/src/adapters_api/model/auto_test_create_api_model.py b/testit-python-commons/src/adapters_api/model/auto_test_create_api_model.py index 51a0635..b3f3a90 100644 --- a/testit-python-commons/src/adapters_api/model/auto_test_create_api_model.py +++ b/testit-python-commons/src/adapters_api/model/auto_test_create_api_model.py @@ -30,9 +30,11 @@ def lazy_import(): + from adapters_api.model.auto_test_create_api_model_layer import AutoTestCreateApiModelLayer from adapters_api.model.auto_test_step_api_model import AutoTestStepApiModel from adapters_api.model.label_api_model import LabelApiModel from adapters_api.model.link_create_api_model import LinkCreateApiModel + globals()['AutoTestCreateApiModelLayer'] = AutoTestCreateApiModelLayer globals()['AutoTestStepApiModel'] = AutoTestStepApiModel globals()['LabelApiModel'] = LabelApiModel globals()['LinkCreateApiModel'] = LinkCreateApiModel @@ -99,6 +101,7 @@ def openapi_types(): 'title': (str, none_type,), # noqa: E501 'description': (str, none_type,), # noqa: E501 'is_flaky': (bool, none_type,), # noqa: E501 + 'layer': (AutoTestCreateApiModelLayer,), # noqa: E501 'steps': ([AutoTestStepApiModel], none_type,), # noqa: E501 'setup': ([AutoTestStepApiModel], none_type,), # noqa: E501 'teardown': ([AutoTestStepApiModel], none_type,), # noqa: E501 @@ -123,6 +126,7 @@ def discriminator(): 'title': 'title', # noqa: E501 'description': 'description', # noqa: E501 'is_flaky': 'isFlaky', # noqa: E501 + 'layer': 'layer', # noqa: E501 'steps': 'steps', # noqa: E501 'setup': 'setup', # noqa: E501 'teardown': 'teardown', # noqa: E501 @@ -184,6 +188,7 @@ def _from_openapi_data(cls, project_id, external_id, name, *args, **kwargs): # title (str, none_type): Name of the autotest in autotest's card. [optional] # noqa: E501 description (str, none_type): Description of the autotest in autotest's card. [optional] # noqa: E501 is_flaky (bool, none_type): Indicates if the autotest is marked as flaky. [optional] # noqa: E501 + layer (AutoTestCreateApiModelLayer): [optional] # noqa: E501 steps ([AutoTestStepApiModel], none_type): Collection of the autotest steps. [optional] # noqa: E501 setup ([AutoTestStepApiModel], none_type): Collection of the autotest setup steps. [optional] # noqa: E501 teardown ([AutoTestStepApiModel], none_type): Collection of the autotest teardown steps. [optional] # noqa: E501 @@ -290,6 +295,7 @@ def __init__(self, project_id, external_id, name, *args, **kwargs): # noqa: E50 title (str, none_type): Name of the autotest in autotest's card. [optional] # noqa: E501 description (str, none_type): Description of the autotest in autotest's card. [optional] # noqa: E501 is_flaky (bool, none_type): Indicates if the autotest is marked as flaky. [optional] # noqa: E501 + layer (AutoTestCreateApiModelLayer): [optional] # noqa: E501 steps ([AutoTestStepApiModel], none_type): Collection of the autotest steps. [optional] # noqa: E501 setup ([AutoTestStepApiModel], none_type): Collection of the autotest setup steps. [optional] # noqa: E501 teardown ([AutoTestStepApiModel], none_type): Collection of the autotest teardown steps. [optional] # noqa: E501 diff --git a/testit-python-commons/src/adapters_api/model/auto_test_create_api_model_layer.py b/testit-python-commons/src/adapters_api/model/auto_test_create_api_model_layer.py new file mode 100644 index 0000000..a1592f5 --- /dev/null +++ b/testit-python-commons/src/adapters_api/model/auto_test_create_api_model_layer.py @@ -0,0 +1,328 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: adapters + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from adapters_api.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 adapters_api.exceptions import ApiAttributeError + + +def lazy_import(): + from adapters_api.model.layer_api_model import LayerApiModel + from adapters_api.model.layer_source import LayerSource + globals()['LayerApiModel'] = LayerApiModel + globals()['LayerSource'] = LayerSource + + +class AutoTestCreateApiModelLayer(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',): { + 'min_length': 1, + }, + } + + @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,), # noqa: E501 + 'source': (LayerSource,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'source': 'source', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AutoTestCreateApiModelLayer - a model defined in OpenAPI + + Keyword Args: + name (str): Name of the test pyramid layer. Available layers: * Unit * Component * API * UI * E2E * Contract + source (LayerSource): + _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 + """AutoTestCreateApiModelLayer - a model defined in OpenAPI + + Keyword Args: + name (str): Name of the test pyramid layer. Available layers: * Unit * Component * API * UI * E2E * Contract + source (LayerSource): + _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': [ + LayerApiModel, + ], + 'oneOf': [ + ], + } diff --git a/testit-python-commons/src/adapters_api/model/auto_test_update_api_model.py b/testit-python-commons/src/adapters_api/model/auto_test_update_api_model.py index 6315309..9c4fd29 100644 --- a/testit-python-commons/src/adapters_api/model/auto_test_update_api_model.py +++ b/testit-python-commons/src/adapters_api/model/auto_test_update_api_model.py @@ -30,9 +30,11 @@ def lazy_import(): + from adapters_api.model.auto_test_create_api_model_layer import AutoTestCreateApiModelLayer from adapters_api.model.auto_test_step_api_model import AutoTestStepApiModel from adapters_api.model.label_api_model import LabelApiModel from adapters_api.model.link_update_api_model import LinkUpdateApiModel + globals()['AutoTestCreateApiModelLayer'] = AutoTestCreateApiModelLayer globals()['AutoTestStepApiModel'] = AutoTestStepApiModel globals()['LabelApiModel'] = LabelApiModel globals()['LinkUpdateApiModel'] = LinkUpdateApiModel @@ -93,6 +95,7 @@ def openapi_types(): 'project_id': (str,), # noqa: E501 'external_id': (str,), # noqa: E501 'name': (str,), # noqa: E501 + 'reset_layer': (bool,), # noqa: E501 'id': (str, none_type,), # noqa: E501 'external_key': (str, none_type,), # noqa: E501 'namespace': (str, none_type,), # noqa: E501 @@ -100,6 +103,7 @@ def openapi_types(): 'title': (str, none_type,), # noqa: E501 'description': (str, none_type,), # noqa: E501 'is_flaky': (bool, none_type,), # noqa: E501 + 'layer': (AutoTestCreateApiModelLayer,), # noqa: E501 'steps': ([AutoTestStepApiModel], none_type,), # noqa: E501 'setup': ([AutoTestStepApiModel], none_type,), # noqa: E501 'teardown': ([AutoTestStepApiModel], none_type,), # noqa: E501 @@ -117,6 +121,7 @@ def discriminator(): 'project_id': 'projectId', # noqa: E501 'external_id': 'externalId', # noqa: E501 'name': 'name', # noqa: E501 + 'reset_layer': 'resetLayer', # noqa: E501 'id': 'id', # noqa: E501 'external_key': 'externalKey', # noqa: E501 'namespace': 'namespace', # noqa: E501 @@ -124,6 +129,7 @@ def discriminator(): 'title': 'title', # noqa: E501 'description': 'description', # noqa: E501 'is_flaky': 'isFlaky', # noqa: E501 + 'layer': 'layer', # noqa: E501 'steps': 'steps', # noqa: E501 'setup': 'setup', # noqa: E501 'teardown': 'teardown', # noqa: E501 @@ -139,13 +145,14 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, project_id, external_id, name, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, project_id, external_id, name, reset_layer, *args, **kwargs): # noqa: E501 """AutoTestUpdateApiModel - a model defined in OpenAPI Args: project_id (str): Unique ID of the autotest project external_id (str): External ID of the autotest name (str): Name of the autotest + reset_layer (bool): Indicates if the autotest layer should be reset. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -185,6 +192,7 @@ def _from_openapi_data(cls, project_id, external_id, name, *args, **kwargs): # title (str, none_type): Name of the autotest in autotest's card. [optional] # noqa: E501 description (str, none_type): Description of the autotest in autotest's card. [optional] # noqa: E501 is_flaky (bool, none_type): Indicates if the autotest is marked as flaky. [optional] # noqa: E501 + layer (AutoTestCreateApiModelLayer): [optional] # noqa: E501 steps ([AutoTestStepApiModel], none_type): Collection of the autotest steps. [optional] # noqa: E501 setup ([AutoTestStepApiModel], none_type): Collection of the autotest setup steps. [optional] # noqa: E501 teardown ([AutoTestStepApiModel], none_type): Collection of the autotest teardown steps. [optional] # noqa: E501 @@ -225,6 +233,7 @@ def _from_openapi_data(cls, project_id, external_id, name, *args, **kwargs): # self.project_id = project_id self.external_id = external_id self.name = name + self.reset_layer = reset_layer for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ @@ -245,13 +254,14 @@ def _from_openapi_data(cls, project_id, external_id, name, *args, **kwargs): # ]) @convert_js_args_to_python_args - def __init__(self, project_id, external_id, name, *args, **kwargs): # noqa: E501 + def __init__(self, project_id, external_id, name, reset_layer, *args, **kwargs): # noqa: E501 """AutoTestUpdateApiModel - a model defined in OpenAPI Args: project_id (str): Unique ID of the autotest project external_id (str): External ID of the autotest name (str): Name of the autotest + reset_layer (bool): Indicates if the autotest layer should be reset. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -291,6 +301,7 @@ def __init__(self, project_id, external_id, name, *args, **kwargs): # noqa: E50 title (str, none_type): Name of the autotest in autotest's card. [optional] # noqa: E501 description (str, none_type): Description of the autotest in autotest's card. [optional] # noqa: E501 is_flaky (bool, none_type): Indicates if the autotest is marked as flaky. [optional] # noqa: E501 + layer (AutoTestCreateApiModelLayer): [optional] # noqa: E501 steps ([AutoTestStepApiModel], none_type): Collection of the autotest steps. [optional] # noqa: E501 setup ([AutoTestStepApiModel], none_type): Collection of the autotest setup steps. [optional] # noqa: E501 teardown ([AutoTestStepApiModel], none_type): Collection of the autotest teardown steps. [optional] # noqa: E501 @@ -329,6 +340,7 @@ def __init__(self, project_id, external_id, name, *args, **kwargs): # noqa: E50 self.project_id = project_id self.external_id = external_id self.name = name + self.reset_layer = reset_layer for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/testit-python-commons/src/adapters_api/model/custom_attribute_api_result.py b/testit-python-commons/src/adapters_api/model/custom_attribute_api_result.py index b27ef54..cbe557d 100644 --- a/testit-python-commons/src/adapters_api/model/custom_attribute_api_result.py +++ b/testit-python-commons/src/adapters_api/model/custom_attribute_api_result.py @@ -90,6 +90,10 @@ def openapi_types(): 'is_enabled': (bool,), # noqa: E501 'is_required': (bool,), # noqa: E501 'is_global': (bool,), # noqa: E501 + 'is_read_only': (bool,), # noqa: E501 + 'is_system': (bool,), # noqa: E501 + 'targets': ([str],), # noqa: E501 + 'code': (str, none_type,), # noqa: E501 } @cached_property @@ -106,6 +110,10 @@ def discriminator(): 'is_enabled': 'isEnabled', # noqa: E501 'is_required': 'isRequired', # noqa: E501 'is_global': 'isGlobal', # noqa: E501 + 'is_read_only': 'isReadOnly', # noqa: E501 + 'is_system': 'isSystem', # noqa: E501 + 'targets': 'targets', # noqa: E501 + 'code': 'code', # noqa: E501 } read_only_vars = { @@ -115,7 +123,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, id, options, type, is_deleted, name, is_enabled, is_required, is_global, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, id, options, type, is_deleted, name, is_enabled, is_required, is_global, is_read_only, is_system, targets, *args, **kwargs): # noqa: E501 """CustomAttributeApiResult - a model defined in OpenAPI Args: @@ -127,6 +135,9 @@ def _from_openapi_data(cls, id, options, type, is_deleted, name, is_enabled, is_ is_enabled (bool): Indicates if the attribute is enabled is_required (bool): Indicates if the attribute value is mandatory to specify is_global (bool): Indicates if the attribute is available across all projects + is_read_only (bool): Indicates if the attribute is read-only + is_system (bool): Indicates if the attribute is system + targets ([str]): Collection of the attribute targets Defines where the attribute can be used (e.g., TestCases, AutoTestCases, TestPlans) Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -159,6 +170,7 @@ def _from_openapi_data(cls, id, options, type, is_deleted, name, is_enabled, is_ Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + code (str, none_type): Optional code identifier for the attribute. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -198,6 +210,9 @@ def _from_openapi_data(cls, id, options, type, is_deleted, name, is_enabled, is_ self.is_enabled = is_enabled self.is_required = is_required self.is_global = is_global + self.is_read_only = is_read_only + self.is_system = is_system + self.targets = targets for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ @@ -218,7 +233,7 @@ def _from_openapi_data(cls, id, options, type, is_deleted, name, is_enabled, is_ ]) @convert_js_args_to_python_args - def __init__(self, id, options, type, is_deleted, name, is_enabled, is_required, is_global, *args, **kwargs): # noqa: E501 + def __init__(self, id, options, type, is_deleted, name, is_enabled, is_required, is_global, is_read_only, is_system, targets, *args, **kwargs): # noqa: E501 """CustomAttributeApiResult - a model defined in OpenAPI Args: @@ -230,6 +245,9 @@ def __init__(self, id, options, type, is_deleted, name, is_enabled, is_required, is_enabled (bool): Indicates if the attribute is enabled is_required (bool): Indicates if the attribute value is mandatory to specify is_global (bool): Indicates if the attribute is available across all projects + is_read_only (bool): Indicates if the attribute is read-only + is_system (bool): Indicates if the attribute is system + targets ([str]): Collection of the attribute targets Defines where the attribute can be used (e.g., TestCases, AutoTestCases, TestPlans) Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -262,6 +280,7 @@ def __init__(self, id, options, type, is_deleted, name, is_enabled, is_required, Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + code (str, none_type): Optional code identifier for the attribute. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -299,6 +318,9 @@ def __init__(self, id, options, type, is_deleted, name, is_enabled, is_required, self.is_enabled = is_enabled self.is_required = is_required self.is_global = is_global + self.is_read_only = is_read_only + self.is_system = is_system + self.targets = targets for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/testit-python-commons/src/adapters_api/model/custom_attribute_option_post_api_model.py b/testit-python-commons/src/adapters_api/model/custom_attribute_option_post_api_model.py new file mode 100644 index 0000000..5af3723 --- /dev/null +++ b/testit-python-commons/src/adapters_api/model/custom_attribute_option_post_api_model.py @@ -0,0 +1,271 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: adapters + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from adapters_api.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 adapters_api.exceptions import ApiAttributeError + + + +class CustomAttributeOptionPostApiModel(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 = { + ('value',): { + 'max_length': 1024, + 'min_length': 0, + }, + } + + 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 { + 'is_default': (bool,), # noqa: E501 + 'value': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'is_default': 'isDefault', # noqa: E501 + 'value': 'value', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, is_default, *args, **kwargs): # noqa: E501 + """CustomAttributeOptionPostApiModel - a model defined in OpenAPI + + Args: + is_default (bool): Indicates if the attribute option is used by default + + 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,) + value (str, none_type): Value of the attribute option. [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.is_default = is_default + 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, is_default, *args, **kwargs): # noqa: E501 + """CustomAttributeOptionPostApiModel - a model defined in OpenAPI + + Args: + is_default (bool): Indicates if the attribute option is used by default + + 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,) + value (str, none_type): Value of the attribute option. [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.is_default = is_default + 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/testit-python-commons/src/adapters_api/model/custom_attribute_option_update_api_model.py b/testit-python-commons/src/adapters_api/model/custom_attribute_option_update_api_model.py new file mode 100644 index 0000000..84f7833 --- /dev/null +++ b/testit-python-commons/src/adapters_api/model/custom_attribute_option_update_api_model.py @@ -0,0 +1,283 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: adapters + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from adapters_api.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 adapters_api.exceptions import ApiAttributeError + + + +class CustomAttributeOptionUpdateApiModel(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 = { + ('value',): { + 'max_length': 1024, + 'min_length': 0, + }, + } + + 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 { + 'id': (str,), # noqa: E501 + 'is_default': (bool,), # noqa: E501 + 'is_deleted': (bool,), # noqa: E501 + 'value': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'is_default': 'isDefault', # noqa: E501 + 'is_deleted': 'isDeleted', # noqa: E501 + 'value': 'value', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, is_default, is_deleted, *args, **kwargs): # noqa: E501 + """CustomAttributeOptionUpdateApiModel - a model defined in OpenAPI + + Args: + id (str): Unique ID of the attribute option + is_default (bool): Indicates if the attribute option is used by default + is_deleted (bool): Indicates if the attributes option is deleted + + 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,) + value (str, none_type): Value of the attribute option. [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.id = id + self.is_default = is_default + self.is_deleted = is_deleted + 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, id, is_default, is_deleted, *args, **kwargs): # noqa: E501 + """CustomAttributeOptionUpdateApiModel - a model defined in OpenAPI + + Args: + id (str): Unique ID of the attribute option + is_default (bool): Indicates if the attribute option is used by default + is_deleted (bool): Indicates if the attributes option is deleted + + 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,) + value (str, none_type): Value of the attribute option. [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.id = id + self.is_default = is_default + self.is_deleted = is_deleted + 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/testit-python-commons/src/adapters_api/model/custom_attribute_search_api_model.py b/testit-python-commons/src/adapters_api/model/custom_attribute_search_api_model.py new file mode 100644 index 0000000..0bae689 --- /dev/null +++ b/testit-python-commons/src/adapters_api/model/custom_attribute_search_api_model.py @@ -0,0 +1,292 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: adapters + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from adapters_api.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 adapters_api.exceptions import ApiAttributeError + + +def lazy_import(): + from adapters_api.model.custom_attribute_type import CustomAttributeType + globals()['CustomAttributeType'] = CustomAttributeType + + +class CustomAttributeSearchApiModel(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, + }, + ('project_ids',): { + }, + ('custom_attribute_ids',): { + }, + ('custom_attribute_types',): { + }, + } + + 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 + 'project_ids': ([str], none_type,), # noqa: E501 + 'custom_attribute_ids': ([str], none_type,), # noqa: E501 + 'custom_attribute_types': ([CustomAttributeType], none_type,), # noqa: E501 + 'is_global': (bool, none_type,), # noqa: E501 + 'is_deleted': (bool, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'project_ids': 'projectIds', # noqa: E501 + 'custom_attribute_ids': 'customAttributeIds', # noqa: E501 + 'custom_attribute_types': 'customAttributeTypes', # noqa: E501 + 'is_global': 'isGlobal', # noqa: E501 + 'is_deleted': 'isDeleted', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CustomAttributeSearchApiModel - 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 attribute. [optional] # noqa: E501 + project_ids ([str], none_type): Unique IDs of projects where attribute is in use. [optional] # noqa: E501 + custom_attribute_ids ([str], none_type): Unique IDs of attributes for search restriction. [optional] # noqa: E501 + custom_attribute_types ([CustomAttributeType], none_type): Collection of attribute types. [optional] # noqa: E501 + is_global (bool, none_type): Indicates whether the attribute is available across all projects. [optional] # noqa: E501 + is_deleted (bool, none_type): Indicates whether the attribute is deleted. [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 + """CustomAttributeSearchApiModel - 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 attribute. [optional] # noqa: E501 + project_ids ([str], none_type): Unique IDs of projects where attribute is in use. [optional] # noqa: E501 + custom_attribute_ids ([str], none_type): Unique IDs of attributes for search restriction. [optional] # noqa: E501 + custom_attribute_types ([CustomAttributeType], none_type): Collection of attribute types. [optional] # noqa: E501 + is_global (bool, none_type): Indicates whether the attribute is available across all projects. [optional] # noqa: E501 + is_deleted (bool, none_type): Indicates whether the attribute is deleted. [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/testit-python-commons/src/adapters_api/model/custom_attribute_search_api_result.py b/testit-python-commons/src/adapters_api/model/custom_attribute_search_api_result.py new file mode 100644 index 0000000..3d27f81 --- /dev/null +++ b/testit-python-commons/src/adapters_api/model/custom_attribute_search_api_result.py @@ -0,0 +1,348 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: adapters + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from adapters_api.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 adapters_api.exceptions import ApiAttributeError + + +def lazy_import(): + from adapters_api.model.custom_attribute_option_api_result import CustomAttributeOptionApiResult + from adapters_api.model.custom_attribute_type import CustomAttributeType + from adapters_api.model.project_shortest_api_result import ProjectShortestApiResult + globals()['CustomAttributeOptionApiResult'] = CustomAttributeOptionApiResult + globals()['CustomAttributeType'] = CustomAttributeType + globals()['ProjectShortestApiResult'] = ProjectShortestApiResult + + +class CustomAttributeSearchApiResult(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 { + 'work_item_usage': ([ProjectShortestApiResult],), # noqa: E501 + 'test_plan_usage': ([ProjectShortestApiResult],), # noqa: E501 + 'id': (str,), # noqa: E501 + 'options': ([CustomAttributeOptionApiResult],), # noqa: E501 + 'type': (CustomAttributeType,), # noqa: E501 + 'is_deleted': (bool,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'is_enabled': (bool,), # noqa: E501 + 'is_required': (bool,), # noqa: E501 + 'is_global': (bool,), # noqa: E501 + 'is_read_only': (bool,), # noqa: E501 + 'is_system': (bool,), # noqa: E501 + 'targets': ([str],), # noqa: E501 + 'code': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'work_item_usage': 'workItemUsage', # noqa: E501 + 'test_plan_usage': 'testPlanUsage', # noqa: E501 + 'id': 'id', # noqa: E501 + 'options': 'options', # noqa: E501 + 'type': 'type', # noqa: E501 + 'is_deleted': 'isDeleted', # noqa: E501 + 'name': 'name', # noqa: E501 + 'is_enabled': 'isEnabled', # noqa: E501 + 'is_required': 'isRequired', # noqa: E501 + 'is_global': 'isGlobal', # noqa: E501 + 'is_read_only': 'isReadOnly', # noqa: E501 + 'is_system': 'isSystem', # noqa: E501 + 'targets': 'targets', # noqa: E501 + 'code': 'code', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, work_item_usage, test_plan_usage, id, options, type, is_deleted, name, is_enabled, is_required, is_global, is_read_only, is_system, targets, *args, **kwargs): # noqa: E501 + """CustomAttributeSearchApiResult - a model defined in OpenAPI + + Args: + work_item_usage ([ProjectShortestApiResult]): Projects where attribute is used in work items + test_plan_usage ([ProjectShortestApiResult]): Projects where attribute is used in test plans + id (str): Unique ID of the attribute + options ([CustomAttributeOptionApiResult]): Collection of the attribute options Available for attributes of type `options` and `multiple options` only + type (CustomAttributeType): + is_deleted (bool): Indicates if the attribute is deleted + name (str): Name of the attribute + is_enabled (bool): Indicates if the attribute is enabled + is_required (bool): Indicates if the attribute value is mandatory to specify + is_global (bool): Indicates if the attribute is available across all projects + is_read_only (bool): Indicates if the attribute is read-only + is_system (bool): Indicates if the attribute is system + targets ([str]): Collection of the attribute targets Defines where the attribute can be used (e.g., TestCases, AutoTestCases, TestPlans) + + 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,) + code (str, none_type): Optional code identifier for the attribute. [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.work_item_usage = work_item_usage + self.test_plan_usage = test_plan_usage + self.id = id + self.options = options + self.type = type + self.is_deleted = is_deleted + self.name = name + self.is_enabled = is_enabled + self.is_required = is_required + self.is_global = is_global + self.is_read_only = is_read_only + self.is_system = is_system + self.targets = targets + 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, work_item_usage, test_plan_usage, id, options, type, is_deleted, name, is_enabled, is_required, is_global, is_read_only, is_system, targets, *args, **kwargs): # noqa: E501 + """CustomAttributeSearchApiResult - a model defined in OpenAPI + + Args: + work_item_usage ([ProjectShortestApiResult]): Projects where attribute is used in work items + test_plan_usage ([ProjectShortestApiResult]): Projects where attribute is used in test plans + id (str): Unique ID of the attribute + options ([CustomAttributeOptionApiResult]): Collection of the attribute options Available for attributes of type `options` and `multiple options` only + type (CustomAttributeType): + is_deleted (bool): Indicates if the attribute is deleted + name (str): Name of the attribute + is_enabled (bool): Indicates if the attribute is enabled + is_required (bool): Indicates if the attribute value is mandatory to specify + is_global (bool): Indicates if the attribute is available across all projects + is_read_only (bool): Indicates if the attribute is read-only + is_system (bool): Indicates if the attribute is system + targets ([str]): Collection of the attribute targets Defines where the attribute can be used (e.g., TestCases, AutoTestCases, TestPlans) + + 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,) + code (str, none_type): Optional code identifier for the attribute. [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.work_item_usage = work_item_usage + self.test_plan_usage = test_plan_usage + self.id = id + self.options = options + self.type = type + self.is_deleted = is_deleted + self.name = name + self.is_enabled = is_enabled + self.is_required = is_required + self.is_global = is_global + self.is_read_only = is_read_only + self.is_system = is_system + self.targets = targets + 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/testit-python-commons/src/adapters_api/model/global_custom_attribute_post_api_model.py b/testit-python-commons/src/adapters_api/model/global_custom_attribute_post_api_model.py new file mode 100644 index 0000000..e81f5f2 --- /dev/null +++ b/testit-python-commons/src/adapters_api/model/global_custom_attribute_post_api_model.py @@ -0,0 +1,292 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: adapters + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from adapters_api.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 adapters_api.exceptions import ApiAttributeError + + +def lazy_import(): + from adapters_api.model.custom_attribute_option_post_api_model import CustomAttributeOptionPostApiModel + from adapters_api.model.custom_attribute_type import CustomAttributeType + globals()['CustomAttributeOptionPostApiModel'] = CustomAttributeOptionPostApiModel + globals()['CustomAttributeType'] = CustomAttributeType + + +class GlobalCustomAttributePostApiModel(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, + }, + } + + 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,), # noqa: E501 + 'type': (CustomAttributeType,), # noqa: E501 + 'is_enabled': (bool, none_type,), # noqa: E501 + 'is_required': (bool, none_type,), # noqa: E501 + 'options': ([CustomAttributeOptionPostApiModel], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'type': 'type', # noqa: E501 + 'is_enabled': 'isEnabled', # noqa: E501 + 'is_required': 'isRequired', # noqa: E501 + 'options': 'options', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, type, *args, **kwargs): # noqa: E501 + """GlobalCustomAttributePostApiModel - a model defined in OpenAPI + + Args: + name (str): Name of attribute + type (CustomAttributeType): + + 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,) + is_enabled (bool, none_type): Indicates whether the attribute is available. [optional] # noqa: E501 + is_required (bool, none_type): Indicates whether the attribute value is mandatory to specify. [optional] # noqa: E501 + options ([CustomAttributeOptionPostApiModel], none_type): Collection of attribute options Available for attributes of type `options` and `multiple options` only. [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.name = name + self.type = 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, name, type, *args, **kwargs): # noqa: E501 + """GlobalCustomAttributePostApiModel - a model defined in OpenAPI + + Args: + name (str): Name of attribute + type (CustomAttributeType): + + 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,) + is_enabled (bool, none_type): Indicates whether the attribute is available. [optional] # noqa: E501 + is_required (bool, none_type): Indicates whether the attribute value is mandatory to specify. [optional] # noqa: E501 + options ([CustomAttributeOptionPostApiModel], none_type): Collection of attribute options Available for attributes of type `options` and `multiple options` only. [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.name = name + self.type = 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/testit-python-commons/src/adapters_api/model/global_custom_attribute_update_api_model.py b/testit-python-commons/src/adapters_api/model/global_custom_attribute_update_api_model.py new file mode 100644 index 0000000..7571ae7 --- /dev/null +++ b/testit-python-commons/src/adapters_api/model/global_custom_attribute_update_api_model.py @@ -0,0 +1,284 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: adapters + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from adapters_api.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 adapters_api.exceptions import ApiAttributeError + + +def lazy_import(): + from adapters_api.model.custom_attribute_option_update_api_model import CustomAttributeOptionUpdateApiModel + globals()['CustomAttributeOptionUpdateApiModel'] = CustomAttributeOptionUpdateApiModel + + +class GlobalCustomAttributeUpdateApiModel(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, + }, + } + + 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,), # noqa: E501 + 'options': ([CustomAttributeOptionUpdateApiModel], none_type,), # noqa: E501 + 'is_enabled': (bool, none_type,), # noqa: E501 + 'is_required': (bool, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'options': 'options', # noqa: E501 + 'is_enabled': 'isEnabled', # noqa: E501 + 'is_required': 'isRequired', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 + """GlobalCustomAttributeUpdateApiModel - a model defined in OpenAPI + + Args: + name (str): Name of attribute + + 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,) + options ([CustomAttributeOptionUpdateApiModel], none_type): Collection of attribute options Available for attributes of type `options` and `multiple options` only. [optional] # noqa: E501 + is_enabled (bool, none_type): Indicates whether the attribute is available. [optional] # noqa: E501 + is_required (bool, none_type): Indicates whether the attribute value is mandatory to specify. [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.name = name + 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, name, *args, **kwargs): # noqa: E501 + """GlobalCustomAttributeUpdateApiModel - a model defined in OpenAPI + + Args: + name (str): Name of attribute + + 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,) + options ([CustomAttributeOptionUpdateApiModel], none_type): Collection of attribute options Available for attributes of type `options` and `multiple options` only. [optional] # noqa: E501 + is_enabled (bool, none_type): Indicates whether the attribute is available. [optional] # noqa: E501 + is_required (bool, none_type): Indicates whether the attribute value is mandatory to specify. [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.name = name + 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/testit-python-commons/src/adapters_api/model/layer_api_model.py b/testit-python-commons/src/adapters_api/model/layer_api_model.py new file mode 100644 index 0000000..16ce1a5 --- /dev/null +++ b/testit-python-commons/src/adapters_api/model/layer_api_model.py @@ -0,0 +1,277 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: adapters + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from adapters_api.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 adapters_api.exceptions import ApiAttributeError + + +def lazy_import(): + from adapters_api.model.layer_source import LayerSource + globals()['LayerSource'] = LayerSource + + +class LayerApiModel(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',): { + 'min_length': 1, + }, + } + + 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,), # noqa: E501 + 'source': (LayerSource,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'source': 'source', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, source, *args, **kwargs): # noqa: E501 + """LayerApiModel - a model defined in OpenAPI + + Args: + name (str): Name of the test pyramid layer. Available layers: * Unit * Component * API * UI * E2E * Contract + source (LayerSource): + + 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,) + """ + + _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.name = name + self.source = source + 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, name, source, *args, **kwargs): # noqa: E501 + """LayerApiModel - a model defined in OpenAPI + + Args: + name (str): Name of the test pyramid layer. Available layers: * Unit * Component * API * UI * E2E * Contract + source (LayerSource): + + 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,) + """ + + _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.name = name + self.source = source + 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/testit-python-commons/src/adapters_api/model/layer_api_result.py b/testit-python-commons/src/adapters_api/model/layer_api_result.py new file mode 100644 index 0000000..a57bdb9 --- /dev/null +++ b/testit-python-commons/src/adapters_api/model/layer_api_result.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: adapters + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from adapters_api.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 adapters_api.exceptions import ApiAttributeError + + +def lazy_import(): + from adapters_api.model.layer_source import LayerSource + globals()['LayerSource'] = LayerSource + + +class LayerApiResult(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 { + 'name': (str,), # noqa: E501 + 'source': (LayerSource,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'source': 'source', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, source, *args, **kwargs): # noqa: E501 + """LayerApiResult - a model defined in OpenAPI + + Args: + name (str): Name of the test pyramid layer. + source (LayerSource): + + 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,) + """ + + _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.name = name + self.source = source + 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, name, source, *args, **kwargs): # noqa: E501 + """LayerApiResult - a model defined in OpenAPI + + Args: + name (str): Name of the test pyramid layer. + source (LayerSource): + + 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,) + """ + + _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.name = name + self.source = source + 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/testit-python-commons/src/adapters_api/model/layer_source.py b/testit-python-commons/src/adapters_api/model/layer_source.py new file mode 100644 index 0000000..d5092f6 --- /dev/null +++ b/testit-python-commons/src/adapters_api/model/layer_source.py @@ -0,0 +1,291 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: adapters + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from adapters_api.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 adapters_api.exceptions import ApiAttributeError + + + +class LayerSource(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',): { + 'MANUAL': "Manual", + 'RUN': "Run", + 'RULE': "Rule", + }, + } + + 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): + """LayerSource - 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 ["Manual", "Run", "Rule", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["Manual", "Run", "Rule", ] # 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): + """LayerSource - 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 ["Manual", "Run", "Rule", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["Manual", "Run", "Rule", ] # 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/testit-python-commons/src/adapters_api/model/manual_rerun_select_test_results_api_model_filter.py b/testit-python-commons/src/adapters_api/model/manual_rerun_select_test_results_api_model_filter.py index 18284dd..764b326 100644 --- a/testit-python-commons/src/adapters_api/model/manual_rerun_select_test_results_api_model_filter.py +++ b/testit-python-commons/src/adapters_api/model/manual_rerun_select_test_results_api_model_filter.py @@ -30,10 +30,12 @@ def lazy_import(): + from adapters_api.model.failure_category_model import FailureCategoryModel from adapters_api.model.test_result_outcome import TestResultOutcome from adapters_api.model.test_results_filter_api_model import TestResultsFilterApiModel from adapters_api.model.test_results_filter_api_model_duration import TestResultsFilterApiModelDuration from adapters_api.model.test_status_api_type import TestStatusApiType + globals()['FailureCategoryModel'] = FailureCategoryModel globals()['TestResultOutcome'] = TestResultOutcome globals()['TestResultsFilterApiModel'] = TestResultsFilterApiModel globals()['TestResultsFilterApiModelDuration'] = TestResultsFilterApiModelDuration @@ -105,6 +107,7 @@ def openapi_types(): 'outcomes': ([TestResultOutcome], none_type,), # noqa: E501 'status_codes': ([str], none_type,), # noqa: E501 'status_types': ([TestStatusApiType], none_type,), # noqa: E501 + 'failure_categories': ([FailureCategoryModel], none_type,), # noqa: E501 'namespace': (str, none_type,), # noqa: E501 'class_name': (str, none_type,), # noqa: E501 'auto_test_global_ids': ([int], none_type,), # noqa: E501 @@ -125,6 +128,7 @@ def discriminator(): 'outcomes': 'outcomes', # noqa: E501 'status_codes': 'statusCodes', # noqa: E501 'status_types': 'statusTypes', # noqa: E501 + 'failure_categories': 'failureCategories', # noqa: E501 'namespace': 'namespace', # noqa: E501 'class_name': 'className', # noqa: E501 'auto_test_global_ids': 'autoTestGlobalIds', # noqa: E501 @@ -178,6 +182,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 outcomes ([TestResultOutcome], none_type): Specifies a test result outcomes to search for. [optional] # noqa: E501 status_codes ([str], none_type): Specifies a test result status codes to search for. [optional] # noqa: E501 status_types ([TestStatusApiType], none_type): Specifies a test result status types to search for. [optional] # noqa: E501 + failure_categories ([FailureCategoryModel], none_type): Specifies a test result failure categories to search for. [optional] # noqa: E501 namespace (str, none_type): Specifies a test result namespace to search for. [optional] # noqa: E501 class_name (str, none_type): Specifies a test result class name to search for. [optional] # noqa: E501 auto_test_global_ids ([int], none_type): Specifies an autotest global IDs to search results for. [optional] # noqa: E501 @@ -293,6 +298,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 outcomes ([TestResultOutcome], none_type): Specifies a test result outcomes to search for. [optional] # noqa: E501 status_codes ([str], none_type): Specifies a test result status codes to search for. [optional] # noqa: E501 status_types ([TestStatusApiType], none_type): Specifies a test result status types to search for. [optional] # noqa: E501 + failure_categories ([FailureCategoryModel], none_type): Specifies a test result failure categories to search for. [optional] # noqa: E501 namespace (str, none_type): Specifies a test result namespace to search for. [optional] # noqa: E501 class_name (str, none_type): Specifies a test result class name to search for. [optional] # noqa: E501 auto_test_global_ids ([int], none_type): Specifies an autotest global IDs to search results for. [optional] # noqa: E501 diff --git a/testit-python-commons/src/adapters_api/model/project_shortest_api_result.py b/testit-python-commons/src/adapters_api/model/project_shortest_api_result.py new file mode 100644 index 0000000..5e895ee --- /dev/null +++ b/testit-python-commons/src/adapters_api/model/project_shortest_api_result.py @@ -0,0 +1,292 @@ +""" + API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: adapters + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from adapters_api.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 adapters_api.exceptions import ApiAttributeError + + +def lazy_import(): + from adapters_api.model.project_type_model import ProjectTypeModel + globals()['ProjectTypeModel'] = ProjectTypeModel + + +class ProjectShortestApiResult(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 { + 'id': (str,), # noqa: E501 + 'is_deleted': (bool,), # noqa: E501 + 'global_id': (int,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'type': (ProjectTypeModel,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'is_deleted': 'isDeleted', # noqa: E501 + 'global_id': 'globalId', # noqa: E501 + 'name': 'name', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, is_deleted, global_id, name, type, *args, **kwargs): # noqa: E501 + """ProjectShortestApiResult - a model defined in OpenAPI + + Args: + id (str): Unique ID of project + is_deleted (bool): Indicates whether the project is deleted + global_id (int): Global ID of project + name (str): Name of project + type (ProjectTypeModel): + + 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,) + """ + + _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.id = id + self.is_deleted = is_deleted + self.global_id = global_id + self.name = name + self.type = 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, id, is_deleted, global_id, name, type, *args, **kwargs): # noqa: E501 + """ProjectShortestApiResult - a model defined in OpenAPI + + Args: + id (str): Unique ID of project + is_deleted (bool): Indicates whether the project is deleted + global_id (int): Global ID of project + name (str): Name of project + type (ProjectTypeModel): + + 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,) + """ + + _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.id = id + self.is_deleted = is_deleted + self.global_id = global_id + self.name = name + self.type = 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/testit-python-commons/src/adapters_api/model/projects_filter_model_autotests_count.py b/testit-python-commons/src/adapters_api/model/projects_filter_model_autotests_count.py index 4109a78..632bd5f 100644 --- a/testit-python-commons/src/adapters_api/model/projects_filter_model_autotests_count.py +++ b/testit-python-commons/src/adapters_api/model/projects_filter_model_autotests_count.py @@ -30,8 +30,8 @@ def lazy_import(): - from adapters_api.model.int32_range_selector_model import Int32RangeSelectorModel - globals()['Int32RangeSelectorModel'] = Int32RangeSelectorModel + from adapters_api.model.int64_range_selector_model import Int64RangeSelectorModel + globals()['Int64RangeSelectorModel'] = Int64RangeSelectorModel class ProjectsFilterModelAutotestsCount(ModelComposed): @@ -316,7 +316,7 @@ def _composed_schemas(): 'anyOf': [ ], 'allOf': [ - Int32RangeSelectorModel, + Int64RangeSelectorModel, ], 'oneOf': [ ], diff --git a/testit-python-commons/src/adapters_api/model/projects_filter_model_checklists_count.py b/testit-python-commons/src/adapters_api/model/projects_filter_model_checklists_count.py index 1b59833..bae7312 100644 --- a/testit-python-commons/src/adapters_api/model/projects_filter_model_checklists_count.py +++ b/testit-python-commons/src/adapters_api/model/projects_filter_model_checklists_count.py @@ -30,8 +30,8 @@ def lazy_import(): - from adapters_api.model.int32_range_selector_model import Int32RangeSelectorModel - globals()['Int32RangeSelectorModel'] = Int32RangeSelectorModel + from adapters_api.model.int64_range_selector_model import Int64RangeSelectorModel + globals()['Int64RangeSelectorModel'] = Int64RangeSelectorModel class ProjectsFilterModelChecklistsCount(ModelComposed): @@ -316,7 +316,7 @@ def _composed_schemas(): 'anyOf': [ ], 'allOf': [ - Int32RangeSelectorModel, + Int64RangeSelectorModel, ], 'oneOf': [ ], diff --git a/testit-python-commons/src/adapters_api/model/projects_filter_model_shared_steps_count.py b/testit-python-commons/src/adapters_api/model/projects_filter_model_shared_steps_count.py index 682ff6a..ac15a30 100644 --- a/testit-python-commons/src/adapters_api/model/projects_filter_model_shared_steps_count.py +++ b/testit-python-commons/src/adapters_api/model/projects_filter_model_shared_steps_count.py @@ -30,8 +30,8 @@ def lazy_import(): - from adapters_api.model.int32_range_selector_model import Int32RangeSelectorModel - globals()['Int32RangeSelectorModel'] = Int32RangeSelectorModel + from adapters_api.model.int64_range_selector_model import Int64RangeSelectorModel + globals()['Int64RangeSelectorModel'] = Int64RangeSelectorModel class ProjectsFilterModelSharedStepsCount(ModelComposed): @@ -316,7 +316,7 @@ def _composed_schemas(): 'anyOf': [ ], 'allOf': [ - Int32RangeSelectorModel, + Int64RangeSelectorModel, ], 'oneOf': [ ], diff --git a/testit-python-commons/src/adapters_api/model/projects_filter_model_test_cases_count.py b/testit-python-commons/src/adapters_api/model/projects_filter_model_test_cases_count.py index f99a6b0..42da3aa 100644 --- a/testit-python-commons/src/adapters_api/model/projects_filter_model_test_cases_count.py +++ b/testit-python-commons/src/adapters_api/model/projects_filter_model_test_cases_count.py @@ -30,8 +30,8 @@ def lazy_import(): - from adapters_api.model.int32_range_selector_model import Int32RangeSelectorModel - globals()['Int32RangeSelectorModel'] = Int32RangeSelectorModel + from adapters_api.model.int64_range_selector_model import Int64RangeSelectorModel + globals()['Int64RangeSelectorModel'] = Int64RangeSelectorModel class ProjectsFilterModelTestCasesCount(ModelComposed): @@ -316,7 +316,7 @@ def _composed_schemas(): 'anyOf': [ ], 'allOf': [ - Int32RangeSelectorModel, + Int64RangeSelectorModel, ], 'oneOf': [ ], diff --git a/testit-python-commons/src/adapters_api/model/test_result_short_response.py b/testit-python-commons/src/adapters_api/model/test_result_short_response.py index aabdc50..91f3763 100644 --- a/testit-python-commons/src/adapters_api/model/test_result_short_response.py +++ b/testit-python-commons/src/adapters_api/model/test_result_short_response.py @@ -88,6 +88,7 @@ def openapi_types(): return { 'id': (str,), # noqa: E501 'name': (str,), # noqa: E501 + 'autotest_global_id': (int,), # noqa: E501 'auto_test_tags': ([str],), # noqa: E501 'test_run_id': (str,), # noqa: E501 'configuration_id': (str,), # noqa: E501 @@ -111,6 +112,7 @@ def discriminator(): attribute_map = { 'id': 'id', # noqa: E501 'name': 'name', # noqa: E501 + 'autotest_global_id': 'autotestGlobalId', # noqa: E501 'auto_test_tags': 'autoTestTags', # noqa: E501 'test_run_id': 'testRunId', # noqa: E501 'configuration_id': 'configurationId', # noqa: E501 @@ -133,12 +135,13 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, id, name, auto_test_tags, test_run_id, configuration_id, configuration_name, status, result_reasons, links, attachments, rerun_completed_count, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, id, name, autotest_global_id, auto_test_tags, test_run_id, configuration_id, configuration_name, status, result_reasons, links, attachments, rerun_completed_count, *args, **kwargs): # noqa: E501 """TestResultShortResponse - a model defined in OpenAPI Args: id (str): Unique ID of the test result name (str): Name of autotest represented by the test result + autotest_global_id (int): Global ID of autotest represented by the test result auto_test_tags ([str]): Tags of the autotest represented by the test result test_run_id (str): Unique ID of test run where the test result is located configuration_id (str): Unique ID of configuration which the test result uses @@ -217,6 +220,7 @@ def _from_openapi_data(cls, id, name, auto_test_tags, test_run_id, configuration self.id = id self.name = name + self.autotest_global_id = autotest_global_id self.auto_test_tags = auto_test_tags self.test_run_id = test_run_id self.configuration_id = configuration_id @@ -246,12 +250,13 @@ def _from_openapi_data(cls, id, name, auto_test_tags, test_run_id, configuration ]) @convert_js_args_to_python_args - def __init__(self, id, name, auto_test_tags, test_run_id, configuration_id, configuration_name, status, result_reasons, links, attachments, rerun_completed_count, *args, **kwargs): # noqa: E501 + def __init__(self, id, name, autotest_global_id, auto_test_tags, test_run_id, configuration_id, configuration_name, status, result_reasons, links, attachments, rerun_completed_count, *args, **kwargs): # noqa: E501 """TestResultShortResponse - a model defined in OpenAPI Args: id (str): Unique ID of the test result name (str): Name of autotest represented by the test result + autotest_global_id (int): Global ID of autotest represented by the test result auto_test_tags ([str]): Tags of the autotest represented by the test result test_run_id (str): Unique ID of test run where the test result is located configuration_id (str): Unique ID of configuration which the test result uses @@ -328,6 +333,7 @@ def __init__(self, id, name, auto_test_tags, test_run_id, configuration_id, conf self.id = id self.name = name + self.autotest_global_id = autotest_global_id self.auto_test_tags = auto_test_tags self.test_run_id = test_run_id self.configuration_id = configuration_id diff --git a/testit-python-commons/src/adapters_api/model/test_results_filter_api_model.py b/testit-python-commons/src/adapters_api/model/test_results_filter_api_model.py index f6cb17c..6f284a9 100644 --- a/testit-python-commons/src/adapters_api/model/test_results_filter_api_model.py +++ b/testit-python-commons/src/adapters_api/model/test_results_filter_api_model.py @@ -30,9 +30,11 @@ def lazy_import(): + from adapters_api.model.failure_category_model import FailureCategoryModel from adapters_api.model.test_result_outcome import TestResultOutcome from adapters_api.model.test_results_filter_api_model_duration import TestResultsFilterApiModelDuration from adapters_api.model.test_status_api_type import TestStatusApiType + globals()['FailureCategoryModel'] = FailureCategoryModel globals()['TestResultOutcome'] = TestResultOutcome globals()['TestResultsFilterApiModelDuration'] = TestResultsFilterApiModelDuration globals()['TestStatusApiType'] = TestStatusApiType @@ -96,6 +98,7 @@ def openapi_types(): 'outcomes': ([TestResultOutcome], none_type,), # noqa: E501 'status_codes': ([str], none_type,), # noqa: E501 'status_types': ([TestStatusApiType], none_type,), # noqa: E501 + 'failure_categories': ([FailureCategoryModel], none_type,), # noqa: E501 'namespace': (str, none_type,), # noqa: E501 'class_name': (str, none_type,), # noqa: E501 'auto_test_global_ids': ([int], none_type,), # noqa: E501 @@ -116,6 +119,7 @@ def discriminator(): 'outcomes': 'outcomes', # noqa: E501 'status_codes': 'statusCodes', # noqa: E501 'status_types': 'statusTypes', # noqa: E501 + 'failure_categories': 'failureCategories', # noqa: E501 'namespace': 'namespace', # noqa: E501 'class_name': 'className', # noqa: E501 'auto_test_global_ids': 'autoTestGlobalIds', # noqa: E501 @@ -171,6 +175,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 outcomes ([TestResultOutcome], none_type): Specifies a test result outcomes to search for. [optional] # noqa: E501 status_codes ([str], none_type): Specifies a test result status codes to search for. [optional] # noqa: E501 status_types ([TestStatusApiType], none_type): Specifies a test result status types to search for. [optional] # noqa: E501 + failure_categories ([FailureCategoryModel], none_type): Specifies a test result failure categories to search for. [optional] # noqa: E501 namespace (str, none_type): Specifies a test result namespace to search for. [optional] # noqa: E501 class_name (str, none_type): Specifies a test result class name to search for. [optional] # noqa: E501 auto_test_global_ids ([int], none_type): Specifies an autotest global IDs to search results for. [optional] # noqa: E501 @@ -268,6 +273,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 outcomes ([TestResultOutcome], none_type): Specifies a test result outcomes to search for. [optional] # noqa: E501 status_codes ([str], none_type): Specifies a test result status codes to search for. [optional] # noqa: E501 status_types ([TestStatusApiType], none_type): Specifies a test result status types to search for. [optional] # noqa: E501 + failure_categories ([FailureCategoryModel], none_type): Specifies a test result failure categories to search for. [optional] # noqa: E501 namespace (str, none_type): Specifies a test result namespace to search for. [optional] # noqa: E501 class_name (str, none_type): Specifies a test result class name to search for. [optional] # noqa: E501 auto_test_global_ids ([int], none_type): Specifies an autotest global IDs to search results for. [optional] # noqa: E501 diff --git a/testit-python-commons/src/adapters_api/model/test_run_api_result.py b/testit-python-commons/src/adapters_api/model/test_run_api_result.py index 51cc45d..8c2746e 100644 --- a/testit-python-commons/src/adapters_api/model/test_run_api_result.py +++ b/testit-python-commons/src/adapters_api/model/test_run_api_result.py @@ -88,11 +88,14 @@ def openapi_types(): return { 'id': (str,), # noqa: E501 'name': (str,), # noqa: E501 + 'project_id': (str,), # noqa: E501 'state_name': (TestRunState,), # noqa: E501 'status': (TestRunApiResultStatus,), # noqa: E501 'attachments': ([AttachmentApiResult],), # noqa: E501 'links': ([LinkApiResult],), # noqa: E501 'tags': ([str],), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + 'launch_source': (str, none_type,), # noqa: E501 } @cached_property @@ -103,11 +106,14 @@ def discriminator(): attribute_map = { 'id': 'id', # noqa: E501 'name': 'name', # noqa: E501 + 'project_id': 'projectId', # noqa: E501 'state_name': 'stateName', # noqa: E501 'status': 'status', # noqa: E501 'attachments': 'attachments', # noqa: E501 'links': 'links', # noqa: E501 'tags': 'tags', # noqa: E501 + 'description': 'description', # noqa: E501 + 'launch_source': 'launchSource', # noqa: E501 } read_only_vars = { @@ -117,12 +123,13 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, id, name, state_name, status, attachments, links, tags, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, id, name, project_id, state_name, status, attachments, links, tags, *args, **kwargs): # noqa: E501 """TestRunApiResult - a model defined in OpenAPI Args: id (str): Test run unique identifier name (str): Test run name + project_id (str): Project unique identifier This property is used to link test run with project. state_name (TestRunState): status (TestRunApiResultStatus): attachments ([AttachmentApiResult]): Collection of attachments related to the test run @@ -160,6 +167,8 @@ def _from_openapi_data(cls, id, name, state_name, status, attachments, links, ta Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + description (str, none_type): Test run description. [optional] # noqa: E501 + launch_source (str, none_type): Test run launch source Once launch source is specified it cannot be updated.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -193,6 +202,7 @@ def _from_openapi_data(cls, id, name, state_name, status, attachments, links, ta self.id = id self.name = name + self.project_id = project_id self.state_name = state_name self.status = status self.attachments = attachments @@ -218,12 +228,13 @@ def _from_openapi_data(cls, id, name, state_name, status, attachments, links, ta ]) @convert_js_args_to_python_args - def __init__(self, id, name, state_name, status, attachments, links, tags, *args, **kwargs): # noqa: E501 + def __init__(self, id, name, project_id, state_name, status, attachments, links, tags, *args, **kwargs): # noqa: E501 """TestRunApiResult - a model defined in OpenAPI Args: id (str): Test run unique identifier name (str): Test run name + project_id (str): Project unique identifier This property is used to link test run with project. state_name (TestRunState): status (TestRunApiResultStatus): attachments ([AttachmentApiResult]): Collection of attachments related to the test run @@ -261,6 +272,8 @@ def __init__(self, id, name, state_name, status, attachments, links, tags, *args Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + description (str, none_type): Test run description. [optional] # noqa: E501 + launch_source (str, none_type): Test run launch source Once launch source is specified it cannot be updated.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -292,6 +305,7 @@ def __init__(self, id, name, state_name, status, attachments, links, tags, *args self.id = id self.name = name + self.project_id = project_id self.state_name = state_name self.status = status self.attachments = attachments diff --git a/testit-python-commons/src/adapters_api/models/__init__.py b/testit-python-commons/src/adapters_api/models/__init__.py index 4c686a9..b44a05a 100644 --- a/testit-python-commons/src/adapters_api/models/__init__.py +++ b/testit-python-commons/src/adapters_api/models/__init__.py @@ -14,6 +14,9 @@ from adapters_api.model.adapters_auto_tests_put_request import AdaptersAutoTestsPutRequest from adapters_api.model.adapters_auto_tests_search_post_request import AdaptersAutoTestsSearchPostRequest from adapters_api.model.adapters_configurations_search_post_request import AdaptersConfigurationsSearchPostRequest +from adapters_api.model.adapters_custom_attributes_global_id_put_request import AdaptersCustomAttributesGlobalIdPutRequest +from adapters_api.model.adapters_custom_attributes_global_post_request import AdaptersCustomAttributesGlobalPostRequest +from adapters_api.model.adapters_custom_attributes_search_post_request import AdaptersCustomAttributesSearchPostRequest from adapters_api.model.adapters_parameters_post_request import AdaptersParametersPostRequest from adapters_api.model.adapters_parameters_search_post_request import AdaptersParametersSearchPostRequest from adapters_api.model.adapters_projects_post_request import AdaptersProjectsPostRequest @@ -38,8 +41,10 @@ from adapters_api.model.attachment_update_request import AttachmentUpdateRequest from adapters_api.model.auto_test import AutoTest from adapters_api.model.auto_test_api_result import AutoTestApiResult +from adapters_api.model.auto_test_api_result_layer import AutoTestApiResultLayer from adapters_api.model.auto_test_case_api_model import AutoTestCaseApiModel from adapters_api.model.auto_test_create_api_model import AutoTestCreateApiModel +from adapters_api.model.auto_test_create_api_model_layer import AutoTestCreateApiModelLayer from adapters_api.model.auto_test_filter_api_model import AutoTestFilterApiModel from adapters_api.model.auto_test_id_model import AutoTestIdModel from adapters_api.model.auto_test_model import AutoTestModel @@ -73,7 +78,11 @@ from adapters_api.model.custom_attribute_model import CustomAttributeModel from adapters_api.model.custom_attribute_option_api_result import CustomAttributeOptionApiResult from adapters_api.model.custom_attribute_option_model import CustomAttributeOptionModel +from adapters_api.model.custom_attribute_option_post_api_model import CustomAttributeOptionPostApiModel +from adapters_api.model.custom_attribute_option_update_api_model import CustomAttributeOptionUpdateApiModel from adapters_api.model.custom_attribute_put_model import CustomAttributePutModel +from adapters_api.model.custom_attribute_search_api_model import CustomAttributeSearchApiModel +from adapters_api.model.custom_attribute_search_api_result import CustomAttributeSearchApiResult from adapters_api.model.custom_attribute_type import CustomAttributeType from adapters_api.model.custom_attribute_types_enum import CustomAttributeTypesEnum from adapters_api.model.date_time_range_selector_model import DateTimeRangeSelectorModel @@ -81,6 +90,8 @@ from adapters_api.model.detailed_project_api_result import DetailedProjectApiResult from adapters_api.model.detailed_project_api_result_workflow import DetailedProjectApiResultWorkflow from adapters_api.model.failure_category_model import FailureCategoryModel +from adapters_api.model.global_custom_attribute_post_api_model import GlobalCustomAttributePostApiModel +from adapters_api.model.global_custom_attribute_update_api_model import GlobalCustomAttributeUpdateApiModel from adapters_api.model.guid_extraction_model import GuidExtractionModel from adapters_api.model.image_resize_type import ImageResizeType from adapters_api.model.int32_range_selector_model import Int32RangeSelectorModel @@ -90,6 +101,9 @@ from adapters_api.model.label_api_model import LabelApiModel from adapters_api.model.label_api_result import LabelApiResult from adapters_api.model.label_short_model import LabelShortModel +from adapters_api.model.layer_api_model import LayerApiModel +from adapters_api.model.layer_api_result import LayerApiResult +from adapters_api.model.layer_source import LayerSource from adapters_api.model.link_api_result import LinkApiResult from adapters_api.model.link_create_api_model import LinkCreateApiModel from adapters_api.model.link_model import LinkModel @@ -113,6 +127,7 @@ from adapters_api.model.problem_details import ProblemDetails from adapters_api.model.project_api_result import ProjectApiResult from adapters_api.model.project_attributes_filter_model import ProjectAttributesFilterModel +from adapters_api.model.project_shortest_api_result import ProjectShortestApiResult from adapters_api.model.project_type_model import ProjectTypeModel from adapters_api.model.projects_filter_model import ProjectsFilterModel from adapters_api.model.projects_filter_model_autotests_count import ProjectsFilterModelAutotestsCount diff --git a/update_versions.sh b/update_versions.sh index ce5a164..58bcb10 100644 --- a/update_versions.sh +++ b/update_versions.sh @@ -1,6 +1,6 @@ #!/bin/bash -NEW_VERSION="5.1.3" +NEW_VERSION="5.1.4" echo "Updating all adapters to version: $NEW_VERSION"